View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005886 | The Dark Mod | Coding | public | 23.01.2022 10:31 | 23.01.2022 10:31 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | assigned | Resolution | open | ||
Product Version | TDM 2.10 | ||||
Target Version | TDM 2.11 | ||||
Summary | 0005886: Add BVH-based optimization for whole-surface processing in renderer frontend | ||||
Description | There 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 Reproduce | A) 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 Information | Original discussion here: https://forums.thedarkmod.com/index.php?/topic/21217-bvh-in-model-surfaces | ||||
Tags | No tags attached. | ||||