View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005529 | The Dark Mod | Textures | public | 09.02.2021 12:29 | 04.01.2022 07:01 |
Reporter | Dragofer | Assigned To | duzenko | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.08 | ||||
Target Version | TDM 2.10 | Fixed in Version | TDM 2.10 | ||
Summary | 0005529: Projected lights can't use appropriate falloff images | ||||
Description | It does not appear to be possible to assign gradient falloff images to projected lights in TDM without major rendering bugs, mainly the light shining forwards and backwards and getting cut off depending on how the player's view is angled. This gets more severe the wider the beam is in relation to the length. This means that all projected lights in TDM use circular falloff images. This is also bad, since the light beam will have a constant light intensity until it abruptly cuts off to black at the end of its reach. Several assets depend on projection lights working correctly, most importantly the security camera. | ||||
Steps To Reproduce | I've attached: - a test FM with a rotating spotlight. The player starts in the intended light cone and is rotated so that he can also see the backwards light projection on the far side of the room. - a screenshot of the starting view in the test FM - a .jpg of the falloff image. The original .tga can be found in the FM's lights folder. | ||||
Additional Information | - I encountered this problem for the first time in 2016. - I believe the falloff image is rotated correctly, since all 3 other rotations cause the light to reach far longer than it should. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
The material def for the light is using the biground1 texture, was that intentional? lights/spotlight_security_camera { lightFalloffImage makeintensity( lights/falloff_gradient04 ) { forceHighQuality map lights/biground1 colored zeroClamp red ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm0 green ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm1 blue ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm2 } } Shouldn't it be using your custom projection image? : lights/spotlight_security_camera { lightFalloffImage makeintensity( lights/falloff_gradient04 ) { forceHighQuality map lights/spotlight_security_camera colored zeroClamp red ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm0 green ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm1 blue ((.02 * sintable [(time * ( 1 + Parm3 ) ) ]) +1.68) * Parm2 } } |
|
Ah yeah, I didn't mean to include my custom projection image in the .pk4. The problem is the same with either projection image. | |
Relevant post on code for projection lights by stgatilov here: https://forums.thedarkmod.com/index.php?/topic/20768-security-cameras/&do=findComment&comment=456655 |
|
I experimented with projection textures long time ago, so my memory might fail me, isn't the falloff image wrong? The falloff gradient should be billinear, so the light materials works for both omni and projected lights, as in the classic example: https://wiki.thedarkmod.com/index.php?title=File:LT_Projectedlight.png | |
Thanks for the suggestion to use bilinear falloff images for this projected light. Unfortunately it doesn't look like this is the way forward, here are the results: Gradient1 is dark in the middle. In the screenshot you can see the light cone has a dark stripe near the beginning, and it shines far further than expected along the side walls, while the far away end wall is dark as expected. It also shines forwards and backwards (not shown in this screenshot). Gradient2 is bright in the middle. In the screenshot you can see it has the same problem as other falloff images already used in TDM for projected lights: high light intensity until it abruptly cuts to black when the light's range ends. |
|
Committed fix for shining backwards to svn (new backend) | |
Added a more comprehensive fix in svn rev 9646. Aside from forbidding "antiworld" (w < 0), also forbid U, V, T getting out of [0..1] interval. |
|
@Dragofer Is this resolved now? |
|
Excellent: the security camera's projected light now fades out naturally near the end of its range and no longer shines backwards. Thanks very much for this. Setting to resolved. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
09.02.2021 12:29 | Dragofer | New Issue | |
09.02.2021 12:29 | Dragofer | File Added: test_proj.pk4 | |
09.02.2021 12:29 | Dragofer | File Added: falloff.jpg | |
09.02.2021 12:29 | Dragofer | File Added: falloff_gradient04.jpg | |
09.02.2021 12:30 | Dragofer | Relationship added | child of 0005528 |
09.02.2021 12:35 | Dragofer | Description Updated | |
09.02.2021 12:36 | Dragofer | Description Updated | |
09.02.2021 13:11 | nbohr1more | Note Added: 0013670 | |
09.02.2021 14:59 | Dragofer | Note Added: 0013671 | |
15.02.2021 09:09 | Dragofer | Note Added: 0013684 | |
04.03.2021 23:15 | Judith | Note Added: 0013761 | |
30.10.2021 09:19 | Dragofer | Note Added: 0014455 | |
30.10.2021 09:19 | Dragofer | File Added: gradient1.jpg | |
30.10.2021 09:19 | Dragofer | File Added: gradient1_problem.jpg | |
30.10.2021 09:19 | Dragofer | File Added: gradient2.jpg | |
30.10.2021 09:19 | Dragofer | File Added: gradient2_problem.jpg | |
30.10.2021 09:21 | Dragofer | Note Edited: 0014455 | |
30.10.2021 09:21 | Dragofer | Note Edited: 0014455 | |
30.10.2021 09:21 | Dragofer | Note Edited: 0014455 | |
30.10.2021 09:22 | Dragofer | Note Edited: 0014455 | |
30.10.2021 15:17 | duzenko | Note Added: 0014457 | |
01.11.2021 13:05 | nbohr1more | Assigned To | => duzenko |
01.11.2021 13:05 | nbohr1more | Status | new => feedback |
21.11.2021 06:40 | stgatilov | Relationship added | related to 0005815 |
21.11.2021 06:41 | stgatilov | Note Added: 0014557 | |
19.12.2021 05:18 | duzenko | Note Added: 0014599 | |
19.12.2021 12:37 | Dragofer | Status | feedback => resolved |
19.12.2021 12:37 | Dragofer | Resolution | open => fixed |
19.12.2021 12:37 | Dragofer | Fixed in Version | => TDM 2.10 |
19.12.2021 12:37 | Dragofer | Note Added: 0014600 | |
04.01.2022 07:01 | stgatilov | Relationship added | related to 0005860 |