Jump to content
  • Advertisement
Sign in to follow this  
Prozak

If you made an Occlusion Class

This topic is 5135 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!