2 scripts for big worlds

Hi! I’ve found this somewhere in this forum, but can’t find the scripts, please help:

“Making a really big world, euh… it’s possible, but with some scripting. There are two scripts which make it possible, first the script they burned on the blender game engine cd. This script is usefull for reaplacing meshed when the player comes closer to that object, and when walking away it replaces the orginal meshes, so then you can make low and high poly meshes and replce them with that script. The second script does only render the game objects when they’re in your sight of the camera, you can find that script in a topic that’s still active on the first page of this forum.”

go to the search in your top right corner and type the word “culling”.

Check this topic, I’m sure you find the culling script with that program. I put a culling source online. :smiley:

The other thing you mentioned was LOD (Level of Detail). Lol, I hope that’s what it means.

Anyways, there’s a blender demo of doing that with spheres of different details. If you know the basics of blender you could most likely make it yourself without ever seeing the demo.

Of course there are more complicated ways to make LOD (maybe the better way is scripting). Say you have 1 low poly and 1 high poly mesh. Basically you just have a near sensor for both of them that detects the actor. Initially you’ll have low poly mesh first. So this is how it works, if actor is within the near sensor range, it triggers the low poly mesh to end itself and add the high poly mesh. The high poly mesh will have an inverting near sensor, when it doesn’t detect the actor anymore it ends itself and adds the low poly mesh. I guess there’s a scripting way of doing this, is much simpler. (However, if you have moving objects that’ll be affected by LOD then you probably would want to use python)

Jason Lin

:smiley: :smiley: :smiley: :smiley: :smiley: :smiley: thanks great help!!!

Frustum culling is included in the 2.34 engine so you don’t need a script for it.

Fireside: Well they say it’s uncluded, but I tested it using some old create games, and all I see it runs even slower. I also tested using a level full of cubes that where moving, but still no significant progress in speed. So the way I tryed to fix this, was using a fake culling or just sector culling. :slight_smile: I’m still not sure if it works or not, I couldn’t prove it yet :frowning:

I´m getting the native 2.34 culling working OK. Just need to set the Clip End value of the camera accordingly.
I tried to implement LOD with logic bricks, but because my scene has too many objects, it slowed down (too many near sensors…). Still looking for a solution to this. Maybe Culling AND LOD will work together.

A while back I saw some Pythonscripting to get Frustum culling doing a real job. Using some blender buildin python scripts, I thought it was from the new blender Python API documentation. maybe that should speed up the frustum culling. I didn’t tried it yet. :-?

The culling system works with objects, and the camera clipping values. Also, mist just slows the game down now instead of speeding it up. :frowning: