Scene Graphs?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dbzprogrammer
Posts: 5
Joined: Sat Nov 13, 2004 4:52 am

Scene Graphs?

Post by dbzprogrammer »

I am looking at different game engines. I've noticed that the Irrlicht engine is very fast and I love the fact that it's platform independant. I'm thinking about modding it a little for my purposes or I'll just make my own. My question is how do you structure a scene graph? I understand you attach children objects to parent objects, but what's the level of importance? I mean, in my game engine. should I have a character at a set level in the scene graph, or could I put a variable in determining what level it was. (Basically I could make it the "scenery" level if I wanted.) Any web pages or if you want to waste your time on me by explaining, would be greatly apprieciated. Thank you in advance.
Image
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Irrlicht is based on the Scene Manager system (the correct term for Irrlicht is Scene Manager, not Graph). The Scene Manager holds all information about what you can see. You use this manager to add billboards, meshes, cameras, etc. ... You can store the return value of such "adding process" in a pointer to the type. E.g.: store the return of addCameraSceneNodeFPS() in an ICameraSceneNode variable. The Scene Manager keeps track of everything that was added/modified in order to render it in the draw loop.
All the things you add can be independant. There isn't really a relationship between them at client-coding level (in the source you'll see everything is inherited from ISceneNode but that doesn't matters now). The relationship child-parent is created for some situations like attaching a weapon to a camera (weapon is a child of the camera). Then they will move, rotate and scale together.

Check out some examples. If you don't understand something, just ask. But you'll understand it fast I think :).
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
dbzprogrammer
Posts: 5
Joined: Sat Nov 13, 2004 4:52 am

Post by dbzprogrammer »

Thanks for the information. Can anyone explain to me what a Scene Graph is. Just some more detail, how would it work?
Image
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

A scene graph is just a system that uses a parent->child system, with the child inheriting things like position so that you can set positions relative to the parent. It's another Ameicanism of making things sound more complicated than they are, until you need something to stay in a relative position to another node ( like a weapon attached to a character ) you don't need to worry about it at all. Just remember it exists.
Post Reply