Temporarily disabling the terrain

DrPain

27-12-2005 21:14:17

Is there a way to disable the terrain temporarily?

I've got several (9 or more) cameras that are only used to generate RTTs,
and I don't want the terrain displayed in these textures, nor do I want the
camera movements to affect the paging of the terrain.

Is this possible now, and if not, can you point me in the right direction as
to how to implement this? I should only have to enable/disable the terrain
once per frame, so a setOption call should be fine.

Thanks

tuan kuranes

28-12-2005 11:49:57

you just have to exclude the WORLD_GEOMETRY_RENDERQUEUES before rendering RTT.

DrPain

28-12-2005 14:30:20

Ah, that makes sense. Now off to figure out how to do that. :)
Thanks

tuan kuranes

28-12-2005 16:18:20

Here's how I do that :

myobjecttobeRTTed->setRenderQueueGroup (Ogre::RENDER_QUEUE_6);
SceneManager * const sceneMgr = cam.getSceneManager ();
sceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_INCLUDE);


const bool wasVis = myobjecttobeRTTed->isVisible();
myobjecttobeRTTed->setVisible (true);

mRenderTexture->update ();

myobjecttobeRTTed->setVisible (wasVis);
sceneMgr->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
myobjecttobeRTTed->setRenderQueueGroup(Ogre::RENDER_QUEUE_MAIN);

this render only the myobjecttobeRTTed, nothing else.