Occlusion query

Problems building or running the engine, queries about how to use features etc.
User avatar
Devine
Kobold
Posts: 35
Joined: Fri Jan 14, 2005 1:21 am

Occlusion query

Post by Devine »

Hi In THIS forum

Sinbad states that the best method for implementing an outdoor city level would be to use the octree scene manager plus occlusion query.

Does anybody know of any tutorials or know how to implement the occlusion query in Ogre.

I noticed the class HardwareOcclusionQuery in the API referance but dont have a clue how or where it to implement it.

Thanks
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

I think he is talking about the default occlusion query performed by the OctreeSceneManager ;)
Image
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

No, I wasn't - octree doesn't do any occlusion culling.

I think leedgitar was planning on doing an occlusion demo at some point to demonstrate how to use it - otherwise you're just going to have to read up on the tech documents around the web. Occlusion querying is quite an advanced feature and requires some prior knnowledge of the theory to use.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Sorry, I was messing it with simple culling :P I think you're talking about culling depending on if an object is occluding others, right? I've been out of the scene for soooo loooonnngg....
Image
User avatar
Devine
Kobold
Posts: 35
Joined: Fri Jan 14, 2005 1:21 am

Post by Devine »

so your talking about it being done with the hardware then?
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post by DWORD »

I don't know much about Ogre's support for it, but afaik hardware occlusion query is about using the hardware to tell if an object is occluded by other objects already rendered in the framebuffer. So if you sort your scene from nearest to farthest, you can query how many pixels of an object would in fact be rendered without ever rendering it. I believe you would use a kind of simple proxy geometry for the query. Please correct me if I'm wrong.

P.s.: Heh funny, first page when searching google for "hardware occlusion query" is a demo of the technique using Ogre 0.14. Didn't read the text, though. Could be nice with a demo. :P

Edit: Sorry for maybe hijacking, but this page has some interesting videos. Check out the 'City Walkthrough'. ;)