Lighting Woes [Solved]

Everything around the Descent level editor

Moderators: Frustikus, Aus-RED-5

User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Lighting Woes [Solved]

Postby Yokelassence » Fri Jun 06, 2008 2:36 am

Myself, from the future wrote:I just wanted to point out for anyone else who gets this bug that the culprit for me had been the "Apply Lighting" button all along. I was clicking this after every lighting change.

I found out some time ago that the Apply lighting button was screwing with the .clr file. My theory is that it was overwriting the lighting data that D2X-XL had applied and replaced it with D1 lighting data.

If you want to "Apply lights", just save the map. Lights are automatically and properly applied during the saving process and you wont get the blackout bug described in this thread or white lights.

The "reset lighting defaults" button in the latest version of the editor also really helped eliminate the blackout bug. Just be aware there are a few specific light textures that get set to 0 when using the defaults but you can change that yourself easily.

The blackout bug still persists however; If I load a map about 3 times in a row then all the lights spontanously fail but restarting D2X-XL reverts that. At least now I found the problem and it can be easily fixed


I may have found a bug with DLE-XP, if not then this was caused by newbiness

I have somehow managed to eliminate all coloured lights from all of my levels.

  • Green lights are white
  • Red lights are white
  • Lava is white


and so on...all complete with white corona's too.

This started after I tried to change the colour of a single light from default to pale green, when I loaded the map the entire place was pitch black, not a single light in the entire mine.

All I did was change 4 lights out of a total of hundreds in the mine.

Next I deleted the changed lights and replaced them with lights that had the default settings.

I loaded the map again and the lights worked this time, however all of them produced white light only.

I carefully checked my map settings, there does not seem to be any that define light colour and I am pretty sure I did not change the default settings of any lights.

I checked other maps to make sure this was not a D2X-XL bug, sure enough coloured lighting is working just fine in every other mission except mine.

Once more the problem appears to be viral; I installed a map with working coloured lights into my mission and to my surprise that level obtained purely white lights too.

If anyone might know something about this issue and has had it before I would like to know. I am already starting to miss the fiery orange hue generated by lava filled rooms.
Last edited by Yokelassence on Mon Oct 06, 2008 1:05 am, edited 3 times in total.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Postby karx11erx » Fri Jun 06, 2008 7:55 am

Please post a bug report on SF.net in the D2X-XL tracker.

Edit: Nothing in the code suggests there might such a bug. If importing a mission, make sure to import all auxiliary files (.lgt, .clr, .pog, .hxm) too, or you will run into problems like missing stuff.
User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Postby Yokelassence » Sun Jun 08, 2008 12:59 am

Hmm, that was a rather unexpected responce

I did not think this was a D2X-XL bug since coloured lighting still works...it just doesnt work in my mission.

I figured this was more of a personal err or a level editor bug, hence why I posted this here.

But here is a quick thought:
What would happen if I deleted the curret .lgt files? I presume DLE-XP may try to replace them and that may reset the lighting data back to normal...right?
Sirius
Posts: 1987
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Postby Sirius » Sun Jun 08, 2008 3:17 am

Usually. There are instructions on the descent2.de site regarding how to apply coloured lighting to levels (I think.) if you haven't already seen them - perhaps you could check that the right boxes are checked etc.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Postby karx11erx » Sun Jun 08, 2008 8:55 am

lgt only contains brightness values.

Please send the mission to karx11erx at hotmail dawt com.
User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Postby Yokelassence » Mon Jun 09, 2008 1:20 am

Very well, I shall send you the latest build hopefully by tomorrow

If it helps, I have also done some research for you and composed the following log:

The levels created: (1.12.80)
-At this point all lighting works fine in my mission file

The first attempt: (1.12.104)
-Changed a few lights in level 3 to a different color
Result: all lights went off in entire mine

Aftermath: to this date this level in particular is completely black even after numerous lighting builds and replacements. I did not mess with colored lighting again until a while later

The second attempt: (1.13.12)
-In level 1 of my mission I changed a few lights to another color, not the same color as last time.
Result: again all lights went off

-I deleted the changed lights
Result: the lights came back on but I noticed every color was white

Checking other levels: (1.13.12)
-I checked level 2 of my mission where colored lights still worked. I did not notice any differences except the level was made for Descent 2, not D2X-XL
-Made a block file of this level
-Added the geometry to a new D2X-XL level in my mission
-Copied over the .lgt file too
Result: all lights in this level turned white

Checking other missions: (1.13.14)
-Checked D2: counterstrike: level 1
Status: Colored lighting supported

-Checked D1: retribution base
Status: Colored lighting supported

-Modified the lighting in retribution base by adding excess lighting
Result: colored lighting is still supported

Conclusion: the renderer is having no trouble with colored lights, nor is my level editor adding defective ones. The problem remains isolated to my mission file

Testing and study: (1.13.14)
-Created a new D1 mission
Status: Colored lighting supported

-Created a new D2 mission
Status: Colored lighting supported

-Created a new D2X-XL mission
Status: Colored lighting is NOT supported

-Checked existing D2X-XL mission: Anthology
Status: Colored lighting supported

-Checked existing D2X-XL mission: Warp shockwave: level 1
Status: Coloured lighting supported

-Imported Warp Shockwave: level 1 into a new D2X-XL mission + new level
Status: Colored lighting supported in the warp shockwave level but not in the new one

-Copy pasted Warp Shockwave: level 1 geometry into the new level
Status: Colored lighting still not supported in new level

-Toyed around with the flickering lights in the Warp Shockwave level
Result: Flickering lights had no impact on the current situation

-Changed color of one light in the warp shockwave level
Result: change failed, light remained same color as always, however it did not destroy all lights in the level as what happened before, note that the light was colored by default and was flickering

-Changed the color or 3 more lights and also removed their flickering
Result: lights still remained same color...or at least their coronas did; the lights themselves no longer worked. Many other lights in the level also turned off but not all of them did.

-Reverted changed lights back to default color and turned flickering back on
Result: Colored lighting supported

-I realized that color changes may not apply to lights that are already colored by default.
So I applied color to some lights that were white by default, I also enabled flickering for those lights
Result: lights still remained same color...or at least their coronas did; the lights themselves no longer worked. Many other lights in the level also turned off but not all.

-Reverted changed lights back to the way they were
Result: Colored lighting supported

Conclusion:
No, I did not read the instructions on how to add coloured lights so that probably explains a bit right there, however that does not seem to be related to the "white light" problem

Rather it seems that any new level created since 1.13.12 will not support colored light. Even though some of my mission levels were created back in 1.12.80, they have all been rebuilt since then and that would explain why they inherited white light too. The exact cause of this issue remains unknown but I estimate it may be caused by DLE-XP mishandling lighting data in the newest D2X-XL level format
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Postby karx11erx » Mon Jun 09, 2008 8:49 am

I have just created a new level of type "D2X-XL" and added a single red light. I have red light in it with all lighting variants in D2X-XL (per vertex lighting with and without lightmaps, per pixel lighting).

Make sure to check "use texture colors" in the preferences dialog.

Make sure to turn on colored lighting in D2X-XL's light options menu.
User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Postby Yokelassence » Tue Jun 10, 2008 1:41 am

Colored light was enabled in D2X-XL but "use texture colors" was not

I just downloaded the latest version of DLE, previously I had .20

having said that I will attempt to build a few more test missions and make sure this all was not because of that one check box.

[EDIT]

Heres some more news:

Defining a custom light color suddently works now, it no longer blacks-out my entire mine.

So far I have used this to restore colored lights back to normal by manually defining a custom color for each light.

Interestingly I only need to color one texture at a time. The rest of the white lights with the same texture then inherit that color

New levels and missions still start off with colorless lights so this method is just a workaround rather than a solution but at least I have color back.
User avatar
Kaizerwolf
Posts: 390
Joined: Tue Dec 25, 2007 4:37 pm

Postby Kaizerwolf » Wed Aug 20, 2008 8:16 pm

i have this problem now too... When i put colored lights into DLE-XP, they work fine. Once i add white lights, everything but a few colored lights goes dark. Any options?
User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Postby Yokelassence » Sun Aug 24, 2008 1:34 am

Karx mentioned this in another thread but it sounded rather relavent to this case:

karx11erx wrote:Just make sure to assign the desired color to every light source in the level, because as soon as there is one light color set in the level's .clr file, D2X-XL won't apply default colors to any of the other light sources, assuming that the .clr file contains light colors deliberately set by the level author.


So...

1. first try adding a colored light to everything that should be colored, for white lights just remove color, you shouldnt need to apply white.

2. If you used a flickering light set to on to apply a light color, DO NOT remove the flickering light. Thats where I first started getting the blackouts

3. If you already removed all flickering lights, put them back in where they used to be.

4. Remove excess lights. I completely restored lighting in one level by getting rid of unneeded extra's.

In fact, too many lights seem to cause problems: not just light failures but also oversaturation, blinding lightmaps, low frame rates...

I still get this problem myself by the way. Still not entirely sure why it happens but if you follow the above 4 steps you should be able to mitigate the issue.
Sirius
Posts: 1987
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Postby Sirius » Sun Aug 24, 2008 10:36 am

I applied light colour 1 to white lights as I think Diedel suggested somewhere, because the default colour (0) is usually black or something. Might have worked anyway, but I didn't want to take chances with it.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Postby karx11erx » Sun Aug 24, 2008 11:31 am

Sirius wrote:I applied light colour 1 to white lights as I think Diedel suggested somewhere, because the default colour (0) is usually black or something. Might have worked anyway, but I didn't want to take chances with it.

Perfect advice.
User avatar
Yokelassence
Posts: 962
Joined: Sun Apr 06, 2008 1:54 am
Location: That country full of sheep.

Postby Yokelassence » Mon Aug 25, 2008 12:07 am

Hmm might try that. I think all my non-colored lights are set exactly to 0, most do turn out white but I guess that value is a bit of a wildcard.

I would still love to know how to get the default colors back.

Only one of my levels actualy use differently colored light.
Sirius
Posts: 1987
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Postby Sirius » Mon Aug 25, 2008 1:41 am

Get default colors back = delete .clr file from the HOG file. Seems to work for me at least.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Postby karx11erx » Mon Aug 25, 2008 7:55 am

Sirius wrote:Get default colors back = delete .clr file from the HOG file.

Yup.

Return to “DLE-XP Help”

Who is online

Users browsing this forum: No registered users and 1 guest