I would like to ask the culling method for HISM instances while rendering RVT. I can only find a simple sphere/frustum check for the component in RuntimeVirtualTextureRender.cpp GatherMeshesToDraw, that is not ideal when the number of instances is large
Hi Marco,
Thanks for reaching out. Could you let me know why you’re using HISMs in 5.6? Our general recommendation has been for people to use Nanite meshes instead, since that gives better culling performance at a more granular level.
Because Nanite doesn’t support writing to RVTs and because our target platform does not support Nanite. Do ISMs properly cull when writing to RVTs without Nanite?
Yes, ISMs have improved per-instance GPU culling and LoDing for a few versions, which is why we recommend them over HISMs.
This seems different from the answer [Matt [Content removed] gave in thread “questions-on-best-practices-for-nanite-lod-interaction-and-ismhism-combination”.
I’m sorry for the confusion, but the information I got from the development team is more up-to-date. You can verify this information by setting up a small test scenario and measuring the outcome.
ISMs with nanite meshes AND “Use Gpu Lod Selection” enabled seems to work as you said (in 5.6.1 in main render): LOD is chosen for each instance independently.
Lod Coloration debug mode is broken.
When writing to RVT however, only LOD 0 is used. I don’t know if instance culling works.
If “Use Gpu Lod Selection” is disabled, old rendering is path taken: all instances are rendered with the same lod.
When using HISMs, the old rendering path is taken: lod is chosen per sector. “Use Gpu Lod Selection” seems ignored. Lod Coloration debug mode is working.
The issue with RVT is still present on ISMs and HISMs: the code will render lod 0. I don’t know about instance culling.
GPU instance culling on ISMs offer a performance win on slow platforms too (such as PS4 or SW2)?
I attached the test project.
Hi Marco,
I can confirm that ISMs are not being culled or LoDed per instance for Runtime Virtual Textures, neither on the CPU nor the GPU, so the behavior you see in the sample project is as intended. We want to add support for this in the future, but we are currently working on some other high-priority items, so it will take some time until we have official support. I did raise your concerns with the development team, though, to give this item more visibility.
GPU instance culling on ISMs offer a performance win on slow platforms too (such as PS4 or SW2)?
For the most part, you should see performance gains with ISMs over HISMs even on low-end hardware. However, there is a special edge case for platforms when using the mobile renderer. Heavily instanced geometry, such as grass, can cause the mobile renderer to allocate overly large intermediate buffers, leading to increased memory pressure. This can be mitigated by adjusting your content, though.
I hope this answer helps, but please let me know if anything is unclear.
I moved the RVT volume to cover just 1 instance of the ISM in the attached project. A PIX capture shows that the vertexshader has been invocated 494951 times, so all 1089 instances (and their 323 vertices) have been processed. So I think ISMs do not properly cull instances in RVTs, even when “Use GPU Lod Selection is enabled”.
The same seems to happen on HISMs.
Can you conferm this issue on your side? Are there any plan to add this? Thanks.