Chaos Destruction Dataflow Advice and Best practice

Hello Epic Community!

I am currently working on an indie game that is heavily based on destruction. I plan to leverage the Chaos destruction system to accomplish this and am trying to set up my pipeline.

The main requirement for my game is that once the player breaks structure, they are awarded XP. Structures are generally going to be standalone objects and small buildings. (A wooden fence, a stone wall, a small hut, etc). There is no partial destruction. Once a a structure has taken enough damage the whole thing will break.

Now I am trying to figure out a scalable pipeline. I have watched every talk about chaos destruction on Epic Games’ YouTube and read through all the chaos and dataflow documentation and am missing a couple pieces:

I am trying to build this off of a similar pipeline that Lego Fortnite uses for Geometry Collection Creation. I have a collection of modular meshes that I assemble into my structures in editor, select all of them together, and then convert into a geometry collection. From there, I want to set up a few dataflow graphs to automatically handle my fracturing.

For more straightforward props like fences and stone walls, this is not a problem at all since they are all generally fractured the same. The issue is when I need to fracture a structure that contains multiple materials.

For example: If I have a stone and wood house, I want the stone to fracture more chunky, and the wood to fracture more splintery. I wanted to set up a graph that can check for keywords in the geometry collection like: “wood” or “stone” filter them and fracture them accordingly, but whenever I create the collections, they always seem to just get named SM_01, SM_02, etc.

I have made sure the source static meshes are named SM_Wood and SM_Stone as well as making sure they are named correctly in my viewport but the naming always seems to go to SM_##.

____

It has left me wondering if this is the correct pipeline for a game like this. As a workaround for now, I plan to just combine separate geometry collections into the same blueprint and handle it that way, but for a long term solution it feels wrong.

I would love to hear if anyone has any advice on my overall pipeline, as well as dataflow graph creation to help assist me with this.

I just want to chime in and say I’m also actively trying to figure this out and would love clarity here as well.

dataflow creates fracture from sm, so you can name your sm accordingly. so how do you plan to use your gc in level? swap on hit or you directly place gc in level? i think dataflow is not bad if you keep chunks count low, dont think is performant runtime for large count. you could maybe try to create gc way you want and then use object state to control on hit..keep it maybe kinematic rather dynamic and swap to dynamic on hit or if damage threshold reached all chunks become dynamic and remove all anchors? sorry dont work on gc anymore, making my own destruction system so some stuff might have changed.

Hi

The direction you are describing sounds right
I recommend watching this video ( from UEFest Orlando ) :

At the end of the presentation, I talk about how you can setup your pipeline using Utility blueprints and Dataflow
For your case, I’d recommend setting up a Utility blueprint script that you would run on your static meshes
the blueprint script would then look for keywords or tags on the static mesh and decide what dataflow to use
you can then create a blank geometry collection in the blueprint and execute the dataflow on it and passing the static mesh / meshes as parameters

if you want to convert multiple mesh into a single geometry collection, you can assemble them into a blueprint and then use BlueprintToCollection node in your dataflow ( it will scan all the static mesh in the blueprint and turn them into a single geometry collection )

I hope this helps

2 Likes

Thanks so much! I will take a look at this! I am not sure how I missed that during my first watch through on the presentation.

A few days ago I ended up figuring out another method of splitting things via CollectionSelectTransformString which I will share soon once I have confirmed it works on more meshes! So far its working really well! I will keep testing for a couple more days and then try to post a tutorial about it!