[x3d-public] Maya/RawKee first HAnimMotion export test
Don Brutzman
don.brutzman at gmail.com
Sat Oct 25 09:47:27 PDT 2025
Wow Aaron this is so great! LOL! 😄 👍
Observations:
- We have seen many variations in XYZ rotation ordering over the years,
and should not expect to define the "right" ordering. Rather we do have to
map inconsistencies to a common approach if we want repeatable animation.
- There is a very easy, simple technique to avoid mathematical
manipulations when shifting coordinate frames. Simply have three nested
Transform nodes for Roll Pitch Yaw (or whatever they are being called) and
set values on each individually.
- These are computationally very efficient. Browsers likely do that
automatically when computing the transformation matrix.
- X3D-Edit Transform node includes a "rotation calculator" that let's an
author do that at modeling time, if you want to go further and look for
example code.
- The three-nested-Transform-nodes approach is described in X3D for Web
Authors book chapter, slideset, and examples.
and
- HAnimMotion node carefully includes most of the structural animation
found in a BVH file for the same very-good reasons
- the *joints *field lists names what HAnimHumanoid joints are being
animated, in order
- the *channels *field lists has corresponding information for each
joint, describing how many values are found in a row/frame and what axis
they correspond to
- thus there is no ambiguity when parsing the *values* array of
frame-by-frame data regarding exactly which rotations go where
- Example from KoreanCharacterMotionAnnexD01Jin.x3d
- <HAnimMotion DEF='hanim_motion_animation' containerField='motions'
- description='BVH-derived dance movement' enabled='true'
- channels='6 Xposition Yposition Zposition Zrotation Xrotation
Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation Xrotation
Yrotation 3
Zrotation Xrotation Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation
Xrotation Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation Xrotation
Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation Xrotation
Yrotation 3
Zrotation Xrotation Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation
Xrotation Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation Xrotation
Yrotation 3 Zrotation Xrotation Yrotation 3 Zrotation Xrotation
Yrotation 3
Zrotation Xrotation Yrotation'
- joints='HumanoidRoot l_hip l_knee l_talocrural r_hip r_knee
r_talocrural vl5 IGNORED l_shoulder l_elbow l_radiocarpal IGNORED
r_shoulder r_elbow r_radiocarpal IGNORED skullbase' loop='true'
name='motion_animation'
Appreciate your careful diligence with these twists and turns. Such things
are never easy to get exactly correct, but when we align with a shared
common standard then we only have to succeed once!
p.s. endless improvement department: gee when designing HAnimMotion node,
i wish we had called the *names* field *jointNames *instead for correctness.
all the best, Don
--
X3D Graphics, Maritime Robotics, Distributed Simulation
Relative Motion Consulting https://RelativeMotion.info
On Fri, Oct 24, 2025 at 8:03 PM Bergstrom, Aaron via x3d-public <
x3d-public at web3d.org> wrote:
> I successfully implemented HAnimMotion node export from Maya using RawKee.
>
>
>
> You can see a video of the result running in Sunrize
>
>
> https://drive.google.com/file/d/1JBe6kO1UnbsXvfpMKfI-75DhpDdzng-L/view?usp=sharing
>
>
>
> If you look closely, you will notice that the rotation values are in the
> following order:
>
> Xrotation Yrotation Zrotation
>
>
>
> This is different from the recommend rotation order of:
>
> Zrotation Xrotation Yrotation
>
>
>
> Here is my justification.
>
>
>
> I’m guessing that mocap systems that use BVH to record data have a
> rotation order of ZXY.
>
>
>
> However, characters in Maya, at least the ones that I have worked with,
> have a joint rotation order of XYZ.
>
>
>
> Maya allows the artist to choose the rotation order of its joints. So I
> wrote the exporter so that it would export HAnimMotion nodes based on the
> joint rotation order chosen by the artist.
>
>
>
> The Conan character’s joint rotation order in Maya is XYZ.
>
>
>
> From what I can tell, this is allowed by the spec, even though it might
> not be the recommended practice.
>
>
>
> It’s just not worth effort for me to do all the math required to force the
> animator to use an ZXY joint rotation order. Because that would completely
> mess up the animation within Maya.
>
>
>
> The animation in the video looks slightly different than the
> TimeSensor/Interpolator version of the same animation, because the
> HAnimMotion version doesn’t export all the joint “translation” animations
> used by the Advanced Skelton tool.
>
>
>
> This is actually not a problem, as I only told it to export the joint
> position of the root joint node, but all the rotation values for the entire
> skeleton. I could have just as easily had RawKee export all the Position
> and Rotation information for all the joint nodes.
>
>
>
> We can debate whether or not I should allow anything other than ZXY joint
> rotation order, and we can debate whether I should allow position data to
> be exported for all joints, but it’s essentially working
>
>
>
> RawKee can now export HAnimMotion nodes.
>
>
>
> I’ll make a new release available once I’ve cleaned up a couple GUI issues
> and I enable AudioClip and MovieTexture support.
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20251025/364328de/attachment-0001.html>
More information about the x3d-public
mailing list