Merging Objects vs Instances

Merging Objects vs Instances

Hello,

I have pretty heavy CAD objects with hundrets of small parts which I want to import in UE for VR. I poly-reduced the geometry from several million polygons down to about 100.000 polys with almost zero visual difference using Houdini…

Now I want to import these geometries into unreal but I have read about different approaches on how to deal with geometry in UE

like:

  • merging objects by same material
  • merging objects by same object category eg. bolts, screws…
  • merging everything into a single object
  • not merging objects at all, but using instances for every duplicate object

Also, the geometry could be reduced even further by deleting all occluded faces but that would mean I would lose the ability to use instances - on the other hand this would save a lot of light lightmap space since all unnecessary hidden would not be part of the UV-layout…

For me instancing would make most sense, but I was wondering what would happen to the lightmaps of each object? - would that mean UE generates a lightmaps for EVERY small instanced object?

Any recommendations on how to handle this geometry in terms of merging/instancing regarding performance/draw calls?

Thanks
Felix

Less draw calls = better performance.
that’s all.

You need to make decision based on the scene and its performance so start with the most intensive one and simplify if needed.

You should be able to use instances and it will combine them into fewer draw calls. It will have a lightmap for each object, but keep the lightmap resolution low and it won’t be too much of a problem.
If you can, delete any faces that aren’t needed but keep in mind how the mesh is used

I had been doing some research on this optimization for the past two weeks.

If you have an object with lots of separate parts, then just merging them would be the best option. If you are talking about landscape, then it would be difficult to interpret how “far” or “big” it is going to be in order to be LODed.

Even merging comes with three options:

  1. by material- single mesh, multiple different materials
  2. proxy - single mesh and material
  3. blueprint based - unreal threw everything into a blueprint with ISMC/HISMC? component. You are better off with single static meshes than this as Unreal has optimized single static meshes using similar materials. You do have the benefit of changing the location/rotation/scale of sub components during runtime, i think.

i am going with
LOD0 as by material
LOD1,2,3 as proxy.

Takes more work but definitely an improvement in mesh calls and vertices drawn. And … dont bother with HLOD, it is basically proxy based and will hard fix to a fixed location in that map.

Thx for all your input. The geometry is mid-sized machines, not larger than 2x2 meters - so no large scale or landscapes.
​​​
Even with instancing I would end up with about 300 single static meshes wich would be an instance source for all other duplicate parts - too many draw calls, I guess (but maybe depending on the viewing angle and objects positions?)

​​​​​​At least from what I understood it would make most sense to combine everything into one piece of geometry with different materials.

Houdini conveniently allows me to set individual light map resolutions based on the surface area of each part. But I suppose I would lose the individual light map resolutions for each part/group, once I combine everything into one static mesh in UE.

So I thought about treating the whole CAD file as one single object in Houdini and to unwrap/pack everything in one large UV channel. The resulting map would probably be too large so I was thinking about dividing the geometry into several smaller evenly sized chunks get smaller and sufficient lightmaps.

Would that make sense? Please correct me if that’s totally wrong :slight_smile:

You might want to take a look at the UDIM options if your application provides it. But that is probably not going to help with lightmap.

Depends on individual preferences, i would normally paste similar UV islands together. Like a dozen screws which have similar UV islands. The AO/curvature baking for this method might be tricky.