Using libload for open world?

Edited this part because now I know this is possible, I just don’t know how to dynamically load (libload) objects in and out of current main game scene

I’m using frustum culling and two scenes with hi and lo poly terrain (the lo poly also doesn’t have a shader I’m using on it.) I’d rather break this terrain up into smaller squares, and load them up from an external library when the player is close, and end them when the player is far. Frustum culling and the hi/lo poly terrain only gets me so far, obviously because the objects are still there, they just aren’t being rendered. I need to save more processing power than that. Can anyone tell me how to dynamically load/end objects from libraries based on distance from player? Thanks guys.

Step 1 - make buildings from trim kits -> use upbge instancing

Step 2 - Grass + leaves etc -> upbge instancing

Step 3 - Terrain -(We Need static draw call batching for this) but for now you can use something like this ->
<a href=“https://www.youtube.com/watch?v=YoBLgUiiN-o” target="_blank">
https://youtu.be/YoBLgUiiN-o

this was made on the upbge suspendPhysics() branch**

this uses a kdTree to turn physics on off and visibility removing the rendering and physics costs of objects outside a range.

Thanks BPR! That’s awesome, alas, I have no experience in the subject still. Mind if I get the blend in that video to study over? And is there no way to do what you did in your blend without upbge? I’ve tried going to it’s site but it’s down, or something.

Also, I was going to make a separate thread but you would definitely know about this. I need to attach an empty in my main (current) scene by using worldPosition to an object in another scene. I usually use this code…

import bge

cont = bge.logic.getCurrentController()
scene = bge.logic.getCurrentScene()
own = cont.owner

own.worldPosition = scene.objects[‘some object’].worldPosition

But I don’t know how to get the object’s position from another scene instead of the same current scene. Any thoughts?

I use upbge suspendPhysics() but in that example but I have another example in resources, one sec I will dig it up

I will take a look at it and ensure I give you an example that is fast and commented,

Thanks a lot, it’ll help a lot. You explained to me how it works in that thread (https://blenderartists.org/forum/showthread.php?405261-Proof-of-physics-LOD-s-utility) And I’ve been studying it. This method here can be used to actually remove objects from being processed outside of range? Rather than just not being rendered? If that’s the case then thats basically all I’ve been looking for and will probably go on and use the method in this link for my project. A way to dynamically load physics, mesh, and objects.

yeah, you can store a referance to what object to load etc in a kdtree + an indexed list and as it’s in range load it in, for sure,

I have never tried libload async yet(though I should).