View Issue Details

IDProjectCategoryView StatusLast Update
0003126The Dark ModDef / Setuppublic05.10.2017 22:06
ReporterSpringheel Assigned ToSerpentine  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status closedResolutionunable to reproduce 
Product VersionSVN 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0003126: Electric light entities emitting white flash when lit/unlit
DescriptionWhen any of the yellowish electric lights get turned on, there is a sudden bright flash of white light like a flashbomb going off. Oddly, it doesn't happen on the blue-white lights.

For each of these lights, I'm seeing the bright white flash a moment before the light comes on:

atdm:lamp_electric_square_1_lit
atdm:lamp_electric_outdoor_down_lit
atdm:lamp_electric_shaded_lit

If you're getting a pure white flash, it might be something dividing by zero or a null.

Looking at the materials, it seems lights/lightgratelight_snd was missing. I re-added it, this should fix the broken white lights. Does it also fix the white flash?
TagsNo tags attached.

Activities

Springheel

Springheel

11.05.2012 00:41

administrator   ~0004567

As of 12852, the flash still occurs.
Springheel

Springheel

17.05.2012 01:01

administrator   ~0004581

What is the difference between these two lamp entities? The first emits the white flash when switched on and off, and the second does not. I can't see a single significant difference between them. :wacko:

--------------------------
entityDef atdm:streetlamp_square_01_lit
{
"inherit" "atdm:static_electric_light_lit_base"
"model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlamp_01.ase"
"editor_setKeyValue model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlamp_01.ase"
"editor_displayFolder" "Lights/Model Lights, Static/Switchable/Streetlamps/Electric"
"skin" "lights/streetlamp01_colorme"
"skin_lit" "lights/streetlamp01_colorme"
"skin_unlit" "lights/streetlamp01_unlit"
"editor_usage" "A lit standing street lamp with a square top. Can be switched on and off."
"light_center" "0 0 93"
"editor_setKeyValue light_center" "0 0 93"
"_color" "0.46 0.46 0.66"
"noshadows" "0"
"noshadows_lit" "1"
}


------------------------------------------
entityDef atdm:streetlamp_spot_lit
{
"inherit" "atdm:static_electric_light_lit_base"
"model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlampspot.ase"
"editor_setKeyValue model" "models/darkmod/lights/non-extinguishable/streetlamps/streetlampspot.ase"
"editor_displayFolder" "Lights/Model Lights, Static/Switchable/Streetlamps/Electric"
"skin" "lights/streetlampspot_colorme"
"skin_lit" "lights/streetlampspot_colorme"
"skin_unlit" "lights/streetlampspot_unlit"
"editor_usage" "A lit standing street lamp with a shade on top, creating a square light spot. Can be switched on and off."
"light_center" "-16 0 100"
"editor_setKeyValue light_center" "-16 0 100"
"texture" "lights/biground1"
"_color" "0.46 0.46 0.66"

"noshadows" "0"
"noshadows_lit" "1"
}
Springheel

Springheel

17.05.2012 01:43

administrator   ~0004582

Ok, so the problem has something to do with this texture, that is inherited by most electric lights:

"texture" "lights/biground1_streetlamp_4fold_snd"

Here's the shader it refers to:

Quote
lights/biground1_streetlamp_4fold_snd
{
{
forceHighQuality
map textures/lights/biground1_streetlamp_4fold
red Parm0 / (sound*sound)
green Parm1 / (sound*sound)
blue Parm2 / (sound*sound)
zeroClamp
}
}

The sound used is: "s_shader" "light_flicker_104"
Springheel

Springheel

21.05.2012 12:40

administrator   ~0004603

I am pretty sure it is a subtle code change (and my bet would be one from Serpentine) that changes the way "infinity" is handled. E.g. in the very first stage, the sound value is 0, and something (light value?) gets divided by zero, instead of 1 or something, so the resulting light level is "infinity", which gets clipped to white. But impossible to say w/o knowing which revision introduced the problem.
Serpentine

Serpentine

27.05.2012 04:53

updater   ~0004631

Going to take a look at this, I seem to remember that when it was first noticed I tested a revision from before render changes and it was still present.

Either way, it's something that needs to be fixed.
Serpentine

Serpentine

31.05.2012 05:01

updater   ~0004641

I have applied a temporary fix for the 1.08 testing, I will resolve it more completely in the future.
Springheel

Springheel

02.06.2012 15:41

administrator   ~0004653

Is this uploaded yet? I'm still seeing the flash.
Serpentine

Serpentine

03.06.2012 18:13

updater   ~0004654

The temp workaround is acceptable for 1.08 - might need to tweak the exact value. Suspended the task and will target for 1.09.
grayman

grayman

05.06.2012 19:16

viewer   ~0004656

Exactly where is the workaround? In the support files? In the engine?

With the engine and dll I built late Sunday night, I still see the white flash. This was after Serps' comment "I have applied a temporary fix for the 1.08 testing".
Serpentine

Serpentine

05.06.2012 19:32

updater   ~0004657

Sorry, its fixed in the commit from last night regarding division by 0, in material.cpp.

There are actually two bugs in here, the previous one was from lights which were not getting a soundshader set from an entity, the second is the triggering of an entity to be on, but in the same frame that it is turned on, the sound is not yet at a position where a sample is valid. Both are now resolved.

But both are now resolved, as well as I'm sure other errors in materials which could try to divide by 0.
grayman

grayman

05.06.2012 20:03

viewer   ~0004658

Rebuilt with the new changes and the flash is gone. I tested 3 different electric lights that had the problem.

Committed a new engine and windows dll in rev 13000.

Issue History

Date Modified Username Field Change
11.05.2012 00:34 Springheel New Issue
11.05.2012 00:41 Springheel Note Added: 0004567
11.05.2012 00:41 Springheel Product Version => TDM 1.08
11.05.2012 00:41 Springheel Target Version => TDM 1.08
17.05.2012 01:01 Springheel Note Added: 0004581
17.05.2012 01:43 Springheel Note Added: 0004582
21.05.2012 12:40 Springheel Note Added: 0004603
27.05.2012 04:52 Serpentine Assigned To => Serpentine
27.05.2012 04:52 Serpentine Status new => assigned
27.05.2012 04:53 Serpentine Note Added: 0004631
31.05.2012 05:01 Serpentine Note Added: 0004641
02.06.2012 15:41 Springheel Note Added: 0004653
03.06.2012 18:13 Serpentine Note Added: 0004654
03.06.2012 18:13 Serpentine Status assigned => suspended
03.06.2012 18:13 Serpentine Product Version TDM 1.08 => SVN
03.06.2012 18:13 Serpentine Target Version TDM 1.08 =>
05.06.2012 19:16 grayman Note Added: 0004656
05.06.2012 19:32 Serpentine Note Added: 0004657
05.06.2012 20:03 grayman Note Added: 0004658
05.10.2017 22:06 nbohr1more Status suspended => closed
05.10.2017 22:06 nbohr1more Resolution open => unable to reproduce
05.10.2017 22:06 nbohr1more Fixed in Version => TDM 2.00
05.10.2017 22:06 nbohr1more Target Version => TDM 2.00