I’m hoping to create a scene whereby single meshes can be created at any point in time and added to the scene until there are several hundred, or even several thousand, 3D objects in the scene.
I can get good performance (frame-rates) if I generate the individual meshes before-hand, and add them to a single mesh using the Merge object (and I’m getting much better creation time performance if I use the .applyToMeshes method and add them all in a single call using a vector of the stored meshes)
The problem is this doesn’t meet my use-case.
Ideally I would like to add meshes to the existing scene at random points in time (rather than all at once) without it massively slowing performance due to hundreds of draw calls, and without the execution time of re-uploading a massive vertexBuffer each time the new mesh is merged (which is what seems to happen if I merge a new object to the existing mesh which already contains many thousands of vertices - it may hang for several seconds and I’m assuming this is as the new vertexBuffer is re-uploading to the GPU?)
My question is: is there any way to simply append a mesh/set of geometry to an existing vertexBuffer rather than re-upping the entire buffer (which could be huge by now) ?
If not, could anyone recommend an optimal way of adding several thousand objects / sets of geometry to a scene incrementally without a) having a new vertexBuffer / draw call for each object which will affect frame-rate performance due to the high number of calls & b) having to re-upload the merged mesh / vertexBuffer each time a new object is added/merged ?
Thanks