Jump to content
• Advertisement

# More Problems with Bones

This topic is 4849 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

Hi firends, I was creating my 3d character animation engine recently and faced quite a few problems. In fact, I posted one in a separate thread. However there were errors in explaining. So I decided to post this new thread ( sorry for that!). Since I am not any proffessional (a bit hobbiest) and am niether very experienced (experimented 3d programming (related to games) for 6 months before becoming serious) and am young (entered my college this year), so there could be errors still. Please forgive me for that. My problem is with hierarchial systems. My engine supports both quaternion and matrix based rotation system which can be switched with a definition(#define). However following the general method of transforming a child into world using its parents world state is not helping. The problem is not with the mathematics. I even tried using the d3dx library for clarifying my math code without any reported error. Here is what I do. //for matrix Matrix childWorld = childLocal * parentWorld; //which is very general //for quat Quaternion worldRot = localRot * parentRot; //This one I derived Vector WorldOffset = parentrot.rotateVector(offset) + parentOffset //from the above The result isn't happy in either case. My test program had a chain of cubes linked to each other with parent child relationship. I used a function to give each of these cube's coordinate frame some local rotation and offset so that the chain may look like a parabola. Now I expected that when I move/roatate the cube representing the head of the chain, the parabolic shape of the chain would remain intact, while the whole structure will show the translation/rotation as child nodes would do when its parent is transformed. Instead the chain is showing strange movements, like a t-rex's tail. What's more surprising is that intially the transformation sits in very well i.e., with the intial local transformation the child transforms well with respect to its parent, however things become strange when I do that at run time. Even my hierarchy traversal has no problem, a link list handles that. One thing more, my immediate representation of rotations is euler. To that someone suggested me to negate this euler rotations before calculating the quaternion. But I figured out that wasn't the problem. I am ready to provide my test application and libraries and source code if the need be so. Anybody ready to pay me some attention and time will be much appreciated, I am starving and my hair's turning gray, somebody save me!!! -Obi

#### Share this post

##### Share on other sites
Advertisement
Solved the problem anyway!
It had to do with my math code indeed! However anybody knowing how to use Quaternions with parent child hierarchy can help me! I would like to have the formula for transforming an object from local space to world space given the parent space,(I mean the Quat with the Offset(Vector).

--Any help will be appriciated!
-Obi

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5
• Advertisement

• 12
• 17
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633358
• Total Posts
3011511
• ### Who's Online (See full list)

There are no registered users currently online

×

## 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!