How to have many instances of a single procedural mesh?

Basically I create a UProceduralMeshComponent, but I dont know how to use the same mesh data to instantiate it many times in the scene, different transforms, same materials.
Or if someone knows how to create a mesh at runtime and instantiate it many times in the scene.
Thanks!

Hey!

First up the UProceduralMeshComponent doesn’t support this as you’ve probably already figured out. The question I have for you is how many times are you trying to instantiate it? This is something I’m looking at supporting for the RuntimeMeshComponent at some point, but there’s 2 forms of this that I see. First is when you want to create like 10 of them, each completely separate, and the other case is when you want to create many more, like hundreds or thousands of them. These are 2 different problems, so I’m interested to see which you’re wanting.

Second, if you haven’t come across it yet, I’d recommend the RMC (link in my signature) as it’s far more efficient than the PMC.

hi, thanks for the link, I have seen the RMC, just wanted to go with official stuff. Mesh instancing like having one mesh data and many positioned instances, like in GPU based instancing. So, yeah, from 10 to 1000000 :), should be nicely supported. Its a bit odd that UE doesnt have a straightforward way, or I should just dig deeper.

UE4 has a good way to support this for stuff not generated at runtime… InstancedStaticMeshComponent and HierarchicalInstancedStaticMeshComponent and then the regular StaticMeshComponent shares the mesh data so there’s only ever one copy of the mesh on the GPU. The problem is the PMC is a completely different animal, and unfortunately Epic hasn’t appeared to put a bunch of effort into it. Looks to be mostly James working on it as he gets time, which is why I built the RMC. It will gain this ability, but I’m not yet sure when I’ll try to add it.

Hey Koderz, any news about instancing RMCs? Create Plugin by the way, thx for that!

edit: Ah, i found on github that you are looking into it…