Sign in to follow this  

If you made an Occlusion Class

This topic is 4857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

...what would its methods be? Imagining that that Occlusion class would be "linked" to a map geometry, one of the methods of the "RenderVisibleMap", which would dispatch the visible geometry to the graphics card. This class would require the current camera position. Another method, would be "CheckBBVisibility", which would check if a certain Bouding Box (BB) would be visible, under the current ocluder+frustrum context... Tell me, what more would you add to this?

Share this post


Link to post
Share on other sites
i personally wouldn t create a seperate class for occlusion culling

i assume your renderer is designed to handle class like Mesh Meshlist ...
where each mesh stores a textureID a pointer to the texture obj in your memory and a pointer to the shader that descibes the texture properties like material properties and if you use normal maps or paralax mapping ...

just create a frustrum class to extract the frustrumplane

then perform frustrum culling inside your renderer and then other occlusion culling methods that might be linked into your octree/quadtree whatever you use

Share this post


Link to post
Share on other sites
Yes, but if you create an Occlusion virtual Class, you can overload it later, change its code to suit BSPs, QuadTrees, OcTrees, ABTs, etc....

Share this post


Link to post
Share on other sites
In my earlier engines, I made a SceneManagerClass as a subclass of SceneClass. the SceneManagerClass was in charge of all aspects of taking ALL the goemetric data from the scene, culling it, sorting it, and finally passing it to the render pipeline.


class SceneClass
{
...
class SceneManagerClass
{
void FrustumCullObjects();
void OcclusionCullObjects();
void FullCullObjects();
void SortVisObjByShader();
void SortVisObjByTexture();
void FullSortObjects();
void DepthSortObjects();
void FinalizeRenderBins();
}
}


This setup allowed a good freedom of culling for any type of project i threw in. Essencially, you have to remember that you're just taking visible data, determining if it's seen, and placing it's index somewhere for a render pipeline to pickup.

There really isn't a huge NEED to make it a seperate class, it just depends on your programming style and how your current engine standards are setup.

Hope that helps.
~Main

Share this post


Link to post
Share on other sites

This topic is 4857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this