Unable to disable the terrain

CaseyB

24-10-2006 21:03:33

I am trying to disbale the terrain in a certain rendertarget to I have added a listener to it and in the preRenderTargetUpdate() I am doing this:sceneMgr->clearSpecialCaseRenderQueues();
sceneMgr->addSpecialCaseRenderQueue(scene->getWorldGeometryRenderQueue());
scene-Mgr>setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);

and in the prostRenderTargetUpdate() I am doing this:scene->removeSpecialCaseRenderQueue(scene->getWorldGeometryRenderQueue());But the terrain is still showing in that rendertarget. Any ideas?

tuan kuranes

25-10-2006 13:16:02

Missed a change in Ogre internals...
Should be fixed in CVS now.

CaseyB

25-10-2006 15:42:30

Ogre CVS, or Addons CVS?

tuan kuranes

25-10-2006 15:49:40

Addons CVS
Was my fault :oops:

kungfoomasta

25-10-2006 16:11:33

CaseyB I'm curious, what effect are you going for?

KungFooMasta

CaseyB

25-10-2006 17:00:17

Something like this:

Where there is a "realistic" 3D view and more of a standard top-down view. Except there will be terrain and water in the "realistic" view.

kungfoomasta

25-10-2006 17:38:49

cool! I can find a use for that in my game as well! (low detail map of the region). Down the road I'll bug you about it :wink:

KungFooMasta

CaseyB

25-10-2006 17:41:38

Down the road I'll bug you about it :wink:Sure, it's actually pretty easy!

CaseyB

25-10-2006 19:22:58

I can't seem to access the CVS, it keeps saying connection refused! Is anyone else having trouble?

davesh

11-11-2006 11:51:22

I am trying to disbale the terrain in a certain rendertarget to I have added a listener to it and in the preRenderTargetUpdate() I am doing this:sceneMgr->clearSpecialCaseRenderQueues();
sceneMgr->addSpecialCaseRenderQueue(scene->getWorldGeometryRenderQueue());
scene-Mgr>setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);

and in the prostRenderTargetUpdate() I am doing this:scene->removeSpecialCaseRenderQueue(scene->getWorldGeometryRenderQueue());But the terrain is still showing in that rendertarget. Any ideas?


I have tried this as well. I have downloaded the latest PLSM from the addons. What I see is that the terrain is patchy. Some patches seem not to be rendered, others are rendered. When I zoom in or out patches that were rendered as terrain suddenly stop having the terrain rendered (and start to look right).

I've tried both the pre and post RenderTargetUpdates and the pre and post renderTargetViewportUpdates.

Is this the right way to do this? What else needs to be done in order to have the terrain not be rendered in this target?

davesh

11-11-2006 12:13:40

Let me take that back.. The calls to addSpecialCaseRenderQueue seem to have no effect.

The patchiness that I see is there in a top-down view of the PLSM terrain even if I disable this logic. Big blotches of terrain in the "middle and edges of my viewport" simply dont render or render in and out based on pan/zoom. These blotches will suddenly begin to render with just a slight adjustment to pan/zoom.

CaseyB

30-11-2006 18:26:08

Ok, there is another issue with this! When I put add the render queue to the SpecialCaseRenderQueues list, I do it this way:Ogre::SceneManager *scene = Ogre::Root::getSingleton().getSceneManager("MainSceneManager");
scene->clearSpecialCaseRenderQueues(); scene->addSpecialCaseRenderQueue(scene->getWorldGeometryRenderQueue()); scene->setSpecialCaseRenderQueueMode(Ogre::SceneManager::SCRQM_EXCLUDE);
Whic returns a render queue ID of 25, but when the PLSM checks the SpecialCaseRenderQueues, it does this:if (isRenderQueueToBeProcessed(mPageManager->getPageRenderQueue()))which returns the PageRenderQueueID, which is 75, so it is not finding the WorldGeometry in the SpecialCaseRenderQueue. What is the correct way to do this?

-=EDIT=-
RENDER_QUEUE_WORLD_GEOMETRY_1 = 25,
RENDER_QUEUE_WORLD_GEOMETRY_2 = 75,

So why is only one of them being checked?

CaseyB

30-11-2006 19:06:10

Here's what I get when I disable the RENDER_QUEUE_WORLD_GEOMETRY_2 render queue.

It's pretty fun to watch it change as the camera moves, but it's not really what I'm going for!

davesh

01-12-2006 00:52:00

Bump Bump.

Tuan we could use your insights with this one. It doesnt seem as if the terrain texture can be disabled in the "PIP" window.

It would seem that this is a bug...

davesh

01-12-2006 11:36:47

Interestingly the camera orientation in the main window impacts whether or not the terrain shows up in the picture-in-picture window. Sometimes the Picture in picture appears all red (which is the what we want) sometimes the terrain "bleeds through" as you see in Casey's picture.

davesh

01-12-2006 11:39:31

Missed a change in Ogre internals...
Should be fixed in CVS now.


We have the latest add-ons from CVS. Can you describe what this change was? It could help us figure out what this bug is.

tuan kuranes

01-12-2006 11:58:47

So PLSM2 only checks for its own data to render or not :

if (isRenderQueueToBeProcessed(mPageManager->getPageRenderQueue()))

as it just check if it has to render terrain or not.

I've made some cvs commit that perhaps can help a bit, but as I don't have any source code to test results, it's up to you to test those or send a simple source test scene

davesh

01-12-2006 13:24:14

We can try to create a test case and post it. What file(s) have you changed in CVS? What was the nature of the CVS change(s) that you tried?

I want to know what to look for so that we can try to help debug this.

tuan kuranes

01-12-2006 16:51:34

I just changed init value of page render queue to mimic basic scene manager etted value.
Search code containing "RenderQueue"

CaseyB

01-12-2006 20:04:55

I tried disabling 25, then 75, then 25 and 75. 25 did nothing, 75 and 25 & 75 resulted in the same thing as the screenshot. We'll see if we can get you a simple test case next week sometime.

tuan kuranes

02-12-2006 12:15:42

We'll see if we can get you a simple test case next week sometime.
That would help a lot minimizing debug time, therefore putting it on top of debug todo list.