Translation along object's coordinates
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/05/2008 at 00:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R9-R10.5
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
This is a puzzling problem. I have a set of bones in a hierarchy. Each defines its coordinate system and should be translated along it in spite of its parent's coordinate system orientation. For instance, the parent system is rotated 45d about the X-axis but the object system has no rotation. When translated, the object should move along its system without consideration of its parent system.My thought is that there must be some retroactive compensation between the parent and object systems or that the parent system must be ignored during the object transformation somehow.
As far as I know, this only involves rotated system relationships - i.e.: orientations. General rotations of the parent do affect the children objects.
Any takers?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/05/2008 at 00:22, xxxxxxxx wrote:
So you want the child object to be affected by the translation of the parent, but not by the rotation?
Here is one way of "undoing" the rotation of a parent object:
1. Get the parents normalized global matrix (Mgn). Let's call this matrix M.
2. Set the translational part of M to zero, i.e. M.off=(0,0,0)
3. Multiply the child objects global matrix by the inverse M.Hope this helps
/Filip -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/05/2008 at 08:58, xxxxxxxx wrote:
No. The child needs to be affected by the rotation/translation but not the orientation of the parent object. My bone objects have an initial orientation of their coordinate system about which they rotate/translate - but it seems that children ignore this initial orientation of the parent and rotate/translate/scale along their own system. Children are still affected by the parent's rotations/translations but not the orientation.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2008 at 03:08, xxxxxxxx wrote:
Robert, I have difficulties to visualize your problem. Maybe you can post a picture or something that helps me to understand this better.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2008 at 13:58, xxxxxxxx wrote:
Here we go.
Fig. 1: This shows the orientation of the head bone. The orientation is described by the rotation of the red/green crosshairs - 35.221d/0d/0d is the orientation (see below)
Fig. 2: This shows the orientation of the lowerjaw - a child of the head. Orientation is 0d/0d/0d.
Fig. 3: This shows the orientation settings of the head bone.
Fig. 4: This shows the rotation of the head bone (0d/0d/0d).
So, basically, there are two rotation sets on my plugin bones - orientation and rotation.
Fig. 5: This is what happens when the lowerjaw bone is translated Y. Note that the mesh translates along the proper system (the lowerjaw system) but that the bone translates with respect to the orientation of the head bone which in turn causes the lowerjaw's children (the tongue parts) to translate incorrectly.
Obviously, something that I'm doing to the matrix applied to the mesh (which is correct) isn't being done to the matrix applied to the bone. Unfortunately, the same matrix is not used between bone transformations and mesh deformations.
The lowerjaw bone needs to move along an unrotated axis and not the oriented axis of the head. If the head is 'rotated', the lowerjaw bone needs to respond to this for obvious reasons.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/05/2008 at 15:39, xxxxxxxx wrote:
Just thought I'd pop back in here to announce that it is solved. As expected, simply applying the parent's inverted orientation matrix to the translations of the child bone has worked.
This is what I was trying to achieve:
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/05/2008 at 00:18, xxxxxxxx wrote:
good to hear it's solved. so you are creating a human turtle generator plugin
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/05/2008 at 09:09, xxxxxxxx wrote:
Yeah, that's it. This was just one of the instigators leading to realizing the problem - this pose (and others) applied to the original figure translates the jaws.