[x3d-public] How to do hanim component level 1 and 2 simultaneously
John Carlson
yottzumm at gmail.com
Wed May 7 02:28:16 PDT 2025
So I had a thought that my single skin animation didn’t work in Castle
because I listed the point field in both Coordinate nodes, even though I
listed the different point fields in my multi mesh example and it kind of
works, probably because the shapes were outside the humanoid in humanoid
USEd transforms. WIP.
I am reluctant to put all points in skinCoord and reference them from
segment or site IndexedFaceSets. I feel it’s more appropriate to use a
single skin mesh in the skin field’s Coordinate, but if it’s all one
Coordinate, that should be ok. What I would worry about is having
Transforms in sites, segments and skin throwing off coordinate locations,
and not being transparent.
Also realize the sites can contain billboard, text and touchsensor nodes on
import!
What I’m hearing is coordIndex fields need to be changed (not the
standard). to allow for more than one coordIndex field to reference a
Coordinate point field. Weird! I’m guessing an offset into the Coordinate
for each Coordinate USE could be used for simplicity. Is there a such a
beast?
Hmm!
John
On Tue, May 6, 2025 at 11:02 AM John Carlson <yottzumm at gmail.com> wrote:
> Thumbs up, Joe!
>
> On Tue, May 6, 2025 at 10:13 AM Joe D Williams <joedwil at earthlink.net>
wrote:
> > I meant to say children of Joint are Joints and Segments (normally just
one Segment)
OK John, but a Joint can contain one of more Segment objects and the onlyle
instance where a Joint does not include at least one Join tis when the
Segment terminates with an end-effector Site. Fingers and Toes, for
instance
Thanks,
-----Original Message-----
>
>> From: John Carlson <yottzumm at gmail.com>
>> Sent: May 5, 2025 6:39 PM
>> To: Joe D Williams <joedwil at earthlink.net>
>> Cc: Bergstrom Aaron <aaron.bergstrom at und.edu>, Carol McDonald <
>> cemd2 at comcast.net>
>> Subject: Re: X3D/HAnim from Maya using RawKee X3D Exporter
>>
>>
>>
>>
>> On Mon, May 5, 2025 at 5:57 PM Joe D Williams <joedwil at earthlink.net>
>> wrote:
>>
>>> > Note while HAnim says sequence of object for joint children
>>>
>>>
>>>
>>> yes a hierarchy where the Joint can contain one of more Segment objects
>>>
>>> which can contain shapes and one or more Site objects which can
>>>
>>> contain anything x3d including viewpoints and sensors.
>>>
>>>
>>>
>>> Please don't set anything directly to the Joint except Segment
>>>
>>> and another Joint. Displacer for Shape on that Segment.
>>>
>>
>>
>> I agree.
>>
>>>
>>>
>>>
>>>
>>> > , limiting joint children to joints and segments
>>>
>>
>> I meant to say children of Joint are Joints and Segments (normally just
>> one Segment). Joints are not children of Segments.
>>
>>
>> Joints also have Displacers et al, but no geometry nodes or X3DGroups.
>> Those go in Segments, Sites, or the Humanoid.
>>
>> >Please No, a Joint can only be a child of a Parent Joint,except Root
>> which is contains skeletoncontained by Humanoid. So, "Standard" Segment
>> objects cannot contain"Standard" Joint nodes. Of course the skeleton
>> Joint-driven animations might be a design feature of an accessory child of
>> aSegment or Site, it will not be legal to insert aJoint that is a child of
>> a Segment or Siteinto the "standard" skeleton.Thanks,JoeSite, =style
>>
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: John Carlson <yottzumm at gmail.com>
>>> Sent: May 5, 2025 12:17 PM
>>> To: Bergstrom, Aaron <aaron.bergstrom at und.edu>
>>> Cc: Carol McDonald <cemd2 at comcast.net>, joedwil at earthlink.net <
>>> joedwil at earthlink.net>
>>> Subject: Re: X3D/HAnim from Maya using RawKee X3D Exporter
>>>
>>>
>>> Note while HAnim says sequence of object for joint children, X3D4 is
>>> much more restrictive:
>>>
>>> https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/hanim.html#HAnimJoint
>>>
>>> , limiting joint children to joints and segments. It’s probably safest
>>> to go with the more restrictive standard.
>>>
>>> FYI,
>>>
>>> John
>>>
>>> On Mon, May 5, 2025 at 1:59 PM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> Okay, it looks like you are doing multimesh skins, perhaps with
>>>> segment/site geometry, maybe for initial skeleton visualization geometry
>>>> for animation debugging the output. As I think I said, segment/site
>>>> geometry can be used in addition to “single skin” geometry, if Maya
>>>> supports segment/sites. If not, you have to come up with your own skeleton
>>>> visualization, and remember that joints don’t support geometry or groups as
>>>> children, last I checked. Some browsers will let you get away with this.
>>>> I have had issues displaying the leaf joints of the skeleton, because
>>>> there’s no child joint, but there’s probably a segment and site.
>>>>
>>>> Visualizing skeleton is key to getting skin animations right, IMO.
>>>> Best to have it as an export option, if possible.
>>>>
>>>> On Mon, May 5, 2025 at 8:59 AM Bergstrom, Aaron <
>>>> aaron.bergstrom at und.edu> wrote:
>>>>
>>>>> John, Carol, and Joe,
>>>>>
>>>>>
>>>>>
>>>>> So the Tuesday afternoon meeting agenda can change somewhat.
>>>>>
>>>>>
>>>>>
>>>>> After reading through some of John’s advice, and then reviewing my old
>>>>> code from the old C++ version of RawKee, I was able to largely figure out
>>>>> what I was doing wrong.
>>>>>
>>>>>
>>>>>
>>>>> As such, I now have HAnim export working with Skinning for multiple
>>>>> meshes per character rig.
>>>>>
>>>>>
>>>>>
>>>>> To be honest, since our flurry of email last week, I still fumbled
>>>>> around for 3 days trying to figure it out, and it was driving me CRAZY, but
>>>>> I probably wouldn’t have been able to figure it out without John’s feedback.
>>>>>
>>>>>
>>>>>
>>>>> That said, it now works with Maya skinned characters that have simple
>>>>> to moderately complex Maya Dependency Graphs.
>>>>>
>>>>>
>>>>>
>>>>> Much of the problem I had before stemmed from the fact that I had both
>>>>> Maya and HAnim misconceptions, which were really confounding what the
>>>>> actual problem was for me.
>>>>>
>>>>>
>>>>>
>>>>> Now that I have these misconceptions resolved, I just have the Maya
>>>>> complex Dependency Graph issues to take care of. Where this comes into play
>>>>> is support for other character animation add-ons for Maya like Advanced
>>>>> Skeleton.
>>>>>
>>>>>
>>>>>
>>>>> But that’s purely a Maya issue on which I will have to consult a Maya
>>>>> API expert. I sort of have access to one through Patreon, so I will reach
>>>>> out to him after I write up the question to him in a way he can provide
>>>>> feedback.
>>>>>
>>>>>
>>>>>
>>>>> I’m very close to having RawKee X3D export working for Advanced
>>>>> Skeleton characters. I expect to have it working once I have the dependency
>>>>> graph issues resolved.
>>>>>
>>>>>
>>>>>
>>>>> Anyway, I can show HAnim export in action on Tuesday, and we can also
>>>>> discuss what I’m planning next for RawKee/HAnim, in time for Siggraph 2025
>>>>> and Web3D 2025, such as:
>>>>>
>>>>> - HAnim GUI for Export Set Up
>>>>> - Maya AnimClip export for transform and HAnim animations through
>>>>> both HAnimMotion and various X3D Interpolator use cases.
>>>>>
>>>>>
>>>>>
>>>>> See you all on Tuesday.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Aaron
>>>>>
>>>>>
>>>>>
>>>>> *From:* John Carlson <yottzumm at gmail.com>
>>>>> *Sent:* Friday, May 2, 2025 4:32 AM
>>>>> *To:* Bergstrom, Aaron <aaron.bergstrom at und.edu>
>>>>> *Cc:* Carol McDonald <cemd2 at comcast.net>; joedwil at earthlink.net
>>>>> *Subject:* Re: X3D/HAnim from Maya using RawKee X3D Exporter
>>>>>
>>>>>
>>>>>
>>>>> Ok. I think setting skinNormal in HAnimHumanoid and normal in the IFS
>>>>> should be ok, if you have a need for it, perhaps for clothing textures.
>>>>> Just be aware that the X3D browsers can generate defaults for normals.
>>>>>
>>>>>
>>>>>
>>>>> Normally HAnim DEFs have prefix+”_”+name, but there are many cases
>>>>> where this varies widely, and I don’t think we have a perfect example which
>>>>> contains everything. Please check the HAnim specification, or make use of
>>>>> X3DJSAIL or X3D-Edit QA checkbox icon. Prefix is chosen on an avatar basis
>>>>> so avatars can have unique DEFs within a scene (or within a namespace).
>>>>> Names are not unique, except for Protos as well. I’m pretty Protos are
>>>>> registered in some X3D browsers, but I don’t know current specs.
>>>>>
>>>>>
>>>>>
>>>>> John
>>>>>
>>>>>
>>>>>
>>>>> On Thu, May 1, 2025 at 5:59 PM Bergstrom, Aaron <
>>>>> aaron.bergstrom at und.edu> wrote:
>>>>>
>>>>> Carol,
>>>>>
>>>>>
>>>>>
>>>>> *Native Dancer Questions*
>>>>>
>>>>> In regard to these questions, which I’m guessing are more related to
>>>>> the Native Dancer project:
>>>>>
>>>>> - *How are you attaching the garments to the skeleton? *
>>>>> - *How are you working out the collisions or are you doing that in
>>>>> Maya first? *
>>>>>
>>>>>
>>>>>
>>>>> I probably gave the wrong impression that I am attempting to export
>>>>> Native Dancer content, which is not the case. I was just pointing to our
>>>>> Native Dancer project as some of the other related work we are doing with
>>>>> Unreal. Though I would hope in the future we could export it to X3D at some
>>>>> point. Be here is our process for the Dancer characters.
>>>>>
>>>>> - We generate the person either in Reallusion Character Creator or
>>>>> Metahuman.
>>>>> - Dancer Powwow Regalia (clothing) is designed in Marvelous
>>>>> Designer around those characters, some cloth physics data is applied here.
>>>>> - Once the clothing has been designed, our artist adds further
>>>>> jewelry, headwear, and hair grooms in Maya
>>>>> - This is then exported to a format that is then imported into
>>>>> Unreal – I think FBX, but it might be Alembic.
>>>>> - Once in Unreal, we apply BVH mocap data to the dancer avatar
>>>>> - Once the mocap data has been applied, we use an AI-based Unreal
>>>>> plugin called uDraper to optimize the cloth physics.
>>>>> - If we try to run the dancer animation in real-time using the
>>>>> real-time uDraper cloth solver, we get about 4 frames per second with a
>>>>> high-end graphics card (Nvidia A6000).
>>>>> - However, if we use uDraper to cache the cloth physics, then we
>>>>> get 30fps playback using a Meta Quest 3 driven by a similar graphics card.
>>>>>
>>>>>
>>>>>
>>>>> All of that said, I just purchased Numerion Software’s Carbon
>>>>> soft-body physics solver for Maya. My hope is that we will be able to use
>>>>> Carbon to cache Regalia cloth physics in Maya, and then use RawKee to
>>>>> export everything out to X3D - using CoordinateInterpolator nodes as the
>>>>> means for exporting the cached cloth data.
>>>>>
>>>>>
>>>>>
>>>>> *Skin Export Questions*
>>>>>
>>>>> But that’s getting ahead of myself. To answer your other questions:
>>>>>
>>>>> - *What are the joints? LOA 1 or the defaults from Maya? *
>>>>> - *One skin or body segments? *
>>>>>
>>>>>
>>>>>
>>>>> If I export body segment HAnim content, this works no problem. This is
>>>>> essentially Maya mesh nodes that have Maya joint nodes as parents.
>>>>>
>>>>>
>>>>>
>>>>> Keep in mind, I haven’t implemented HAnimMotion nodes yet, nor have I
>>>>> implemented interpolator node animation export. I’ve determined that this
>>>>> works by loading the exported X3D file into Sunrize, and the change the
>>>>> ‘rotation’ values.
>>>>>
>>>>> - My recreated Maya segment version of JinLOA1 (loa still set to
>>>>> ‘-1’ ) –
>>>>> https://drive.google.com/drive/folders/1ut7fDyPe2bYNZnqtWF2s3aQFxwWZFIq7
>>>>>
>>>>>
>>>>>
>>>>> The problem comes in when I’m attempting to export Skinned data.
>>>>>
>>>>>
>>>>>
>>>>> Essentially, I setup my Maya joints so that the ‘translation’ values
>>>>> are the only values that are not zero. They are essentially nested joints
>>>>> with relative ‘translate’ values. All other joint values (rotation, joint
>>>>> orientation, scale), they are all set to zero.
>>>>>
>>>>>
>>>>>
>>>>> When loaded into the X3D Sunrize Editor, all the point data in the
>>>>> skin is stretched bizarrely. However, if I manually change all the
>>>>> HAnimJoint ‘translation’ values to ‘0 0 0’, the stretching goes away, and
>>>>> the skin looks as intended.
>>>>>
>>>>>
>>>>>
>>>>> Which suggests to me that maybe Sunrize doesn’t like the structure of
>>>>> my HAnimHumanoid… ether because I’m just not doing it right, or because
>>>>> Sunrize has an HAnim Bug? IDK.
>>>>>
>>>>>
>>>>>
>>>>> At the risk of providing too much info… here’s the explanation of how
>>>>> my HAnimHumanoid nodes are contructed.
>>>>>
>>>>>
>>>>>
>>>>> *AdvancedSkelton*
>>>>>
>>>>> My test models have been AdvancedSkelton example files found at – (
>>>>> https://animationstudios.com.au/rigs/ ). Some screenshots of text
>>>>> exports can be found here:
>>>>>
>>>>> - Conan – Maya / X3D Comparison – Mesh Export Only –
>>>>> https://drive.google.com/file/d/1Qsw4asHx3teolnol_GPeZeLgdb1hkMa7/view?usp=sharing
>>>>> - Conan – X3D Export with most things, but without
>>>>> ‘skinWeightCoord’ –
>>>>> https://drive.google.com/drive/folders/1ut7fDyPe2bYNZnqtWF2s3aQFxwWZFIq7
>>>>>
>>>>>
>>>>>
>>>>> *Export Details*
>>>>>
>>>>> - The HAnimHumanoid LOA field is set to -1 by default because I
>>>>> haven’t implemented a mechanism/GUI to set the LOA value or joint ‘name’
>>>>> fields.
>>>>>
>>>>>
>>>>> - Because of this, the HAnimJoint nodes have DEF’s, but their
>>>>> ‘name’ fields are empty
>>>>> - HAnimHumanoid’s ‘skeletalConfiguration’ field is set to
>>>>> “CUSTOM”.
>>>>>
>>>>>
>>>>> - The ‘skeleton’ field is populated by a “tree” of DEF’d
>>>>> HAnimJoint nodes.
>>>>> - The ‘joints’ field is populated by a “list” of USE’d HAnimJoint
>>>>> nodes that have all been previously DEF’d in the ‘skeleton’ field.
>>>>> - The ‘skeleton’ field is written to the X3D file before the
>>>>> ‘joints’ field so that the nodes appear in proper DEF/USE order within the
>>>>> X3D file’s Scenegraph.
>>>>> - For every Maya “joint” node in the Maya skeleton Hierarchy there
>>>>> is a corresponding HAnimJoint node found in the Hierarchy of the
>>>>> HAnimHumanoid ‘skeleton’ field.
>>>>>
>>>>>
>>>>>
>>>>> *Joint Bindings*
>>>>>
>>>>> - For every HAnimJoint listed in the ‘joints’ field, there is a
>>>>> corresponding SFVec3f value listed in the MFVec3f ‘jointBindingPositions’
>>>>> field in the same order that they appear in the ‘joints’ field.
>>>>> - The “jointBindingRotations” and “jointBindingScales” fields are
>>>>> left empty.
>>>>>
>>>>>
>>>>>
>>>>> *BaseCoord Node*
>>>>>
>>>>> - A ‘Coordinate’ node is DEF’d in the HAnimHumanoid’s
>>>>> “skinBindCoords” field (let’s say that this Coordinate node is DEF’d as
>>>>> ‘BaseCoord’)
>>>>>
>>>>>
>>>>> - This is later USE’d in that node’s “skinCoord” field
>>>>> - And this is later USE’d in the ‘coord’ field of all
>>>>> Shape>IndexedFaceSet nodes found as children in the “skin” field
>>>>>
>>>>>
>>>>> - If appropriate (based on export settings) a ‘Normal’ node
>>>>> (possibly per vertex or per face) is DEF’d in the HAnimHumanoid’s
>>>>> “skinBindNormals” field
>>>>>
>>>>>
>>>>> - This is later USE’d (as appropriate) in that node’s “skinNormal”
>>>>> field
>>>>> - And this is later USE’d in the ‘normal’ field of all
>>>>> Shape>IndexedFaceSet nodes found as children in the “skin” field.
>>>>>
>>>>>
>>>>>
>>>>> *Packing The BaseCoord Node*
>>>>>
>>>>> The ‘BaseCoord’ node is packed with the vertices of all the Maya Mesh
>>>>> nodes that are used in the skin. So if three Maya Mesh nodes are used in
>>>>> the Maya skin, then three corresponding “Shape>IndexedFaceSet” nodes will
>>>>> be listed in the “skin” field of the HAnimHumanoid node.
>>>>>
>>>>>
>>>>>
>>>>> As such, if the Maya Mesh nodes have the following vertex values:
>>>>>
>>>>> 1. Node 1:
>>>>>
>>>>>
>>>>> 1. (0.1 0.2 0.0),
>>>>> 2. (3.0 0.2 0.0),
>>>>> 3. (0.1 4.2 5.0)
>>>>>
>>>>>
>>>>> 2. Node 2:
>>>>>
>>>>>
>>>>> 1. (3.0 2.0 0.0),
>>>>> 2. (3.0 0.5 7.0),
>>>>> 3. (1.1 1.2 1.0)
>>>>>
>>>>>
>>>>> 3. Node 3:
>>>>>
>>>>>
>>>>> 1. (10.1 0.2 0.0),
>>>>> 2. (9.0 0.2 0.0),
>>>>> 3. (8.1 8.2 8.0)
>>>>>
>>>>>
>>>>>
>>>>> Then the “point” field of the ‘BaseCoord’ node will have the following
>>>>> values:
>>>>>
>>>>> *point=’ 0.1 0.2 0.0, 3.0 0.2 0.0, 0.1 4.2 5.0, 3.0 2.0 0.0, 3.0
>>>>> 0.5 7.0, 1.1 1.2 1.0, 10.1 0.2 0.0, 9.0 0.2 0.0, 8.1 8.2 8.0’*
>>>>>
>>>>>
>>>>>
>>>>> Then the “coordIndex” field of all the Shape>IndexFaceSet nodes will
>>>>> have values similar to the following:
>>>>>
>>>>> 1. Node 1
>>>>>
>>>>>
>>>>> 1. coordIndex=’0 1 2 -1’
>>>>>
>>>>>
>>>>> 2. Node 2
>>>>>
>>>>>
>>>>> 1. coordIndex=’3 4 5 -1’
>>>>>
>>>>>
>>>>> 3. Node 3
>>>>>
>>>>>
>>>>> 1. coordIndex=’6 7 8 -1’
>>>>>
>>>>>
>>>>>
>>>>> For this example, each HAnimJoint could have up to 9 skinWeights, such
>>>>> as:
>>>>>
>>>>> 1. skinCoordWeight=’0.4 0.0 0.15 1.0 0.2 0.29 0.0 0.0 0.7’
>>>>> 2. skinCoordIndex=’0 1 2 3 4 5 6 7 8’ <--- corresponds
>>>>> to the index of the points in the “point” field of the BaseCoord node.
>>>>>
>>>>>
>>>>>
>>>>> Or it could have fewer than 9, with something like the following:
>>>>>
>>>>> 1. skinCoordWeight=’0.4 0.15 1.0 0.2 0.29 0.7’
>>>>> 2. skinCoordIndex=’0 2 3 4 5 8’ <--- corresponds to the
>>>>> index of the points in the “point” field of the BaseCoord node.
>>>>>
>>>>>
>>>>>
>>>>> I realize that this is an extremely long email… so kudos if you made
>>>>> it to the end.
>>>>>
>>>>>
>>>>>
>>>>> Aaron
>>>>>
>>>>>
>>>>>
>>>>> *From:* Carol McDonald <cemd2 at comcast.net>
>>>>> *Sent:* Thursday, May 1, 2025 2:11 PM
>>>>> *To:* Bergstrom, Aaron <aaron.bergstrom at und.edu>;
>>>>> joedwil at earthlink.net; John Carlson <yottzumm at gmail.com>
>>>>> *Subject:* Re: X3D/HAnim from Maya using RawKee X3D Exporter
>>>>>
>>>>>
>>>>>
>>>>> Aaron,
>>>>>
>>>>>
>>>>>
>>>>> The answer is yes and no, am I the correct person? I am very
>>>>> interested in the details coming out of Maya
>>>>>
>>>>>
>>>>>
>>>>> What are the joints? LOA 1 or the defaults from Maya?
>>>>>
>>>>> One skin or body segments?
>>>>>
>>>>> How are you attaching the garments to the skeleton?
>>>>>
>>>>> How are you working out the collisions or are you doing that in Maya
>>>>> first?
>>>>>
>>>>>
>>>>>
>>>>> Joe or John work on the exporters so they might understand the details
>>>>> of what is going wrong.
>>>>>
>>>>>
>>>>>
>>>>> Perhaps we can set up a time to talk.
>>>>>
>>>>>
>>>>>
>>>>> Carol
>>>>>
>>>>> On 05/01/2025 10:15 AM PDT Bergstrom, Aaron <aaron.bergstrom at und.edu>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Carol,
>>>>>
>>>>>
>>>>>
>>>>> I apologize if I have the wrong person, but I believe you joined the
>>>>> last Web3D Consortium HAnim Working Group call.
>>>>>
>>>>>
>>>>>
>>>>> While I don’t believe we’ve ever had an opportunity to meet each
>>>>> other, I was wondering if you might be available to discuss the X3D/HAnim
>>>>> spec?
>>>>>
>>>>>
>>>>>
>>>>> Just a bit of background, I am a member of the Web3D Consortium, and
>>>>> on the board. I run the Univ. of North Dakota (UND) – Computational
>>>>> Research Center, which houses UND’s High Performance Computing systems and
>>>>> the UND DREAM Lab (a VR lab).
>>>>>
>>>>>
>>>>>
>>>>> I have a two projects which I lead – the Native Dancer Metaverse
>>>>> Project (powwow video game project), and the RawKee X3D Exporter for Maya.
>>>>>
>>>>> - Native Dancer
>>>>>
>>>>>
>>>>> - Website: https://NativeDancer.und.edu/
>>>>> - Demo Video (Unreal) -
>>>>> https://www.youtube.com/watch?v=CTvHCDfbdsM
>>>>>
>>>>>
>>>>> - RawKee X3D Exporter for Maya –
>>>>> https://github.com/und-dream-lab/rawkee/
>>>>> - Computational Research Center – https://crc.und.edu/
>>>>> - DREAM Lab – https://dream.crc.und.edu/
>>>>>
>>>>>
>>>>>
>>>>> The reason I am reaching out is that I'm having a problem properly
>>>>> structuring the HAnim X3D export out of Maya, and I was hoping to chat with
>>>>> a person with HAnim expertise who could give me some guidance as to what I
>>>>> am doing wrong.
>>>>>
>>>>>
>>>>>
>>>>> If you are open to having a conversation on this topic, I very much
>>>>> would appreciate any time you might make available to set up a conference
>>>>> call to discuss.
>>>>>
>>>>>
>>>>>
>>>>> Thank you,
>>>>>
>>>>>
>>>>>
>>>>> Aaron
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250507/fb6cfe12/attachment-0001.html>
More information about the x3d-public
mailing list