Sunday, January 4, 2009

Handling Scene Geometry

I recently bumped into a post by Roderic Vicaire on the www.gamedev.net forums. It is here.
Obviously there is no generic solution to handle all scene geometry in the same way but depending on the game his naming conventions make a lot of sense (read "Scenegraphs say no" in Tom Forsyth's blog).
- SpatialGraph: used for finding out what is visible and should be drawn. Should make culling fast
- SceneTree: used for hierarchical animations, e.g. skeletal animation or a sword held in a character's hand
- RenderQueue: is filled by the SpatialGraph. Renders visible stuff fast. It sorts sub arrays per key, each key holding data such as depth, shaderID etc. (see Christer Ericson's blog entry "Sort based-draw call bucketing" for this)

4 comments:

Unknown said...

Hi, I would like you to check out this Open Source Engine call OGRE (Object-Oriented Graphics Rendering Engine) lead by Steve Streeting...

http://www.ogre3d.org/

and his blog post too.

http://www.stevestreeting.com/2009/01/05/spatialgraph-scenetree-renderqueue-sound-familiar/

I have been using OGRE for 2 years and these are features that I have been enjoying without realizing. :P Maybe someone who aren't as proficient in graphics programming might want find a more out of box solution. OGRE is definitely one of the choice. I learnt a lot about graphics programming since I pick up OGRE. :D

Wolfgang Engel said...

Great! I am glad you like OGRE. In general it all depends on which hardware platform you are. You will choose different tools for different platforms.
I am honored that my blog post is mentioned on Steve's blog.

Rodéric Vicaire said...

Hi, I'm rather proud to be "quoted" on your blog ! :)
I happen to be reading it regularly (at least twice a week), and I was surprised to see my name there :)

BTW, I'd like to point out a little mistake in my firstname, it's "Rodéric", without an ending 'k' :)

Ed Welch said...

Great post. I never did see much use for scene graphs. However, the data is normally exported from the 3d package as a scene graph, so it's rather hard to avoid them.