GreasedLines rendering performances

Hello there :slight_smile:

I’m working on a project where I’ll need to render thousands of wires (electrical cabling).
At first I used MeshBuilder.CreateTube, with the idea in mind to “optimize later”. Now that I want to improve perfs, I’m turning myself toward GreasedLines.

And I’m surprised to notice that GreasedLines are showing much worse perfs than 4 times the amounts of vertices with tube meshes :


GreasedLines, running ~25 FPS on my machine, 1.47 M active indices


Tube Meshes, running ~50 FPS on my machine, 5.88 M active indices


So, considering the ratio of active indices and FPS, GreasedLines are being 8 times slower than an actual tube mesh, here… :thinking:

Maybe @roland has a clue of why is it so ?

3 Likes

This might interest @sebavan as well.

1 Like

Sorry, I can’t squeeze more from it :smiley:

GRL instance and lazy mode:

I could :smiley:

  instance.alwaysSelectAsActiveMesh = true
  scene.freezeActiveMeshes()
2 Likes