Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Editor Problem and DarkLights commands not working

Author
Message
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 4th Sep 2014 18:21
I bought few days ago DarkBasic Pro (used it for years the free version though so i am not new to it), i have Windows 8.1 and i cant get to work the new editor (it tells me to disable the compatibility mode but i didn t enabled it), so i must use the old editor version (updated 2003 instead of 2010 of the new one).
I wish to use the new editor cause i think it has less bugs and maybe more things to use but the TMG support didnt helped me (and didnt even seems to care about it, only reply was go back to win 7, which i dont have and don t want to downgrade to it just because of the editor bug)
I noticed some bugs on the old editor, for example when you try to minimize a function and then reopen it, if you try to edit the text there it doesnt update on the screen unless you scroll the page up and go back down again).
But probably the biggest problem i have is that i cant use darklights (it was included in the bonanza pack which i bought), i did installed it correctly, but if i try to click some lights commands such as "lm start", the text highlight like its a valid command, but if i compile and run the program it says "could not understand command and line x".
How can i fix this problem? i need to do some lightmaps for my game but i cant because of this bug
John Y
Synergy Editor Developer
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 4th Sep 2014 22:06
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 20th Sep 2014 06:18
This editor too seems to have some problems, if i try for example "lm start" that is one of the commands of lightmapping, used by dark lights, it say could not understand command at line xxx
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Sep 2014 21:12
Did you install Dark Lights?

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 21st Sep 2014 02:41
yes i did install dark lights and dark shader and all the other stuff i get with the bonanza pack ( the one discounted by 91%)
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Sep 2014 00:35 Edited at: 22nd Sep 2014 00:35
Installed DirectX9.0c?

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 01:20
I do, otherwise it wouldn t work at all, also it doesn t mean anything with the error i am getting, is something related to the editor itself or some plugins added to darkbasic, i do get "could not understand command at line xxx", also some commands like set effect camera (or someting like that) compiles but has no documentation, not even the syntax i should use (like how many variables to add after the command and which ones)
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Sep 2014 01:45
Can you explain what 'it' is?

Can you create and rotate a cube in 3D?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Sep 2014 01:46
Do you have the file Lightmapper.dll in your DBPro/Compiler/Plugins-licensed folder? If not then your Dark Lights installation is probably faulty.



Powered by Free Banners
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Sep 2014 01:52
Try the attached demo. Does that fail? If so, which line?



Powered by Free Banners

Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Sep 2014 01:56
Thanks GG, on mobile 📱 about to sleep 💤...

I think DX is not installed properly or plugins not activated...

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Sep 2014 11:36
Cescano Which version of DBPro are you running? I'm using U77RC7 which is the latest unofficial version (oops - see below ). You can find out from the DBPro editor main menu Help/About Dark Basic Professional. My copy says Version 1.074 (!! because I recently downgraded to check something and forgot to change back - guess what my next task is going to be ).

Computers are an infinite source of joy and confusion.



Powered by Free Banners
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 20:48
Yes lightmapper.dll is on the folder.

If i try to execute your code i don t get any errors BUT the program doesn t start and the editor higlight the line:

lm start ` initialize the light map process


By the way i got a new editor now updated 2008, i found it in the DVD that TGC sent me when i bought the bonanza pack, its newer than the old one i was using so probably less bugs (old one was updated 2003), anyway, i dont know why they removed the minimizing function option which was very usefull (but bugged in the editor i used before)

For the lightmap stuff, all the lightmap commands are highlighted blue, so the editor recognises them as commands, i dont know why it doesnt start though, this editor by the way seems to have a bug that the old editor didnt had:

If i open your code just as file, and i click execute, it starts the old program i executed but not your code, and this just after opening the editor so nothing should be in memory from the old project opened, to be able to open your project i must open it as project, and doing that the program didnt start and the editor highlight that like i pasted before.

Another thing i am concerned about is why the hell the editor save the file once i click execute? this happened with all editors i used (updated 2003,2004 and 2008). If i click execute i expect just to run the program not to save the file, because if i made some mistakes and noticed them running the program obviously i would NOT to save the file!

to moderators (please remove my noob status as is annoying waiting hours to get the message added to the forum and this will take my problems to be fixed so much longer, i think its clear that i am not a spam bot, thank you)
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 20:50
I do not know how to "edit" the message instead of making a new one, by the way moderators nevermind what i said as i see my noob status went away (thank you!)
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 20:57
another thing, if i try to use the lightmapper IDE, whatever options i chose, when i press f3 to do the lightmap the program crashes
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 21:14
Oh and gandalf i updated db pro to version 7.62, i tried the version 7.7 but it screwed up my water (made with evolved shader)

For the lightmapping thing i still have to understand what exactly is (transparent texture on a plane object? object scaled on the vertical size and made black?)

By the way for the moment i managed to make static shadows using 3ds max, paint, and a little program made myself in db pro.

What i do is load the model in 3ds max, make a plane below the object (big enough to show the shadows), make a spot light pointing it from a position i know that will be the same as my light source is on my game, make the main object not visible to camera, make the plain object completely White (255,255,255) and the shadow color to (10,10,10) to make almost maximum contrast, then i set rendering to 1024*1024 and render, saving the image (bmp so its lossless as i need it for transparency).
After that i open it on paint and cut just the part i need, then i load that image on my program which check every pixel too light and making it (0,0,0) for transparency (so that the plain object part will be hidden).
Then i make a plain object in dbpro and texture that plain with that texture, making the object texture transparent, then with the command set Alpha mapping on (if i am not wrong), i set the Alpha amount to 80 to make the shadow fading with the ground and not shown as just black which would be unrealistic. Here is a screenshot on how it looks like, to me its pretty cool, but i still want to understand how ligthmaps works (i checked on internet but didn t found something very clear).
After these static shadows i will need to make dynamic shadows and that would be a major problem.

For the shadows i made myself i am pretty happy though as are accurate shadows with just 1 polygon (maybe 2 if triangulated), but i still want to understand the lightmapping in darklights to see the difference

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Sep 2014 22:23 Edited at: 22nd Sep 2014 22:28
Quote: "If i open your code just as file, and i click execute, it starts the old program i executed but not your code, and this just after opening the editor so nothing should be in memory from the old project opened, to be able to open your project i must open it as project, and doing that the program didnt start and the editor highlight that like i pasted before."


That sounds like an old bug with early versions of the editor. Which version are you using? You should be using version Build 23 June 2010 (Edit You might need the new version mentioned by John Y in his earlier reply since you are using W8.1). Check Help/About Dark Basic Professional Editor to find out.

One thing you could try is to create a new project of your own in the same folder where you put my project and copy/paste my code into your new project. Also, if you delete any existing executables in that folder then the editor cannot run the wrong exe file.

I have no idea why the editor doesn't like that particular line. I see you are using Windows 8.1. Where have you installed DBPro? I'm not familiar with the specific requirements of DBPro with Windows 8.1. Have you checked the thread?



Powered by Free Banners
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 22nd Sep 2014 23:14
I tried what you say and still the editor highligh "lm start
" and doesn t run your program.

The last editor updated 2010 doesn t work on Windows 8.1, if you try to run it, it will close automatically saying "you need to disable comatibility mode" which is not disabled, and even enabling it nothing changes (there are a couple of threads about this is think, other people getting this problem too)

DBpro is installed in C:\Program Files (386)\The Games Creator\ etc
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Sep 2014 23:37 Edited at: 22nd Sep 2014 23:39
Cescano - If you are struggling with setting up DBPro on Windows 8.1 please click on the 'Download from Windows Store' image in my signature for my app which walks you through setting up DBPro with both images and text, if you cannot understand my dotdotdot... English you can just follow all the images, I have documented EVERY installation for all the paid plug-ins including all DGS packages...

I also just ensured I had Dark Lights working on my system by simply starting it up, typing lm start and compiling the app as well as running an example demo as well, so I am certain you can get everything working through my guides, I also link to all required downloads within my app...

I am working on follow-up applications including enhanced Command Help Documentation in a standalone App, and an app which contains many useful code snippets which make use of the paid plug-ins, I focus on paid plugins to ensure everyone has the same tools and versions as well as doing my bit to help TGC in respect of being my only route into game development...

If you choose to invest in my guides I appreciate it in advance, thanks!...

EDIT

Also that Lighting tool does not work so well, you need to tweak it or use DL inside your application or create your own light mapping tool from scratch... As far as I know...

chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Sep 2014 23:41 Edited at: 22nd Sep 2014 23:42
Quote: "If i try to execute your code i don t get any errors BUT the program doesn t start and the editor higlight the line:

lm start ` initialize the light map process"


I remember to see this problem long long ago . When we install and activate darklights, it generates a file into Copiler/certificates folder . something like this :


Check if you have something like this file .

I'm not a grumpy grandpa

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 00:30
Quote: "The last editor updated 2010 doesn t work on Windows 8.1"


I know - that's why I edited my message. You will need to follow John Y's instructions given in his link.



Powered by Free Banners
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 02:35
yes chafari i got 1 strange file in that directory, but only 1 file with that weird name
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 23rd Sep 2014 03:39
Quote: "yes chafari i got 1 strange file in that directory, but only 1 file with that weird name"


You have one for the Darkbasic Pro activation, you will need another one for Darklights . Have you tried to install again ? Did you enter the activation key when you installed it or you are using just the editor Demo ?

I'm not a grumpy grandpa
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 04:31
When i received all the software on my account (downloaded from my account), i have installed dbpro and all the other stuff, what was weird, is that when i tried to install darklights and the other stuff, the codes provided on my account wouldn t work, so i tryed to paste the code for my dbpro activation and that did work for them all
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 13:04
Quote: "so i tryed to paste the code for my dbpro activation and that did work for them all"


Sounds unlikely to me. It's obvious from what you've said that it didn't work for them all.

In fact I've just tested that and it doesn't work and I get exactly the symptoms you describe. You will need to do what Chafari said - make sure you have Dark Lights activated with its own code. However, I just tried to do that and I must admit it isn't obvious how to do it (fortunately I simply moved the certificate out of the way so all I have to do is move it back again - but that won't help you unless you have a copy of the certificate file somewhere). Perhaps someone else can remind us how to activate Dark Lights with the key? I believe the key will be one of those very long character codes - i.e. 128 characters.

Since I cannot now find my email with the Dark Lights code () I can't test the activation procedure for you - but if you have the key it should be easy (he says hopefully ).



Powered by Free Banners
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 13:23 Edited at: 23rd Sep 2014 13:24
Quick update. I've just found my original Dark Lights key and activated Dark Lights using the formal activation procedure - use Help/Check Dark Basic Professional Modules/Activate etc.

Let us know why that doesn't work for you.

Edit: You probably need to make sure you enter the correct email address as well.



Powered by Free Banners
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Sep 2014 15:02
Quote: "Edit: You probably need to make sure you enter the correct email address as well."


Usually the same as the one your TGC account is set up on...

Manual Activation in terms of running TGCOnline.exe? [Compiler Folder]

Quote: "Dark Lights code"


It is in your Products page at the top links to serials and codes...

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 16:00
yeah probably i did something wrong last time, i removed all the components such as darklights, dark AI, dark physics, extends etc (what is extends???)

Then i tried to activate them with the codes i have on my account and finally they turn on when i open the editor!

I really cant understand why adding last time the program said activated even if it wasnt (using just the dbpro code)

By the way i will try the lightmapping demo you wrote and i will let you know what happens
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 16:24
Ok gandalf, i got your example to work now, the problem was the darklight activation so.

lightmapper IDE still crash when i build the lightmap of the example.

So gandalf, basicly the object saved has the texture applied to the object with the shadow included? or it is like a 2nd object added to the 1st object to do the shadow?

Now that i got your example to work i am starting to understand something but the fact that there is no documentation for the commands makes all so hard to learn, for example i see you use :

lm set ambient occlusion on 20, 50, 1

if i try to F1 this or the other darklights commands i got nothing on the help page, so i don t know changing these 3 parameters what would affect exactly.


Also, seing your example, the shadows doesn t seems to be so detailed like the technique i used to do the fence shadows, which use just 1 polygon (2 triangulated) to do the shadow of the object
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Sep 2014 16:29
...\DBPRO\Help\addoncommands\darklights

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 17:03 Edited at: 23rd Sep 2014 17:24
Lightmapping works by creating a second texture layer on the object and applying the light map to that new layer. The final appearance is obtained by simply blending the main texture with the lightmap texture. The lightmaps are saved in a separate folder in the project directory.

Once you have run my first demo you can simply load the new lightmapped object. For example, create a new project in the same folder as before and run the following code. Note that the fvf format is now 530 whereas it was initially 274 before the lightmapping was performed (274 is the default DBPro fvf format). The change reflects the addition of a second set of UV coordinates, i.e. 274+256 = 530.

If you wanted to I guess you could prepare a series of lightmaps for the same object and just apply them to the correct stage when needed. [I haven't tested that suggestion yet so the usual health warning applies .]

Edit Sorry! Forgot the code. Here it is hopefully:





Edit2 Just adding a bit more detail on the lightmapping. The following code shows how you can achieve the same result by using the blend mapping commands directly. So, once you've lightmapped the object you can change the main texture if you like. Not sure about the lightmap - the calculated UV data for stage 1 might be linked to the light map used. I'd have to do more tests to find out.





Powered by Free Banners
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 17:46
What about if i have an object that already use texture stage 1 and 2 (for normal and relief mapping)? do i have to set the lightmap on the stage 3?

Also, how can i deal with quality/performance of the lightmap, which parameters do i have to change in which command?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 18:20 Edited at: 23rd Sep 2014 18:33
Quote: "Also, how can i deal with quality/performance of the lightmap, which parameters do i have to change in which command?"


Look at Help file for LM BUILD LIGHT MAPS.

I'm sure there was a document somewhere which summarised the main points and linked to the individual light map commands. Can't seem to locate it at the moment. You'll just have to look through the various Help files and do some experimenting which is all I can do anyway.

Quote: "What about if i have an object that already use texture stage 1 and 2 (for normal and relief mapping)? do i have to set the lightmap on the stage 3?"


Since you are using a shader it doesn't matter which stage you apply it to - just make sure the shader uses the correct stage and UV coordinates when referencing the different images, e.g. typically stages 0, 1 and 2 for the main texture, normal and relief maps will all use the stage 0 UV coordinates, whereas the lightmap would probably be on texture stage 3 as you suggest but will use the stage 1 UV coordinates when looking up the texture. Which light will you be using for the normal map? Make sure you don't use the diffuse lighting twice, i.e. in the normal map calculation and in the light map, otherwise you might get strange results. In other words you need to think about the logic of what you're doing.

Edit Fixed typos.



Powered by Free Banners
Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 18:37
i am using the evolved shaders for normal and relief mappings, i think they use 1 light each so i know probably i could get better performance by using 1 light for both of them (maybe?), but i dont know how to edit the shaders to make 1 light only for both mappings
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Sep 2014 19:00
A good compromise is to reserve the light maps for things like fixed lights, ambient light and shadows (since they obviously don't need to be recalculated every sync) and reserve normal mapping for a dynamic light. Not ideal but may give you most of what you want in the scene. You won't be able to get real time shadows from the dynamic light this way though.

On the Help file issue, I've found a Dark Lights folder in my Projects directory which contains some additional documentation plus sample projects. Do you have that?

Quote: "but i dont know how to edit the shaders to make 1 light only for both mappings"


Evolved has written so many shaders over the years you'd have to post the one you are using. Try the normal mapping one first. Post it here, explain carefully what you are trying to achieve and someone will probably show you how to amend the code to include the light map. I find it helpful to think of the light map as a more complicated kind of ambient light so wherever the shader uses ambient light just use the light map instead.



Powered by Free Banners
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Sep 2014 19:23
I thought I forgot something...

...\DBPRO\Projects\Dark Lights\Documentation

Information.chm
Reference.chm

Cescano
9
Years of Service
User Offline
Joined: 4th Sep 2014
Location: Italy
Posted: 23rd Sep 2014 20:48
yeah i found them now

Login to post a reply

Server time is: 2024-04-20 13:37:26
Your offset time is: 2024-04-20 13:37:26