CPU performance drop on view

I’ve created a game and limited my camera length to, say, 400 and a minimum of 0.1. If there are models behind that distance, even though I can’t see them, it taxes my CPU and slows down my renderer. Is there a way to fix this? These are .obj objects with .mtl in my game.

Any suggestions are welcome

In this case I can’t create a big world and load many objects

How do the official three.js demos work on your computer, especially the ones with lots of objects?

If they work at over 60 fps, you can study them to see what kind of “tricks” they used.

You should also take a look at your GPU. Especially with complex 3D games, the GPU is the workhorse.

All objects in camera and out of camera calculates updateMatrixWorld. 1.000 meshes about 10ms.
For static objects apply this:

mesh.matrixAutoUpdate=false;
mesh.updateMatrixWorld=function(){};
2 Likes