How can I render vertices just as vertices, not using meshes

Hi,

I’m trying to render point cloud data that are streamed from a Lidar. I want to show each points extracted from the received packet the Lidar has send. The problem is, I do not know how to show the points without using 3d objects like sphere, or cylinder; I want to show a point just as a point, not an object that has a mesh.

The reason I do not want to use meshes is because the data is streamed into the unity client, meaning that the data always changes rapidly. I do not have enough time to make the cloud point into models.

I heard this is possible using UnityEngine.GL, but is there another way that Unity recommend? If so, it will be a pleasure to get some references that I can use to study. Even not, it would be a big help if you give me some notes how to draw points with UnityEngine.GL.

Thanks

One possible approach, if you specifically want to avoid using the GL functions, would be to utilize Graphics.DrawMeshInstanced() along with a Billboard shader to display a bunch of simple, small shapes (e.g. small, solid-color squares) (Billboard shader examples, 1, 2, 3).

By passing in a List<> of Matrices for position only, the rotation and scale can be effectively ignored by the billboard shader (plus, a List<> is more efficiently adaptable than the array alternative in this scenario). While they wouldn’t literally be “points”, per se, this would potentially serve as a viable alternative, especially with a simple visualization in mind.

Since this is about rendering point cloud data, have a look at this question over here. I’ve linked the geometry shader in a comment under the question with a gif showing it in action. Also note the 64k vertex limit is no longer an issue as long as you choose a 32 bit index buffer (instead of using the default 16 bit).