Make panda3d perform well with a large terrain file

how do I make panda3d run at a good speed without crashing the game when I use a large terrain file?
and say that the file is 20GB it’s not gonna run, isn’t it? like the CPU the GPU and RAM or even the ROM will be stressed out, or it might even Crash, right? so is there an implementation where it loads a part of the terrain and keeps the rest unloaded, and it doesn’t show the unloaded part in the camera. And when you move it slowly starts unloading parts of the terrain and it loads other parts of the terrain.

This is called streaming, but you can implement it yourself. It’s not part of how the engine works, like implementing a resource manager. The problem is that the engine doesn’t know how you want to use this or that file.

is there a special command where it loads a part of the terrain

or some way to do so…

I think the answer is obvious, you don’t need to create a large terrain file. Divide it into parts and load only the parts you need.

ok, but what if you move into the area that’s not mapped then will you see an unloaded part of the terrain

I do not understand what the problem is? Use simple position-based math to calculate the required pieces of terrain.

what do you mean by?

fine if the character moves into that one part of the terrain wont the other part of the terrain be unloaded?

Why are you asking me about what you should implement yourself? If you write such a script, then yes, the terrain will be loaded or unloaded.

Split your terrain into many chunks, each represented by a single ShaderTerrainMesh (or whatever implementation you choose). Then you can unload and load the terrain yourself as the player gets close to them. This is not implemented by Panda.

What is ShaderTerrainMesh?

Here we can take inspiration from most voxel engines like Minecraft. They use a chunking system. First, you need to divide your map up into yoursize x yoursize chunks. Then you can load them in and out based on the camera’s position. Hope this helps. :slightly_smiling_face:

You should find more information on and linked within this manual page, I believe.

thank you so much!

thanks!