Hi to all. I have a unity project with a terrain and other gameobjects and I'd like to load a point cloud (gotten from socket stream) into the scene and transform it in a mesh. The point cloud will be sent continuosly, so I'd like to create the mash in an incremental way. Any help? Thanks
When you fabricate a mesh procedurally in Unity, you will be putting it into the .mesh field of a MeshFilter on a given GameObject, which will then have a MeshRenderer to display it. There are performance limitations related to setting up the mesh (generating the verts, the triangles, and then the normals and possibly UVs associated with it), as well as limitations related to size (maximum of 65k verts I believe). There are other considerations such as the bounding box, which determines when the object is in/out of the view frustum, etc. If you have a streaming level coming in you will need some kind of logic to quantize it into blocks that can each be their separate mesh, such that you can throw out older ones and keep going. Google for some Unity procedural geometry tutorials; Unity makes it trivially easy to create procedural geometry, and that will enable you to develop a feel for what you're going to have to consider in your particular problem space.