Load a huge mesh at run time

Dear community,

I am very new to UE4, so please dont bare with me if the question is too trivial.

I am having a huge mesh generated by a photogrammetry system such as Photoscan.
The mesh can contain several millions or even billions of triangles.
From some posts I saw that big files cause problems for the editor, thus I would like to load a mesh as a stream.
However, the LOD issue remains.
In summary, I would like to acomplish the following points:

  1. Load a mesh (vertices) at run time as a stream

  2. Structure it in a LOD format, which can be handled by UE4. Note, the mesh is a general one. Its not a heightmap of a terrain.

  3. Read textures and apply LOD for real time rendering.

Is there some approach I could use for this? Would be great to see some examples in the tutorials, since I am new to UE4 but experienced in C++.

Thank you very much in advance!

I would start by giving this a read:

Basically, what you are looking for is the Custom Mesh Component.

To load your mesh at runtime, I would guess you have to load from your file and fill in the FCustomMeshTriangle array from CustomMeshComponent (CustomMeshTris) as you get the data. Since that component herits from UMeshComponent, you also have control over the materials applied on it.

Iā€™m not sure about the LODs, but you could get some tips from UStaticMeshComponent thats also inherits from UMeshComponent and supports LODs.

I hope this sets you on the right track!

Mick