Instance Static mesh combine with Chaos destruction using script.

Hello,

I am trying to make a map with destructible buildings but it will be heavy if I won’t use instanced static meshes.
I’ve been wondering if it’s possible to use Blueprints or C++ to remove/disappear a mesh when is getting hit and replace it with a geometry collection (in the level since geometry collection doesn’t work with ISM).

Does anyone know if it is possible?
Let me know if you have other suggestions.

Thank you,
Ilias

Hi

Since 5.5 geometry collection have full support for root proxy meshes and instanced static meshes

Root proxy meshes are mesh rendered by the geometry collection when it’s not yet destroyed
You can set them in the Root Proxy Data section of the geometry collection asset

You can render them using instanced static meshes, by setting the custom renderer on the geometry collection ( select the class that contains the word proxy )

When the geometry collection start breaking, the mesh will no longer be rendered and the normal geometry collection will be used instead

I hope this helps

2 Likes

I noticed that broken geometry doesn’t allow LODs.

1 Like

That works perfect!

Thank you so much!

@Jinkel : Yes this is a limitation of geometry collection

However Geometry Collections support Nanite ( which provide continuous automatic LOD )
If your project can afford using Nanite , I’d recommend using it

We have workflows that can allow using Instance Static Meshes for rendering the fragments but it’s quite a lot of manual setup at the moment and we haven’t yet provided any documentation for that
It involve using the more general custom renderer and exporting the fragments as mesh and then recreating the geometry collection from those meshes

1 Like

I have a spaceship with only 3 or 4 fragments as mesh because of LOD, I don’t use nanites. So I simulate more parts with particles.

I don’t know if Geometry Collection has better performance or if it instantiates itself.

I need some clarifications.

So in the following image I have placed in the level GC 3 times, made out of the same type Static Mesh.
I select “Proxy” in the “Custom Renderer Type” and I add the static mesh as “Proxy Mesh”.

Now, if I will duplicate the GC multiple times, will it render it as ISM (1 static mesh)?

Yes it should render as an ISM if the mesh is the same for each geometry collection
When you edit it , it may still render it as individual mesh , but if you press play that should be a single ISM ( you can eject from the player (F8) and click on the object and you should be able to see the ISM object in the details )

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.