I need to apply a material to a broken chunk of a Blast asset when it is broken. You can set the interior material of the chunk through the Fracture Settings of the Blast editor, but we want to apply a dynamic material instance to the chunk so when it’s bond is broken, it glows brightly and then fades as time goes on. We can get the actor name using onActorCreated but there’s no way to get a reference to the generated chunk to change it’s material to a dynamic instance.
I recently updated the Unreal-NvBlast Engine to build 4.19.1, the latest version. When I peek under the hood, unless I’m mistaken, it looks like Blast Mesh assets have preset material slots available from the fracture settings for which to apply materials to chunks created by destruction of the mesh.
Can anyone think of a workaround to apply a dynamic material instance to a Blast chunk without it being applied to the rest of the whole mesh? Alternately, maybe there is a way to fake this effect?
I’m going to attempt to answer my own question:
After digging through the core code for NVIDIA Blast, I found that the Blast Asset, which is the destructible mesh, is put together in a very specific way. This asset contains a skeletal mesh with 2 material elements, exterior and interior, and each element is basically a separate mesh bound to the same skeleton. Then Blast works out which parts to show and which parts to hide. Because of this, I can only assign 1 material to the entirety of the interior mesh. This makes it impossible to assign a unique material instance to an individual chunk of debris. Please, anyone let me know if I have missed something.
If anyone can think of a work around to make the individual debris chunks appear to have separate materials please chime in. I was thinking perhaps a post process effect but that’s my absolute last resort.