Purpose of collision actors in City Sample mesh approximation HLODs generation

I was looking into how the City Sample project goes about HLODs generation. I see that by default the second level of HLODs uses a custom HLOD builder that’s just the base mesh approximate builder with one additional step.

In the City Sample each building consists of at least two actors:

  1. BLDG_Nxxxx actor, with bunch of instanced static meshes without collision
  2. BLDG_COLL_Nxxxx actor, with single invisible mesh with collision

Collision actors are marked as not included in HLOD, but the custom HLOD builder adds them to the input of the mesh approximate builder.

Building collision meshes are just the basic shape of the building with zero geometric detail and almost empty materials. I don’t understand what is their influence on the final HLOD mesh, and I failed to find any info on this subject.

Is the collision somehow necessary for the mesh approximation algorithm to do its job?

Or maybe the simplified mesh is somehow used as a hint for the approximation algorithm?

Or is this just a effectively dead piece of code?

[Attachment Removed]

Hello!

While building the demo, we discovered that some of the approximated meshes had wholes which resulted in textures being projected inside them. The main problem being the buildings don’t have a floor. The goal of injecting the collision proxies was to improve the chances for the approximated meshes to be closed so we would not waste the texture space on parts of the meshes that will never be seen.

The jury is still out on this one as we have seen cases where there would still be internal projections. We never had the chance to investigate what is happening here. The main goal is that the HLODs look decent from their normal view distance and it’s currently satisfied by the code.

Regards,

Martin

[Attachment Removed]

I did a similar thing for a large scale modular city I’m working on and the results are indeed better.

However, the most impactful change was the drastic drop in HLOD generation time. It went from something like 30h to 30min on a single machine. It allowed me to boost the approximation precision with the HLOD build times still being a small fraction of previous times.

[Attachment Removed]