What is destruction depth of destructable meshes good for ?
Why would I want to use this ?
Can I combine different depths in one mesh at the same time ? ( And if so how ? )
Unreal Docs – 1.4
That doesn’t answer anything… really! --I know this page and the tutorials.
You should download PhysX Lab and play with it to find out.
https://developer.nvidia.com/apex-destruction-physxlab-tutorials
You’re question is answered in the majority of those videos, including the first, and has been answered a few times in this answerhub.
To answer my own questions:
It’s good for destructible objects that get hit several times after another. The depth sets the layers of destruction which results in nice effects. For example a destroyable wall gets hit by a rocket. The first rocket breaks ( parts of ) the wall to depth 1 chunks. When a second rocket is fired and hits the depth 1 chunks these depth 1 chunks break into smaller pieces: depth 2 chunks. As long as rockets hit the chunks this goes on until the max depth is reached.
One objects can consist of several depths a the same time after it and it’s chunks were partly destroyed.
BUT the depth settings are always per object. So for one object you can’t define different depths for different parts of the object in PhysXLab. The depths always apply for the whole object… and not only areas of it.
The depth of destructive meshes (DM) defines the amount of layers those DMs have. Typically, each depth has multiple parts per part, and those are all represented by sockets like a skeletal mesh.
For a visual representation, imagine a DM is a bag filled with marbles.
If the DM has a depth of 1, it’s a single bag filled with some marbles. When the bag is broken, it will release its content of marbles.
If the DM has a depth of 2, it’s a bag of marbles that contains bags filled with marbles. When the first bag is broken, it releases the bags of marbles it contains. If any of those bags are broken, they will release their contents (marbles in this case).
This can go up to 5 layers deep with Apex DMs.
If you are using depth support, marble bags will stick to other marble bags they are next to if they are of the same layer or lower. Using this with world support, you can get a crumbling tower of marble bags that can be broken apart rather than just falling over after the first bag is broken.
Why use depth with DMs? Because you want greater detail from your DMs when they are broken. You can see examples of this in Ark, where rocks brake apart in one go, and Conan Exiles, where parts of the rock are broken and disappear before the whole rock is broken; the difference between 1 layer with no support and 3 with support.
Be warned though, DMs have a limit to the number of parts they can have and can get very costly quickly. For example, a DM with a depth of 3 at 9 slices per depth will have 729 parts; all dynamic, drawn, and calculated every frame after the first is broken.
Marbles are not a good example because a marbles would all at once fall off the bag when it opens. But the pieces in the “bag” stick together until a force disconnects them.
The object would already consist of 729 parts at a depth of 2 because the original object that consists of one piece is depth 0.
I don’t think that the engine has to handle all parts of all depths after you broke off only one piece of the depth 1 chunks. I believe it is pretty dynamic and only breaks the parts it needs to calculate and display. So this would be more of a worse case scenario that the engine has to handle e.g. all 729 chunks of an object with two depths and two slices for each of the three axis / depth…
How do we increase the depth level? I have no idea and I’m currently using version 4.18.2
Ahhh, just answered my own question for anyone curious:
“Destructible Actors can be generated within Unreal Editor 4 using Voronoi with a single depth level. APEX Destructible assets with more than one depth level or using a function other than Voronoi to shatter the mesh, must currently be generated in the APEX PhysX Lab.”