Destructible objects in a racing game

Hello Everyone.

I am working on a racing game in Unreal engine 5. I am going to make it as realistic as I can. I am going to add destructible objects to the level like in forza horizon. Do you have any thoughts which technology will be the best? I know about chaos physics and destructible meshes. Just interesting to hear your suggestions. Thank you!

Don’t rely on Chaos.
In .27 Chaos, sure. It works. But with enough breakable objects in a scene it crashes.

All that Chaos does (I say all, but it’s a good amount of stuff when you do it manaually) is to grab a mesh, in engine, and break it apart based on whatever you manually choose.

The texturing isn’t perfect when it does this. But it does create manifold geometry.

The asset in the scene automatically breaks apart as it’s pieces are set to simulate physics.

You can do the same thing in blender.
Take a cube, fracture it up, uv map it correctly. Leave all the pieces in place so the engine assembles it for you.
When you import the mesh, it will import as a bunch of separate pieces.
Dragging the pieces in the scene will retain the cube shape.
Setting all the pieces to simulate physics will cause them to correctly simulate (assuming they have collision enabled properly).

Given all of that. Once you make your models you can simple swap out the single mesh for a bunch of mesh parts that share the same location as the original mesh.
The parts will then simulate as you’d expect.

With a little of work you can turn this into a reusable blueprint that will always work no matter what.
Instead of Chaos, which until it is finalized will always cause issues.
(I would suggest going with an array of static meshes for the replacement parts. Though it is a bit complex to setup. Maybe a pyton script to select a folder and automated the array population would help).

Making the geometry break correctly in blender can be challenging, but it doesn’t have to be.

Just be mindful of the UVs…

Would it make sense for the OP to look into instanced and hierarchical instanced meshes for the fragments?

Usually no, since each object has to simulate independently.
But if you use many of the same breakable, then yes.
A way to aggregate stuff - even drawcalls when possible - is always best.

1 Like

Would that be a smart solution for some kind of a procedural or mathematically based setup?

It is not my wish to spam the OP’s intentions with unrelated rabbit hole discussions. If that is the case, please let me know, so we can move this conversation somewhere else.

Otherwise, your racing car project is interesting @Aram063 and I wish you great success with it!

I don’t think a procedural setup is worth your or anyone else’s time.
It always results in artifacts or bad meshes and sounds way cooler than it is.

That said. There’s a Mesh Slicing c++ tutorial that covers the basis of doing similar things.
Procedurally that is.
It’s a 1 hour live training that can maybe be adapted to custom runtime breakables.

If you aren’t at all an artist, then maybe that’s a better way to go for you.
But even being a 10% artist, 90% coder will result in you having a better end result by working the art…

Re the instancing.
You can make the breakables swap from instances to BPs via proximity like my plugin for foliage does.

That way you don’t always render the object with multiple bits or have to have non-instanced blueprints spread out in the level.
(Really though, there’s no adverse effect for having 100 or so BP thrown around a level, provided they have tick disabled).

1 Like