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 / Darklights Question

Author
Message
Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 1st Jun 2010 15:23 Edited at: 1st Jun 2010 18:22
Ok after months of trying i finally got darklights working on my computer (YAY!!) ok now i have a new problem, i manage to lightmap and save my model using the IDE and all looks sexy, however when i use my pre-lit model in my dbpro program it's all very bright white and none of the lightmapping is there. is there maybe something i'm missing? i have the lightmaps folder and the .dbo and the .dat file all in the same folder i figured you just used the load object" /// .dbo" as you would normally

*edit*

Actually just as a thought, isn't it supposed to create a DDS file when you save it? if thats the case then it's not creating one when i save it. I only add this as sometimes it says can't create DDS file after lightmapping it

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Jun 2010 18:53
Yes, the lightmap itself will be an image file. Can't recall off-hand whether it's DDS or something else - but DDS seems the likely format.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Jun 2010 19:28 Edited at: 1st Jun 2010 19:33
The lightmap is in "png" and is normally saved in a folder called "lightmaps" in your project folder (I think you can edit the name of this folder).

You have to save the lightmapped model after producing the lightmaps as your original model won't contain the necessary mapping co-ordinates for the lightmap.

EDIT: "i have the lightmaps folder and the .dbo and the .dat file all in the same folder", this might be the problem as you need to load the dbo from the same relative position to the lightmap folder as where you saved it.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Jun 2010 19:33
Yes, you're right. I've just checked.

Here's a simple demo. It contains two projects. One creates the lightmap and a simple "world" for lightmapping and then saves the "world" object. The other just loads the lightmapped world object and displays it. The zip file also contains a folder showing the two files you should get.
Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 2nd Jun 2010 22:59
i have the folder with the

Model.dat
Model.dbo
and the Folder Lightmaps

all of that is in the same folder and the lightmap folder does indeed have several .png files in it, but the model still comes out bright white even though i never used a white light at all.

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jun 2010 23:28
Have you checked my demo to see where the difference is?
Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 2nd Jun 2010 23:35 Edited at: 2nd Jun 2010 23:38
i've looked and it all looks the same to me, well when i say it looks the same, i mean i can't see any reason as to why it shouldn't work


my folder looks like this



and my code is this



Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Jun 2010 23:43
Did you save the model after lightmapped it?

Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 2nd Jun 2010 23:45 Edited at: 2nd Jun 2010 23:45
well yes, i pressed F3 ti lightmap and then F5 to save it


i might be stupid but give me SOME credit at least

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Jun 2010 23:53
Perhaps the problem is the way the model was created?
Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 3rd Jun 2010 00:18
i had thought of that so i tried using the default model that you get as soon as you load up the GUI and it doesn the same thing

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green7
20
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 3rd Jun 2010 00:32
just an idea, try to hide light 0? I had some tinkering this week with the gamefx commands from dbpro and I had a similar problem with the lightmaps.

Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 3rd Jun 2010 12:47
Yeha i had tried hiding light 0, changing the ambient light settings and such, but all to no avail.

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Jun 2010 23:16
Could you zip the whole project (without the exe file) and upload it so we can test it ourselves? We're just guessing otherwise.
Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 3rd Jun 2010 23:43
Ok there is all the files attached

Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Jun 2010 00:26 Edited at: 4th Jun 2010 01:00
Er? Your lightmaps are all almost pure black? And where are the object's main textures?

Edit

I've changed the colours of some of your lightmaps and they all seem to work as they should. Nothing comes up as white unless I make the lightmaps white. I have no idea why they don't work for you.

Edit2

Here's a screenshot (I changed your code quite a bit but that has nothing to do with the present issue):

Levanthus
23
Years of Service
User Offline
Joined: 17th Apr 2003
Location: Cumbria, UK
Posted: 4th Jun 2010 03:23 Edited at: 4th Jun 2010 05:03
yes there was "Meant" to be a red light in there and the room was meant to be dark which is why i was curious as to why it was showing as white. Oddly, and i'm not sure why i didn't think of this before, but i just ran my program and files on my laptop and it seems to work ok-ish, still not quite right but getting there.

*edit*

ok wierdly, i uninstalled DB pro after my AVG killed it, and then re-installed it, now when i load up a "lit" object it's mostly black despite having put 3 lights in it i just get one circle at one end of the room

this is what i get in Darklights after lightmapping and saving


and this is what when i use the above model in my program


Windows 7 64 bit, AMD Phenom II x4 Black edition, 4 GB Ram, Radeon HD 4650, 540 GB HDD

I can see from your smile, you're not here for the sunset.

Login to post a reply

Server time is: 2026-07-25 16:19:24
Your offset time is: 2026-07-25 16:19:24