Popular Post stgatilov Posted July 24, 2022 Popular Post Report Posted July 24, 2022 When a light interacts with a surface, Doom 3 engine goes through all triangles of the surface in order to detect which ones are within light volume and front-facing. If the light constantly moves, then this processing has to done every frame. If stencil shadows are used, then engine has to look through triangles once again in order to build shadow volume. This implementation detail means that large static meshes with small dynamic lights nearby can be surprisingly slow. I think this issue happened several times recently: Black Mage: the lava cave Moving Day: rocks in the starting area The workaround was usually to split large mesh into several pieces. The latest dev build dev16574-10036 includes BVH-assisted filtering algorithm, which is enabled by default. It does the same job faster, without the need of touching clearly out-of-volume triangles. As far as I know, it totally solves the original problem, so you no longer need to be wary of how large your terrain mesh is. The new algorithm is enabled by two cvars, which can be changed at runtime: r_modelBvhLightTris r_modelBvhShadows Default values 3 and 1 mean precise filtering with BVH (default), zero values mean precise filtering using Doom 3 code. Note that the new algorithm reorders triangles in static meshes, so it has some influence even if you disable the above two cvars. The total kill switch which disables all BVH code is cvar r_modelBvhBuild, which must be set before starting mission. Here is a test map to show results (Bikerdude stripped for me from NHAT forest). All the terrain and stones are a single LWO mesh: 28 MB size, 127K vertices and 212 K triangles. P.S.: There is no performance difference on most existing missions. You can notice the difference only in critical cases. 7 5 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.