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
Test of culling
-
- OGRE Team Member
- Posts: 5490
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1361
Re: Test of culling
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
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
-
- Gnome
- Posts: 368
- Joined: Tue Jan 06, 2009 1:12 pm
- x 43
Re: Test of culling
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!
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!
-
- OGRE Team Member
- Posts: 5490
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1361
Re: Test of culling
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:
Matias
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:
CheersBy 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.
Matias