Background Loading

Hi guys,
I am planning to have large world, possibly hundreds of thousands polygons in total. So, I believe I need to load/unload part of the world during runtime. Do you know any best way to support this? and how do I do this?

My plan is to use a predefined collision solids. Whenever you touch the collision solids, you will load some model and unload some model, i.e.

if (collision with collision sphere):
prepareScene for the new loaded model

Do you have better ideas/suggestion? Btw, is there any way that Panda can display the statistics of current number of polygons displayed on the screen?

Thanks in advance!


first for the correct loading command


model = loader.loadModel(‘model.egg’)





The way i have used in the jungle engine is to keep a list of models, which are loaded if the player is close to the position. (Actually the object positions are calculated procedurally in the jungle engine, but that isnt really a big difference)
Little object are only shown in a close range, larger objects are shown in a larger radius.

the calculate the number of polygons:


you can also call that on any node you have, which only calculates the number of polygons below this node


Note that collision detection is way more time-consuming then other ways, like culling (near and far plane).

i hope this helps a bit

Thanks for the reply :slight_smile: It is very insightful!

I am just wondering, instead of removing the node or detaching the node… can we just hide it and show it when needed?

Thanks a lot!