PDA

View Full Version : OpenGL Scene Management



Stebet
05-29-2002, 05:18 AM
A bit off topic, i know, but i've run out of good answers everywhere else and google ain't exactly helping a lot.

I'm trying to find a good system to store my vertices and polygonal data etc., that would make my life easier if i want to implement different techniques such as sorting front-to back, implementing QuadTree, Octrees or even BSP's. Currently i'm just creating a bunch of vertex-arrays and stuff and it's getting quite a bit messy, specially with all the VAR code and texture loading here and there http://www.opengl.org/discussion_boards/ubb/smile.gif

I'd have thought that good scene management data structures would help considerably for this but i'm not exactly finding a lot of information in this subject.

If anyone has any links or tips, and even good book hints that would be greatly appreciated.

Thanks in advance!
Stebet

knackered
05-29-2002, 05:31 AM
Store everything in a scenegraph - this is the most useful state to have everything in at the start. From there you can create bsp's for static branches of the scenegraph, then delete those branches.
It will also help you to create your own high level scenegraph file format - simple text format, for specifying test scenes etc.




MyTransformNode "TheWorld"
{
translate 300,200,100
rotate 90,0,0

MyGeometryNode "TheCar"
{
static false
filename "car.3ds"
}

MyGeometryNode "TheLandscape"
{
static true // will get converted to bsp
filename "landscape.3ds"
}
}


That kind of thing.

Stebet
05-29-2002, 05:53 AM
hm.. so you mean i should create a tree for my objects.. for example:




World
|-Static
| |-Landscape
| |-Trees
| |-Houses
|-Dynamic
|-Cars
|-Characters

I'm not sure i've seen the term scenegraph before so please correct me if i'm wrong.


[This message has been edited by Stebet (edited 05-29-2002).]

[This message has been edited by Stebet (edited 05-29-2002).]

knackered
05-29-2002, 05:59 AM
Yes, that's right. A tree.
Look up "scenegraph" in google.
A good example is "performer".

Stebet
05-29-2002, 06:26 AM
Thanks a lot.. finally some answers to work with http://www.opengl.org/discussion_boards/ubb/smile.gif

Jeffry J. Brickley
05-29-2002, 10:01 AM
Look for openscenegraph here on opengl.org, they have had several updates, I think now including OpenAL for audio, and model loading, etc. It is still in developement, but it beats writing your own, unless you really WANT to write your own. http://www.opengl.org/discussion_boards/ubb/smile.gif

Stebet
05-29-2002, 03:26 PM
Well.. actually i want to write my own scenegraph engine (or something similar) as doing things myself for the first time usually helps me learn these concepts a lot better, so if you people have any links for me regarding implementations that would be nice.

Thanks again