Looking for a strategy to draw large graph (networks) in 3D

Hi,

I am working on a project where I need to render a graph: Nodes and Edges. I want the number of objects to be arbitrary, and potentially large (10k, 100k nodes, 100k edges).
I’ve built a similar project in WebGL quite successfully, by utilizing the GL.Points and GL.Lines and feeding in vertex streams, with custom shaders to handle colors, selections etc. But the main drawback of GL.Lines is that I cannot control the Thickness!

My current plan is to use a Particle System for the nodes, which gives me the flexibility to call new particles, and add custom shaders on rendering them as a quad. It is fine for the nodes because its a “sphere” which is projected as Circle on the camera facing quads.

My main issue is about the edges, I though of making another particle system, and using the renderer as World position, creating a SDF line shader, and rotating the particle to match the Source and Target nodes. But this seems quite suboptimal somehow…

I’m looking for a better method, some examples maybe, of how to do this in a cleaner way…

Should I make a cube, a project to the faces the nodes and lines as a rendered texture, but then how to encode the graph into a texture Data objects without having to loop over all nodes for each pixel at the fragment shader?

Should I generate mesh data on the fly? But then, any modification to the graph would be quite expensive to recompute as the mesh needs to be regenerated?

Thanks for the help or any ideas or directions !

If you’re wanting to support things on the scale of 1s to 10s of thousands, just using cubes or billboarded quads and having the default unity instancing enabled on the material would be enough to get what you need. When you start reaching 100k to 1 million things, I think your only option is going to be some chunked up custom meshing.