Test of culling

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
kubatp
Gnome
Posts: 368
Joined: Tue Jan 06, 2009 1:12 pm
x 43

Test of culling

Post by kubatp »

Hello,
Is there a way how to check/see what is being culled (partially out of curiousity and partially out of checking)?
I would imagine it like this - set camera and call a function, which stops updating the culled space, so I can rotate camera and see what is and what isnt rendered,
Any advices?
Thank you
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Test of culling

Post by dark_sylinc »

Hi!

On Ogre 2.1+

1. Scene passes have cull_reuse_data / mReuseCullData to reuse the culling from a previous scene pass in a subsequent pass.

2. Culling data is stored in RenderQueue::mRenderQueues[ i].mQueuedRenderables until it gets cleared, if you want to manually access it (after you've already rendered a scene pass)

3. You can use cameraPostRenderScene listener, which allows you to modify the camera after culling has already happened but before rendering starts. I never attempted to do so, so I don't know if that would work as expected though.

Cheers
Matias
kubatp
Gnome
Posts: 368
Joined: Tue Jan 06, 2009 1:12 pm
x 43

Re: Test of culling

Post by kubatp »

Hello dark_sylinc,
thank you for the tip! I am still stuck with Ogre 1.7.4. but as far as I understand these options, they should also work for this version, right?
I will definitely give them a try!
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: Test of culling

Post by dark_sylinc »

Hi!

No, these features are spefici to Ogre 2.1+

While looking into frustum culling code since I posted it, I found out two more things:

Ogre 2.1/2.2:
There's the setting of "culling camera", which can be different from the rendering camera. It is set from Scene pass definition. It will achieve the desired result.

Ogre 1.7:
Use Camera::setCullingFrustum, which allows to set a different Frustum (a Camera is a type of Frustum) for frustum culling. As per the documentation:
By calling this method, you can tell the camera to perform culling
against a different frustum to it's own. This is mostly useful for
debug cameras that allow you to show the culling behaviour of another
camera, or a manual frustum instance.
Cheers
Matias
Post Reply