View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003840 | The Dark Mod | Coding | public | 05.09.2014 00:57 | 31.08.2022 14:50 |
Reporter | Springheel | Assigned To | |||
Priority | normal | Severity | normal | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | TDM 2.07 | ||||
Summary | 0003840: Shadow transition lags on movable light entities | ||||
Description | When you turn off a movable lantern or extinguish a candle, the entity switches from nonshadowcasting to casting a shadow. However this happens several frames after the light is extinguished. The adding of projected shadows has made this more obvious. | ||||
Tags | No tags attached. | ||||
The delay is nec. to prevent artefacts. The light is not flipped off, but faded out, and during that time it still casts shadows, which get increasingly less strong until the light is really off. If the shadow is turned on in the same frame the light is extinguished, then the light will still casting a shadow from the holder for a few frames, which creates a noticable "blink" of the light holder shadow. |
|
Addendum: The delay between switching the light source and the shadow shouldn't be longer than it takes the light to fade, but also not shorter (or the shadow flickers briefly). For the hard shadows themselves there is not much that can be done, as shadows are binary - either on or off. If the projected shadow is a blend light, tho, then this light could be faded in/out instead of just being flipped on or off. That would hide the transition between the states. |
|
The projected shadows should probably operate the same as the light itself. |
|
There are only two delays in tdm_lights.script - one for torches (500ms) and one for electric lights (50ms). If you see the issue primarily with moveable candles, maybe these just need their own delay, like 250 ms? If you play around with these constants in tdm_lights.script, it might be apparent what works better: // When a shadow is switched on/off, this delays the switch by so many ms: #define SHADOW_SWITCH_DELAY_TORCH 500 #define SHADOW_SWITCH_DELAY_ELECTRIC 50 There is also the issue that there is only one delay for turning on the light and for turning it off. It might be that one case needs a longer/shorter delay to look better. The real solution would be to figure out how long the light actually fades in/out and then to use that delay * 0.9 for the shadow transition. But this is complicated, as the light holder would need to figure this out for all attached flames/lights. |
|
I believe this has been fixed, will check and close. | |
This was fixed a long while ago. | |
Date Modified | Username | Field | Change |
---|---|---|---|
05.09.2014 00:57 | Springheel | New Issue | |
06.09.2014 13:24 | tels | Note Added: 0006943 | |
06.09.2014 13:36 | tels | Note Added: 0006944 | |
06.09.2014 17:32 | Springheel | Note Added: 0006945 | |
06.09.2014 21:13 | Springheel | Note Edited: 0006945 | |
05.10.2014 11:06 | tels | Relationship added | related to 0003826 |
05.10.2014 11:16 | tels | Note Added: 0007054 | |
28.03.2018 15:59 |
|
Assigned To | => user81 |
28.03.2018 15:59 |
|
Status | new => assigned |
28.03.2018 16:00 |
|
Note Added: 0010312 | |
22.12.2018 09:56 |
|
Note Added: 0011026 | |
22.12.2018 09:56 |
|
Status | assigned => closed |
22.12.2018 09:56 |
|
Resolution | open => fixed |
22.12.2018 09:56 |
|
Fixed in Version | => TDM 2.07 |
31.08.2022 14:50 | nbohr1more | Relationship added | related to 0006088 |