Jump to content
  • Advertisement
Sign in to follow this  
Ender1618

DX11 Scene Transform Hiearchies

This topic is 3208 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok so I am once again overhauling my engine for a new DX11 implementation, and I have revisited the age old question of scene level transform hierarchies. I am debating between 3 different methodologies: *Note for each of these methods, any type of bone hierarchies are maintained within the Model class, with allowed attachment points for any FrameRef to any bone. This supports skinned mesh bones and things like wheels on cars. Method 1: The class FrameRef contains a simple local position and orientation, and a list of children FrameRefs. Classes Camera, Light, and Model derive from FrameRef. A complex hierarchy can be formed with a tree of any of these derived classes as well as instances of non-derived from FrameRefs themselves. For example you could have a Model attached to a FrameRef which is attached to a Camera. Pros: - Very simple design Cons: - There are now 2 very different types of things in the scene graph - Takes extra FrameRefs to introduce an offset (e.g. you want your character facing -z not +z by default) Method 2: The class FrameRef contains a local position and orientation as well as an offset position and orientation. Classes Camera, Light, and Model derive from SceneNode which derives from FrameRef. This is similar to how 3DSMax does its hierarchies, giving one the capability to change the pivot point of an object. To accomplish this with method 1 you would need to use an extra FrameRef. A complex hierarchy can be formed with a tree of SceneNodes. For example you could have a car model that when imported has its pivot 1 meter off the ground (say at the 3D center of the cars bounding box), you could use the offset to push the pivot down to bottom of the wheels. Pros: - Encompasses offset transforms nicely - There is only really one type of object in the scene graph, a SceneNode Cons: - Added complexity in FrameRef Method 3: The class FrameRef contains a simple local position and orientation, a pointer to an optional scene object (such as a camera, light, or model), and a list of children FrameRefs. This is similar to how Ogre does it's hierarchies. Pros: -Ogre does it ? Cons: -Can no longer just add a camera to a scene, need at least a FrameRef and a Camera to accomplish this Any insight would be appreciated. Thanx [Edited by - Ender1618 on November 4, 2009 12:37:29 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!