View Issue Details

IDProjectCategoryView StatusLast Update
0005886The Dark ModCodingpublic23.01.2022 10:31
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Product VersionTDM 2.10 
Target VersionTDM 2.11 
Summary0005886: Add BVH-based optimization for whole-surface processing in renderer frontend
DescriptionThere are several places in renderer frontend which processes the whole model's surface every frame:
  1) R_CreateLIghtTris filters only triangles which intersect light volume for light-entity interaction.
    Without doing that, backend will have to render whole model per every light touching it.
  2) R_CreateShadowVolume generates shadow volume from the whole mesh.

Sometimes there are large models (e.g. terrain) spanning large area, which are illuminated by many small lights.
This quickly becomes performance problem.

We can build BVH tree for large models, and use them to accelerate processing.
Instead of processing the whole model every time, traverse BVH tree: prune nodes fully unnecessary, accept whole nodes fully necessary, subdivide questionable ones.
Steps To ReproduceA) The issue happens on the first beta version of Moving Day by Jedi Wannabe.
That's starting location: there is one huge model with boulders, and many moving lights inside bounding box.

B) The same problem happens in Black Mage in the lava cave.
Once again, the first beta version has this issue accented, since later versions have terrain patch split into several pieces.
Additional InformationOriginal discussion here:
  https://forums.thedarkmod.com/index.php?/topic/21217-bvh-in-model-surfaces
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
23.01.2022 10:31 stgatilov New Issue
23.01.2022 10:31 stgatilov Status new => assigned
23.01.2022 10:31 stgatilov Assigned To => stgatilov