Unfractured Destructible Meshes are too heavy on GPU
it appears that UNfractured Meshes render their fractured state even if it is visualized differently by the engine.
To test this you can slice a simple Mesh one time into 100 Pices in depth 2 (actually depth doesnt matter) and one time into 1000 pieces. While both these Meshes will be exactly the same, even in wireframe mode etc. the GPU will have a much higher load for the 1000 pieces mesh as its calculating millions of vertices for the fractured state.
This is a huge Issue and there shouldn't be any reason why it's necessary to render all vertices in the unfractured state.
A workaround is to add the staticmesh of your Destructible mesh to the Actors Component and have the Destructible invisible by default. Then add a Event "On Hit", disable your staticmesh and make the destructible visible before you apply Damage to it.
With Destructibles, you shouldn't be seeing any hit when it's not fractured, and this is what I'm seeing when I'm looking at my scene when I create several different ones (0, 25, 250, and 1000 chunks) and add them to the scene.
Everything is looking as I would expect. The biggest hit I get is when I simulate for one and have it fracture the rest that are placed because then all the chunks are there and being dynamically rendered. You have to keep in mind as well that APEX Destruction and Cloth (Nvidia tech) is all handled on the CPU and not the GPU. Most the hit likely from your GPU is coming from lighting and the draw calls from so many chunks.
If you've not already I would suggest starting with the documentation on GPU/CPU profiling for a more in-depth breakdown of what's happening in your scene:
Once you have a better breakdown feel free to post back here where the hang up is happening, but with destructibles, I would expect to see what I'm seeing in my scene which is Depth 1 is low cost because it's simple geometry (I'm using the Template_Floor.uasset btw), and when it fractures, whether the entire mesh breaks apart or not, Depth 2 replaced Depth 1 and is always rendered. Whether the mesh is broken apart full or not, these chunks are being dynamically lit and rendered as part of drawcalls for your scene. If the DM has a lot of chunks this will add up.
So at the moment, from what I have put together I'm seeing behavior I would expect.
answered Jun 20 '16 at 07:46 PM
Tim Hobson ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here