I’m trying to build a game where the entire terrain is destructible. For instance, if a projectile hits any part of the ground, it should break up into fragments in a realistic way and leave a crater.
I’ve experimented with this idea using the Rapier physics engine by modeling the terrain as small blocks (like a hill of very coarse sand). The realism of the physics is realistic and convincing. For a demo, see the “heightfield” example here: rapier.rs/demos3d/index.html
Before I port the prototype to Unreal, I would like a better understanding of what the Chaos Engine is capable of, and whether it supports what I’ve been doing with Rapier. However, all of the Chaos examples I’ve seen show destructible objects, but not the entire terrain as destructible. Is this kind of terrain physics feasible? Any links to relevant documents or examples would be appreciated. Thanks!
Simple answer: No.
What you want is Voxel. And a different engine probably.
A whole lotta nothing. At a performance thats 40% worse than PhysX which could do stuff.
Hey there @trevorharmon! Welcome to the community! Chaos was built for smaller to medium scale destruction for the most part, so terrain size destruction is a bit more than ambitious. Performance wise, base chaos destruction isn’t going to work well for your use case without modification. I’d recommend making a massive cube and just dig into it with Chaos destruction. You’ll quickly find that even when the geometry collections settle and go to sleep, that performance gets harder to manage.
Since you’re mentioning you would be porting Rapier, I assume you have experience with writing physics systems, and you may be able to handle the performance concerns a bit better. Generally developers tend to work with Voxels with marching cubes to pull off what you’re intending, as static locations on a grid for the verts make performance far more manageable at the cost of custom fracturing and having to fake more of the pieces aspects.