### Author Topic: understanding scene graph better?  (Read 3792 times)

0 Members and 1 Guest are viewing this topic.

#### firstep

• Newbie
• Posts: 14
##### understanding scene graph better?
« on: October 06, 2014, 03:26:04 pm »
Im having a trouble visualizing scene graph in my head. I read some blogs and it said that scene graph is like a stage? If this is right then what is scene node?

In Cs terms its a tree data. But in game how can you visualize it? In SFML book it said

Quote
A scene graph contains a root scene node, which exists only once in a world.

The term world makes me think to visualize this scene graph as a world? is this right? So this root scene node is the origin? Like for example the (0,0) top-left coordinate?

#### wintertime

• Sr. Member
• Posts: 255
##### Re: understanding scene graph better?
« Reply #1 on: October 06, 2014, 03:33:00 pm »

#### firstep

• Newbie
• Posts: 14
##### Re: understanding scene graph better?
« Reply #2 on: October 06, 2014, 03:50:41 pm »

Hi, Thanks for the link. I somehow understand the scene graph but i cant understand most of the part about traversing. Im just a noobie in game development and have no idea what the author means by that.

Anyway if this scene graph thingy is such a bad idea, I wonder why the author of the SFML book use it. I mean it could be a plus for them for teaching some aspiring developers to use a proper technique which they learned from SFML. But i guest that that only applies to 3D.

#### Nexus

• SFML Team
• Hero Member
• Posts: 6275
• Thor Developer
##### Re: understanding scene graph better?
« Reply #3 on: October 06, 2014, 04:55:15 pm »
The scene graph does not represent the world, but rather the scene (i.e. mainly the visualized part of the world). And it's just one of many approaches, which has the advantage of expressing relative transforms very easily.

The blog post doesn't argue against scene graphs, but rather against the usage pattern of having one single scene graph represent everything and refraining from using alternative data structures and relationship models. In addition, the author focuses on one particular (and somewhat arbitrary) point: "minimal state change". Based on such questionable premises, he generalizes his view and comes to the conclusion "scene graphs - just say no". Very objective analysis indeed

When you don't understand scene graphs, you should first read about their purpose -- e.g. on Wikipedia or game development articles -- and not a blog describing a specific problem in a specific situation.
« Last Edit: October 06, 2014, 04:57:09 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

#### firstep

• Newbie
• Posts: 14
##### Re: understanding scene graph better?
« Reply #4 on: October 06, 2014, 05:44:05 pm »
The scene graph does not represent the world, but rather the scene (i.e. mainly the visualized part of the world). And it's just one of many approaches, which has the advantage of expressing relative transforms very easily.

Thanks.

When you don't understand scene graphs, you should first read about their purpose -- e.g. on Wikipedia or game development articles -- and not a blog describing a specific problem in a specific situation.
Yeah i read the wikipedia but it only view it as a tree data.

#### firstep

• Newbie
• Posts: 14
##### Re: understanding scene graph better?
« Reply #5 on: October 08, 2014, 04:58:07 pm »
Sorry for being persistent but Is it right to view this scene graph as like a space? where every node is an object?

#### Nexus

• SFML Team
• Hero Member
• Posts: 6275
• Thor Developer
##### Re: understanding scene graph better?
« Reply #6 on: October 08, 2014, 05:14:03 pm »
I don't know how exactly "space" comes to your mind... A scene graph is just a data structure. Like an array or a linked list, but in tree form. On its own, it does not have a physical representation in the world, it's not even space. The scene graph expresses a relation between different objects in a game.

If you forcefully want to assign a meaning to the scene graph itself (and not the nodes), the most meaningful term is "scene", as already mentioned above.
« Last Edit: October 08, 2014, 05:16:27 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: