Mixing RenderQueue for v1 and v2 object issues

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
Lax
Orc
Posts: 476
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 30

Mixing RenderQueue for v1 and v2 object issues

Post by Lax »

Hi,

I'm now mixing Entities and Items in my scene.
The Items have the following render queue specification:

Code: Select all

this->sceneManager->getRenderQueue()->setRenderQueueMode(10, Ogre::RenderQueue::Modes::FAST);
this->sceneManager->getRenderQueue()->setSortRenderQueue(10, Ogre::RenderQueue::RqSortMode::StableSort);
itemGrass->setRenderQueue(10)
The entities have the following render queue specification:

Code: Select all

this->sceneManager->getRenderQueue()->setRenderQueueMode(110, Ogre::RenderQueue::Modes::V1_FAST);
this->sceneManager->getRenderQueue()->setSortRenderQueue(110, Ogre::RenderQueue::RqSortMode::StableSort);
entityBox->setRenderQueue(110);
Like required from this posts: viewtopic.php?f=25&t=95340

But now the v2 objects are always rendered behind all v1 objects, see:

http://www.lukas-kalinowski.com/Homepag ... rQueue.mp4

How is it possible that both object types can co-exist with proper z-ordering?

Best Regards
Lax
Image
http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62
Image

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4501
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 936
Contact:

Re: Mixing RenderQueue for v1 and v2 object issues

Post by dark_sylinc »

It looks like the Z buffer is either changed, disabled or cleared somewhere between rendering group 10 and group 110.

The same suggestions as in this post apply, Please check:
  • Depth buffer is attached (RenderDoc will tell you). The depth pool ID must not be 0
  • HlmsMacroblock::mDepthCheck is true
  • HlmsMacroblock::mDepthWrite is true
  • HlmsMacroblock::mDepthFunc is less or less_equal. Try inverting it (i.e. use greater/greater_equal)
  • HlmsMacroblock was created by HlmsManager
Additionally in your case, also check:
  • The Depth buffer is always the same (check the ptrs in RenderDoc)
  • The Depth Buffer isn't cleared in between (visually inspect the depth buffer, that the depth buffer contents suddenly disappear before rendering group 110). Check your load_actions. If you have more than one pass, the second pass and onwar must be set to 'load', not clear or dont_care. Also check your store actions are not set to dont_care (they must be set to store_or_resolve)

Lax
Orc
Posts: 476
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 30

Re: Mixing RenderQueue for v1 and v2 object issues

Post by Lax »

Hi dark_sylinc,

thanks, indeed it was mDepthCheck = false.

Best regards
Lax
Image
http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62
Image

Post Reply