Hello people! I’m sorry for missing last weeks devlog — this week I got reminded of it.
Right now I am working on creating destructible meshes with the new Chaos destruction tool that has been added to Unreal Engine 5. The idea behind having destructible meshes in this case is having throwable and fragile items in the world (maybe a coffee mug, or a window) which you can break. It adds a lot of realism and interaction to a scene! It would also be possible to have larger structures crumble for cinematic effect.
Simon “Vito” Gustavsson
Chaos is so cool and satisfying when you get it to work — the keyword here being “when”.
There are dozens of settings for each component in the item which need to be tweaked in order for it to feel even slightly realistic.
The Chaos destructible meshes are built using something called a “geometry collection” — basically a collection of meshes. You then take a mesh and create a geometry collection from it by fracturing it into smaller pieces.
In order to make the mesh not explode into a million small pieces upon spawning, there are parameters settings for the amount of force a single fragment can withstand before breaking away from the larger mesh. There are also several parameters here for what is called “clusters”. A cluster is a smaller piece of a fracture fragment, which has its own thresholds for how much punishment it needs to be put under in order to break into even smaller pieces. In theory you can create a mesh that can be granulated an unlimited amount of times — but that isn’t very good for performance, one might suppose.
Now the fun part, actually destroying them!
To destroy a mesh we need to create some kind of force to make the object buckle under the pressure. There are several types of force you can apply.
One way is to create a “force field.” At the moment I have only tried a couple of them, but here are two examples:
The explosion is really cool, but I think the straining is even more impressive! It’s so well done, and makes me feel like we have come a long way regarding physics in video games. What impressed me was how the strain could get multiple outcomes depending on how the mesh crumbled under its own weight. Sometimes the middle part got so strained that it collapsed the other way (as seen in the two comparison videos).
I also accidentally scaled it and got some fun weird bugs — but it still looks cool, at the very least!
We will see how many of these will find their way into the final game, but at least you can expect some degree of destructibility in Mechanical Sunset!
Have a nice evening!
I’ll shatter if you don’t…
Don’t eat ten million bananas at once, worst mistake of my life.~ The Gumlin