LOD based on hiding individual polygons / vertices?


I’ve got a massive city object which I made using one of the city making scripts (awesome tech!!) As it happens, it doesn’t seem to run too well in the game engine, so I need some LOD system to make it possible to use it in game. Since the cubes which make up buildings are linked as one object, I can’t get every to run a script and hide itself based on its own distance to the camera (which would be crazily long to setup).

I’m wondering if there is a python or blender technique for making individual polygons or vertices of a mesh become invisible and reappear based on their distance to the camera. So far, I’ve looked at the documentation, and although there some abilities to detect each vertex’s distance from an object (e.g vertex.getXYZ()), I can’t see any method to make them invisible. :confused:

Any ideas?

Thanks for your time,

1/1 credit(s)

I don’t think what you are looking for is possble, at least not in Blender right now.

I recommend splitting your buildings into objects, since Blender is optimized specifically for that- it hides objects if they’re out of view, but if even the slightest bit of the object is in view the whole thing is calculated.

If you have a great many buildings, I would recommend having one object (say, the camera) have an LOD script that loops through all LOD-able objects, and hides the necessary ones- so you only have to modify the logic on one object, even if you have three hundred buildings to be calculated.

I aggree with Captain Oblivion. For LOD check this thread: http://blenderartists.org/forum/showthread.php?t=187213

I think it will help you

Or perhaps my LOD might help too.