View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005189||The Dark Mod||Coding||public||22.03.2020 02:19||05.12.2022 19:34|
|Product Version||TDM 2.08|
|Target Version||TDM 2.12|
|Summary||0005189: noshadows mask spawnarg for shadows optimization|
|Description||The engine has "noshadows" spawnarg for lights, which makes the light rays pass through everything.|
This keyword is often used to optimize away shadows drawing, which is often pretty expensive, especially for complex geometry with stencil implementation.
However, this keyword makes the light pass through brush walls (which is undesirable for mappers) and hence disables some useful area/portals optimization (performance).
The new idea is to allow players define "groups" of entities (as well as have some builtin groups), and allow to disable shadow for every light+group individually.
So, the lights get a new spawnarg "noshadows_mask", which contains the set of groups to not cast shadows from.
And the entities get a new spawnarg "shadow_groups", which specifies one (or even several) groups the entity belongs to.
The idea is to add "shadowworldonly" spawnarg for such optimization purposes.
For a light with this spawnarg, shadows from worldspawn brushes (and patches) are enabled, but shadows from any entities (and models) are disabled.
This greatly reduces shadow drawing complexity, makes lights behave in a well-defined way (stable w.r.t future engine changes), and allows to use visportal-related optimizations (like light flow and interaction culling, including 0005172).
|Additional Information||See discussion:|
|Tags||No tags attached.|
The spawnarg could be renamed from shadowworldonly to i.e. noshadows_entities (1 = entities cast no shadows, but worldspawn still casts shadows).
- similar to the existing and commonly used "noshadows" spawnarg, so hopefully easier to remember
- imo it better indicates that, effectively, this new spawnarg turns off shadows for entities (technically worldspawn is entity 0, but I think mappers don't think of it as an entity)
I have rewritten this proposal in terms of shadow masks.
Since world geometry would have built-in group 0, "noshadows_entities" will simply be "noshadows_mask" "0".
Found the same idea in Unigine Engine:
but on a larger scale =)
|22.03.2020 02:19||stgatilov||New Issue|
|22.03.2020 02:19||stgatilov||Status||new => assigned|
|22.03.2020 02:19||stgatilov||Assigned To||=> stgatilov|
|22.03.2020 02:22||stgatilov||Additional Information Updated|
|05.12.2020 12:33||stgatilov||Target Version||TDM 2.09 => TDM 2.10|
|30.09.2021 18:27||Dragofer||Note Added: 0014381|
|01.10.2021 02:53||stgatilov||Summary||shadowworldonly light keyword for shadows optimization => noshadows mask spawnarg for shadows optimization|
|01.10.2021 02:53||stgatilov||Description Updated|
|01.10.2021 02:53||stgatilov||Additional Information Updated|
|01.10.2021 02:54||stgatilov||Note Added: 0014383|
|22.11.2021 14:06||stgatilov||Target Version||TDM 2.10 => TDM 2.11|
|25.07.2022 18:02||stgatilov||Relationship added||related to 0005880|
|17.10.2022 06:28||stgatilov||Note Added: 0015340|
|17.10.2022 06:44||stgatilov||Note Edited: 0015340|
|05.12.2022 19:34||nbohr1more||Target Version||TDM 2.11 => TDM 2.12|