webglRender.render(scene,camera) How to update the section Object

In my demo, Tens of thousands of buildings and roads , they have been added to the scene with;

Vertex data of roads are dynamic ,Buildigns data is static, In the animation function, I update the vertex data of Line dynamically.

then Render Scene

 render.render(scene,camera); //cost time  ,  renderTime: 94.677978515625ms


Performance is so poor

I hope that only road data can be rendered and buildings can not be rendered, which should greatly improve the animation performance.

about Building,I set the matrix not to update

 //building mesh
 mesh.matrixAutoUpdate = false;

But it doesn’t seem to work.

What should we do about this?

Can you try doing scene.autoUpdate = false first and see how that affects things?

Another thing that you sh ould probably do is merge your buildings into a single geometry, this would reduce the draw call overhead by a huge amount.

Another thing you can do is render the city to a render target, and then draw the line animation over that.

1 Like

thanks ,I try :blush: