View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000563 | The Dark Mod | Coding | public | 03.02.2008 08:34 | 15.07.2021 23:19 |
Reporter | crispy | Assigned To | SteveL | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | no change required | ||
Product Version | SVN | ||||
Summary | 0000563: Add ability to turn off shadow-casting for distant lights (optimization) | ||||
Description | Performance is heavily impacted by shadow-casting lights. Portalizing well to prevent too many such lights from being rendered simultaneously is the traditional solution, but this may not be practical in certain outdoor environments. Furthermore, in a large outdoor environment, there may be little point in rendering shadows cast by distant lights; the player probably won't notice, and it won't affect gameplay since the player would not be relying on those shadows to stealth. Therefore, there is a desire among mappers to be able to disable shadowcasting on lights which are some distance away. | ||||
Additional Information | Crispy's suggested implementation: Add a spawnarg to lights controlling the distance past which the light becomes non-shadow-casting. Defaults to 0, meaning this feature is turned off. When the light spawns, if its spawnarg is nonzero *and* it is normally shadow-casting, then add it to a global linked list. Remember to remove it from the list when it is destroyed, and remember not to enable this feature on lights which don't cast shadows anyway. Every few seconds, iterate the global linked list and turn shadow-casting on the light on/off appropriately (idLight::renderLight->noShadows). | ||||
Tags | No tags attached. | ||||
SEED \ LOD related? | |
Yes, good find. I'll assign it to myself and see that some appropriate spawnarg is added. The Think() routine in lights should then take care of that. | |
Trying to find a mapper workaround... Is there a way to collect the LOD transition by script such as <example_entity>.getKey ? You can switch the shadows off on lights via the <example_entity>.setShader script. You can also get the distance via: distance = $player1.distanceTo($<example_entity>); but I think it would be a tad expensive... |
|
Looks like some related changes exist in SVN. Is this issue closed? | |
This can already be done by LOD, don't know if there is another method. | |
I vote close it. The mapper control side is amply fulfilled by LOD, and we don't want any more automated interference. There are already enough problems with parallel moonlights glitching because of other optimizations that cut out a light's interactions if it's more than a couple of visleafs away. LOD gives the designer full control over the distance->shadowcasting equation. | |
Yeah, the only relevant issue I see standing is tracker: http://bugs.thedarkmod.com/view.php?id=3238 which is not about shadow-casting but "light existence". It would be cool if LOD\Hide Distance could control that. |
|
That's already fixed for 2.03 :) Normal lights with brightness 0 0 0 never generated interactions anyway so it affects only blendlights, as Tels notes in that tracker. Fix 0003752 makes blendlights turn off too when they get an Off() signal, or fade to zero "brightness". | |
I'd vote close this bug without action, too. Distant lights can be managed with LOD, so there is no need for another automated way, which would only interfere with lights like moonlight etc. | |
Note for nbohr1more: entity existance based on distance can already be managed with SEED (culling of entities), so this should already be covered. | |
Date Modified | Username | Field | Change |
---|---|---|---|
03.02.2008 08:34 | crispy | New Issue | |
22.02.2011 01:25 | nbohr1more | Note Added: 0003632 | |
22.02.2011 07:13 | tels | Note Added: 0003635 | |
22.02.2011 07:13 | tels | Assigned To | => tels |
22.02.2011 07:13 | tels | Status | new => assigned |
22.02.2011 07:13 | tels | Status | assigned => acknowledged |
22.02.2011 07:13 | tels | Target Version | => TDM 1.05 |
13.03.2011 12:32 | tels | Assigned To | tels => |
14.03.2011 11:09 | greebo | Target Version | TDM 1.05 => |
17.02.2013 21:07 | nbohr1more | Note Added: 0005069 | |
14.09.2014 18:01 | nbohr1more | Note Added: 0006995 | |
14.09.2014 19:18 | Springheel | Note Added: 0006997 | |
14.09.2014 19:39 | SteveL | Note Added: 0006998 | |
14.09.2014 20:25 | nbohr1more | Note Added: 0006999 | |
14.09.2014 21:38 | SteveL | Note Added: 0007003 | |
15.09.2014 09:59 | tels | Note Added: 0007006 | |
15.09.2014 10:00 | tels | Note Added: 0007007 | |
15.09.2014 17:45 | SteveL | Status | acknowledged => closed |
15.09.2014 17:45 | SteveL | Assigned To | => SteveL |
15.09.2014 17:45 | SteveL | Resolution | open => no change required |
30.12.2020 23:38 | nbohr1more | Relationship added | has duplicate 0005478 |
15.07.2021 23:19 | nbohr1more | Relationship added | has duplicate 0005668 |