View Issue Details

IDProjectCategoryView StatusLast Update
0005843The Dark ModCodingpublic17.09.2022 08:51
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeveritynormalReproducibilityalways
Status assignedResolutionopen 
Product VersionTDM 2.09 
Target VersionTDM 2.11 
Summary0005843: Dmap computes wrong shadows on version 4 of NHAT
DescriptionDmap precomputes shadow volumes for world geometry.
These volumes are shown when r_useOptimizedShadows is enabled and stencial shadows are used.

Testing shows that new version of "No Honor Among Thieves" has a lot of broken shadows near the start of the first mission.
It seems that they go away if one disabled the aforementioned cvar.
TagsNo tags attached.

Activities

Bikerdude

Bikerdude

17.12.2021 15:40

reporter   ~0014595

Once the xmas contest map is done I can take a look and see which light/s or entities have the "r_useOptimizedShadows" on and remove it.
stgatilov

stgatilov

24.01.2022 16:06

administrator   ~0014691

No difference on "dmap_compatibility 209"
It is quite likely that the issue started happening long time ago...
stgatilov

stgatilov

24.01.2022 16:26

administrator   ~0014692

Last edited: 24.01.2022 16:29

The issue happens on the kind of lights shown on the screenshot.
It seems that it only happens in the starting area (maybe because it has larger coords).
I flew around the map and did not find any more issues, even where seemingly the same lights are used.

The problem here is the grid occluder, which consists of many thin wires very close to the light source.
Dmap processing makes them slightly non-closed, which can have ill influence of the generated shadow volumes.
It is still interesting why only precomputed shadows suffer from this problem.
The runtime shadows are usually generated with another algorithm (turbo shadows), maybe it is more resistant to problems of occluding geometry.

By the way, I saw similar problems on Painter's Wife in the sewers section (large round vertical room with lots of water) happening on the same kind of light source.
I think we should get rid of it somehow... is it a prefab?

I suppose several workarounds can fix the problem:
1) Convert the grid into model (or better create a brand new model which is perfectly closed).
2) Set "noPrelight" "1" spawnarg on the light entity to stop dmap from precomputing its shadows (runtime generation seems to work fine).
stgatilov

stgatilov

17.09.2022 07:13

administrator   ~0015250

Ok, the problem is in non-turbo shadow volume generation, not in dmap.
Because if I set:
  r_useOptimizedShadows 0
  r_useTurboShadows 0
  reloadModels
Then the engine regenerated shadows in runtime using the non-turbo algorithm, and I see the same issues.
But with turbo algorithm (which uses the same model) shadow volume is perfect.
Bikerdude

Bikerdude

17.09.2022 08:50

reporter   ~0015252

Thanks for looking into this fella.

Issue History

Date Modified Username Field Change
17.12.2021 15:37 stgatilov New Issue
17.12.2021 15:37 stgatilov Status new => assigned
17.12.2021 15:37 stgatilov Assigned To => stgatilov
17.12.2021 15:40 Bikerdude Note Added: 0014595
24.01.2022 16:06 stgatilov Note Added: 0014691
24.01.2022 16:26 stgatilov Note Added: 0014692
24.01.2022 16:26 stgatilov File Added: nhat3_wrong_precomputed_shadow_volumes.jpg
24.01.2022 16:29 stgatilov Note Edited: 0014692
17.09.2022 07:13 stgatilov Note Added: 0015250
17.09.2022 08:50 Bikerdude Note Added: 0015252
17.09.2022 08:50 Bikerdude Description Updated
17.09.2022 08:51 Bikerdude Reproducibility have not tried => always