pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.23k stars 328 forks source link

Render distance performance-oriented #641

Closed alessiodam closed 10 months ago

alessiodam commented 11 months ago

Hello, I am working on project TI-TREK, which is essentially a space game, I have a map full with planets, around 8K objects, I've implemented render distance using: camera.clip_plane_far = 2000 which displays around 5 planets but it lags very bad and it shows 60FPS.. any way to optimize it?

pokepetter commented 10 months ago

You should not have a lot of visible entities, only a few. 8K is way too many. You should merge the models together so the can get rendered in one (or a few) draw calls instead of 8000. It's also a possibility you're CPU-bound and not GPU-bound.