View Issue Details

IDProjectCategoryView StatusLast Update
0005189The Dark ModCodingpublic22.11.2021 14:06
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityN/A
Status assignedResolutionopen 
Product VersionTDM 2.08 
Target VersionTDM 2.11 
Summary0005189: noshadows mask spawnarg for shadows optimization
DescriptionThe 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.

OLD:
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 InformationSee discussion:
  https://forums.thedarkmod.com/index.php?/topic/21106-mirceakitsune-ambient-light-and-noshadows/
OLD:
  https://forums.thedarkmod.com/index.php?/topic/20224-arealock-keyword/&do=findComment&comment=444731
TagsNo tags attached.

Activities

Dragofer

Dragofer

30.09.2021 18:27

developer   ~0014381

The spawnarg could be renamed from shadowworldonly to i.e. noshadows_entities (1 = entities cast no shadows, but worldspawn still casts shadows).
Advantages:
- 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)
stgatilov

stgatilov

01.10.2021 02:54

administrator   ~0014383

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".

Issue History

Date Modified Username Field Change
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