Original Post
🔒 Locked
SceneGraph
Advertisement
A scenegraph is a directed non-cyclic graph that represents the relationships between the objects in your scene e.g. a player may be holding a torch in his/her hand. The scene graph would represent this by being the tree like this:
World
-- Player
-- left arm
--left hand
--torch
--right arm
--right hand
If you''re doing a 3d game, you should have some type of scene graph. It doesn''t necessarily have to go in the database. The main point of a scene graph is to propagate 3d transformations. For example, old school no-scenegraph games (like quake 1), would have to do strange things to let characters hold a gun. You would animate the character running and waving his arms, and then you would have to save a seperate animation of the gun waving around as if attached to an invisible arm, and then you play them both at the same time to make it look like the character is holding the gun while he''s running around. With a scene graph, you can basically attach any object as a child to any other object and then that object will move along properly with the parent object easily. So you attach the gun or sword or whatever to the character''s hand and when he swings his arms around, the weapon moves properly as well. This is useful all over the place: characters riding in cars, sparks coming off a torch, crates in an elevator, etc.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement