-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Description
Description
Hello,
I exported a building model from Revit in glTF format and merged meshes with the same materials to manage their visibility in Three.js using the BatchedMesh class. However, I've encountered a significant performance issue when rendering these merged meshes with BatchedMesh compared to using Mesh.
Performance Comparison:
- BatchedMesh Rendering:
- CPU Usage: ~40%
- GPU Usage: ~30%
- Frame Rate: ~20 FPS
- Mesh Rendering:
- CPU Usage: ~15%
- GPU Usage: ~90%
- Frame Rate: ~60 FPS
This drastic difference in performance is concerning, especially the high CPU load and low frame rate when using BatchedMesh. I've already set .perObjectFrustumCulled
and .sortObjects
to false
in BatchedMesh, which, if set to true
, leads to an even more severe frame rate drop.
Additionally, I'm using three-csm
and postprocessing
frameworks alongside Three.js.
System Configuration:
- CPU: Intel i7-10700
- GPU: NVIDIA RTX 2080 Super
Could someone help me understand why BatchedMesh increases the CPU overhead so significantly and suggest any possible optimizations or solutions to improve the frame rate?
Thank you!
Reproduction steps
Using BatchedMesh to render more than 10 million triangles and vertices, there are about 100,000 different geometries.
Code
Code in the project
batched-mesh-performance-test
Live example
Code in the project
batched-mesh-performance-test
Screenshots
No response
Version
r165
Device
No response
Browser
No response
OS
No response