Which looks pretty good, but I would like more control over the destruction, and so far to limited success. I want to basically create different destruction layers, in this example I would like the roof tiles to have a low damage threshold, the wooden components to have a medium damage threshold and the wall/stone to have a high damage threshold.
I have this set up currently. everything is in one single cluster on one single level. because any clustering/nesting makes it difficult to guarantee the intended results (like a small explosion destroying wood before roof shingles are even affected).
I tried adding a physical material to the wall material and increase the damage multiplier in it, but that did not seem to have any effect even if i checked the “use material damage modifiers” in the geometry collection. (although I might not have done everything needed, depeding on what additional steps are required for this to work)
What would be the best option? creating nested geometry collections? multiple geometry collections for each material but with the same cluster group index? or am I missing something obvious/the intended way to create this effect?
and found that one way that seems to be working is creating multiple geometry collections for each “damage tier” and then adding them to the same cluster group, But I’d still love to hear if other people have found better/easier ways of setting this up.
We don’t have an easy wat to assign damage threshold per bone or per material
There’s a per level mode, a per size mode
the damage threshold multiplier works but there’s only one physical material assigned per geometry collection right now
We intend to give more fine control of damage threshold in the future through Dataflow
An alternative way would be using initialization fields ( set in the geometry collection component )
You could have a initialization field that sets an negative internal cluster strain ( instead of applying damage it it restore damage )
That may be tricky if the materials are not really grouped spatially though
Another way is to call ApplyInternalStrainfrom a blueprint on begin play ( you may need a frame or two delay though ) to write a negative strain on specific bones
Your solution to use a cluster group is a way of achieving it for now, even through that forces you to create several geometry collections
If you have access to code and willing to implement custom solution, you could write method in the geometry collection physics proxy to write damage threshold to specific physics handle ( calling SetInternalStrain ) similar to what ApplyInternalStrain does
as we were hoping to have quite a few assets with different compositions, different amount of thresholds per object, do you think there is an easy way to generalize this or expose some way to assign bones in the inspector? as otherwise the development overhead would be unsustainable if we would need a custom set of code for each object.
One followup question regarding the multiple geometry collections approach;
with all things being equal (geo resolution, number of bones, etc.).would this have a noticable performance impact (splitting up the same model into 3 sepeare geometry collections vs 1) or is it mainly a way to separate and structure the data?
Having a way to edit damage thresholds per bone is something that is on our wish list for sure, we haven’t got to it yet
Regarding the performance, I’d say the cluster group index solution is slightly higher on the memory side of things, but from a simulation performance (Physics thread) point of view that should be fairly similar to a single geometry collection with the same number of bones
The cost may be a bit higher on the Game thread when updating the corresponding geometry collection components but at the same time each update should be smaller than a single larger geometry collection one
I encourage you to measure the differences using Unreal Insight or other profilers to compare the real cost in your specific scenario though, as performance profiles are very specific to each project and setup