What way would be most proper in UE4 to simultaneously render multiple meshes that share one universal vertex buffer, but have different triangle lists that address it? I want to draw some procedural voxel structures (~3000 triangles each) on identical large grids of vertices (~40000 each) in different parts of scene. Is this possible at all, or I must prepare custom vertex buffers for each instance?
Take a look at the CustomMeshComponent and CableComponent plugins for examples of building custom meshes, which is what you will be looking to do, the magic occurs in the Vertex factory and the Scene proxy. You will want a singular vertex buffer, and multiple index buffers. Then dispatch a series of batched draw calls using the same vertex buffer but swapping out the index buffer each time.
Thank you, looks like what I need. Just to be sure - different calls of
FPrimitiveDrawInterface::DrawMesh with same vertex buffers inside are not transferring my 40000 vertices again and again to videocard?