well i got occlussion working properly for my game, but I’m using a top down view for my game and a ton of objects which could be hidden through occlussion are still visible.
my objective is to hide everything that’s not on camera or in the immediate vicinity to save on poly count, can anyone suggest a way of getting it done?
To me it looks like the large meshes are one big mesh. They need to be broken into smaller bits for them to be hidden properly.
Also depending on how close your camera is to the player, frustum culling might work just fine without having to set up an occlusion culling system. Frustum culling just means that whatever isn’t on screen isn’t being rendered and with a top down or side scrolling game you really have a lot of control with what is on the screen at any one time.
all the geometry is all lined up in maya but is kept seperate, the doors and other objects that are being hidden properly were all imported in from the same file.
i will look into frustrum culling that may solve the problem perfectly.
if you have a link to good tutorial on getting that to work it would help greatly, also thank you for the advice.
Frustum culling happens automatically as soon as the mesh bounds of an object leave the camera’s frustum ( Wiki page ) so for a top down game it’s all about designing your levels so that there are only so many static and dynamic objects on the screen at any one time.
Occlusion culling is really only useful for 3D scenes where certain objects can block out (or occlude) other objects behind them. Think of a 3D maze where enemies are hiding around each corner and you don’t want the game engine to render them until they can actually be “seen” by the player.