CHC++

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
jnanadeva
Gnoblar
Posts: 1
Joined: Tue Nov 17, 2009 9:14 pm
Location: Vienna

CHC++

Post by jnanadeva » Wed Nov 18, 2009 4:01 pm

i'm relatively new into ogre, already played around with it one year ago and now i want to go into it seriously. at the one side just for the fun of it and on the other side to learn a good deal from it. so i came accross the "helprequested" where the CHC/CHC++ section caught my eye because i spent some time trying to implement the CHC++ in my own experimental renderer.
i wrote an email to sinbad and he confirmed that there is still interest in a generic implementation of CHC++ and that some people here in the forum have experience with it and some research is already going on.
so i just want to request feedback on how i can contribute on this topic because as i mentioned i am new to ogre (although not to graphics programming and software engineering :wink: ) but i think this is a good point to start from, learn quite much from it and contribute to the community.

a must have in my opinion is to have a geometrically highly complex scene with much occluders and occludees in it which can act as a standard scene for other occlusion culling algorithms and allowes to compare them directly (e.g. fps, rendererd objects/triangles) and then kick-off the implementation. during experimenting with my own renderer i came accross http://gamma.cs.unc.edu/POWERPLANT/ (for which i wrote an importer into my engine) maybe this model could be used to test the CHC++. unfortunately its in ply-format and as far as i know ogre doesn't support loading of ply-formats?

thanks for any advice
0 x
Mu

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Re: CHC++

Post by Praetor » Wed Nov 18, 2009 5:13 pm

He may have been referring to me. I have been researching and prototyping occlusion systems for a few months now. CHC++ is something I've been looking into for that time, but haven't started implementing yet. I managed to get in touch with one of the original researchers who published the CHC++ paper (I talked to Oliver Mattausch).

First there is another write-up about it in ShaderX7. I don't yet have this one, but I think I'm going to get a copy of it soon. He also gave me a link to the demos here: http://www.cg.tuwien.ac.at/~matt/chc++/. I haven't started picking it apart yet. I have a few other things to finish up first. He had some notes about it and Ogre though. He said that some parts of the render loop for Ogre had to be changed to accommodate the algorithm. One thing he picked out specifically was that the existing RenderQueue system for generically rendering objects wasn't well-suited to rendering the occlusion geometry so they implemented a light-weight parallel render queue just for that process. So, those are some things we should probably address and see if we can't smooth over.

Oh, another thing: in the demo there is apparently both the CHC++ system and a pre-calculated PVS system for comparison.

That's all for now. I know I'll be looking at the demos soon and hopefully studying the ShaderX article. As for what you can do: the same. Look at the demos. If you want to use the power-plant model as a test there are many ways to convert ply format to mesh.
0 x
Game Development, Engine Development, Porting
http://www.darkwindmedia.com

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Re: CHC++

Post by sinbad » Wed Nov 18, 2009 6:34 pm

Praetor wrote:He may have been referring to me.

Indeed I did :) I figured you might be able to help each other on this one.
0 x

User avatar
Lee04
Minaton
Posts: 944
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden

Re: CHC++

Post by Lee04 » Mon Nov 23, 2009 9:13 am

He said that some parts of the render loop for Ogre had to be changed to accommodate the algorithm.
Nice to see someone is heading in my direction of thought after like five years....
Everyone else have been saying you don't need to change the rendering loop.

Back ground I did a plug-in to change Ogre to allow for proper hardware occlusion query use.
My plug-in had some other features as well .

The basic OpenGL and DirectX API for harware occlusion queries was wrapped for Ogre and comited by myself back in the days.
People habe been using my warpper for sometime with oout changing the Ogre render loop.

That works for some usage like my optmization for cascaded shadow maps. Fast and dirty.

I have made changes for hardware occlusion query in my render -loop plug-in a long time ago and it still works just fine.

From the CHC++ paper:
Queues for batching of queries.
Before a node is queried, it is appended to a queue. Separate queues are used
for accumulating previously visible and previously invisible
nodes. We use the queues to issue batches of queries instead
of individual queries. This reduces state changes by one to
two orders of magnitude. The batching of queries will be
described in Section 4.

Multiqueries.
We compile multiqueries (Section 5.1),
which are able to cover more nodes by a single occlusion
query. This reduces the number of queries for previously invisible
nodes up to an order of magnitude.

Randomized sampling pattern for visible nodes. We
apply a temporally jittered sampling pattern (Section 5.2) for
scheduling queries for previously visible nodes. This reduces
the number of queries for visible nodes and while spreading
them evenly over the frames of the walkthrough.

Tight bounding volumes.
We use tight bounding volumes
(Section 6) without the need for their explicit construction.
This provides a reduction of the number of rendered
triangles as well as a reduction of the number of queries.
Randomized sampling pattern for visible nodes. Was committed with my original contribution to Ogre, but taken away by the Ogre team...

Tight bounding volumes
Well I use the low poly LOD of the real model and do the testing with per pixel accuracy in my plug-ins depth pass.
If that's not tight I don't know what is...I got the information from NVidias engineers to not use bounding boxes.
CHC++ is still using them, but tighter boxes.

Multiqueries
Multiqueries is supported by my plug-in.

Queues for batching of queries.
Is implemented in my plug-in as well.
It turns out that these changes of rendering state cause an
even larger overhead than the query itself.
Thus it is highly desirable
to reduce the number of state changes to an acceptable
amount: game developers refer to about 200 state changes
per frame as an acceptable value on current hardware.
Since I use the depth pass I don't have as much state changes and Ogre can render the color sorted on material or whatever.
Doing at at the depth pass means also that early z out culling can be used.

Well it's not so strange that it has all this, I work on my implementation for more than two years 2003-2005 and gave it a lot of thought and work.

I have made further hardware optimizations for seamless mix of indoor and outdoor scene mangers presented at Korean games konferance 2005 together with the hardware occlusion plug-in.
What you haave to remember CHC/CHC++ trys to solve it for a general loaded 3D scene with any content and for a game with sealessly mixed in and outdoors scene mangers of different types
hardware occlusion queries can be used smarter.

The HCH++ paper dosen't cover more ground than I did at KGC2005.
As a beneficial side effect, the v-queue reduces the effect
of violations of the front-to-back ordering made by the original
CHC algorithm.
It says reduces, not takes it away...the implementation I offer implementation does this with correct ordering.
0 x
Ph.D. student in game development

astin
Gnoblar
Posts: 2
Joined: Thu Dec 24, 2009 10:44 am

Re: CHC++

Post by astin » Thu Dec 24, 2009 12:47 pm

Ogre is using the RenderQueue to mannage the Renderables, operation rendering is run between two frames. If do not change the Ogre's loop, how to
implement the idea of CHC++ to render objects before querys not arrived? just call the renderOneFrame()?
0 x

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Re: CHC++

Post by Praetor » Sat Dec 26, 2009 2:37 am

Adjustments to the render queue were made for the CHC++ system. I haven't worked out the details of what is required yet, because I'm still working on another occlusion system right now.
0 x
Game Development, Engine Development, Porting
http://www.darkwindmedia.com

maxmstrmnn430
Gnoblar
Posts: 1
Joined: Mon Jan 03, 2011 8:41 pm

Re: CHC++

Post by maxmstrmnn430 » Mon Jan 03, 2011 8:50 pm

Is there any progress on this topic?
0 x

Post Reply