[X3D-Ecosystem] Blender: Dual HAnim hierarchies to handle skin weights, geometry.

John Carlson yottzumm at gmail.com
Sun Dec 29 18:16:26 PST 2024


Apologies, this is a design diary.  TL;DR.

Summary:  1) Apply appropriate non-default transforms to all objects in
Blender export except HAnim.  Think about combining similar sibling
Transforms 2) Make sure animation export is working. 3) Remove duplicates
on export, or don’t add them.  4) Make sure ImageTexture is created.  5)
deal with USE only Materials.

I’ve suggested using alternates for bone vertex_groups that might work for
skin weights.  I believe the suggestion to use a hook was shot down before
it got out of the chute.

Please look for a way to do sites and segments and their geometry without a
second hierarchy.  This includes anything I’ve previously suggested.  One
thing might be to use bones for sites, segments and joints, then attach any
transforms and geometry in HAnim to the armature.   Blender examples are
especially helpful.

I realize that geometry (objects) can be attached to armature (and probably
a bone can be assigned to object through use of bone_parent on an object,
and setting the object’s parent to the armature, but I don’t plan a flat
list of objects under the armature, so that’s currently only humanoid_root).

I’m currently having all sorts of warnings on export, but then a file pops
out, admittedly with lots of duplicates I previously removed (I rewrote the
code, oops!).  I plan on writing a “childrenAppendNoDuplicates” function,
which will remove duplicates (not add them to the exported scene again).  I
realize this is a hack for now.  I’m also thinking that there may be some
kind of transform hierarchy to export, which I probably disabled, based on
recent non-HAnim exports.  I was trying to flatten an animation hierarchy
of ROUTE and Interpolators I constructed.  There are better methods…. Time
to back out… And rethink…

I also realize I am using “skeleton” for the hanim humanoid node ,  the
armature, and the main HAnim joint with the skeleton container field .  I
will work towards avoiding that.  My choices will be humanoid, armature and
skeleton.  I believe my exporter already reflects this.

I would also like to get to “scale” based animation, like HAnimDisplacer.

Basically, I’ve prioritized skinning over something like getting all the
various pieces of geometry animated on a humanoid(getting all the local
transforms correct).

AFAIK, there are no sites or segments in Blender, just various bones and
objects with certain types.  No, I’m not up on the latest Blender has to
offer.

I can return to getting Jin working, but I’m not promising results anytime
soon, or at all.  Blender basically seems to have too many ways to do
things.  What I can do is prepare a Jin with a single animation and we can
discuss.

If this was an issue with geometry or positioning, I think we could have a
good handle on it.  The issues show up with animation.  In particular,
local animation, which I’ve been adding or enabling, especially for
import.  AFAIK, PositionInterpolators work.  So we’re talking about
OrientationInterpolators and others…I will review animation code in
import.  There may be other options.

I believe that relying on matrix_world to store transforms in an object may
be misguided, long term, realizing that having a hierarchy in place may
help.  I think a hierarchy is a good thing for human factors, even if there
are two of them in the armature.  A long list of segments and sites under
armature is not ideal…

If objects and bones agreed on what to call the matrices, that would be
cool.

Eventually many will be operating Blender with voice, it seems.  I’m
guessing that won’t include me.  Time to sell stock in wrist braces and buy
throat therapy stock.

John

On Sun, Dec 29, 2024 at 3:55 PM <joedwil at earthlink.net> wrote:

> the dual hierarchy is something lame blender needs, not x3d.
>
>
>
> -----Original Message-----
> From: John Carlson <yottzumm at gmail.com>
> Sent: Dec 26, 2024 9:26 PM
> To: X3D Ecosystem public discussion <x3d-ecosystem at web3d.org>, Joe D
> Williams <joedwil at earthlink.net>, Katy Schildmeyer KS APPAREL DESIGN <
> katy at ksappareldesign.com>, Carol McDonald <cemd2 at comcast.net>
> Subject: Re: As previously discussed. Bone handling
>
>
> Here's a slightly more interesting dual hierarchy import, with some
> duplicate nodes.  I'll have to research where they are coming from.
>
> [image: image.png]
>
> On Thu, Dec 26, 2024 at 10:28 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Here's the first attempt at a dual hierarchy import (seriously) of Joe
>> Skin, update 3.  Note that there's no transform :"Joe_humanoid_root" yet.
>> Note that Joe_sacrum and Joe_RootFront are under Joe_humanoid,
>> AxisLineShape is inside Joe_RootFront (inside the Humanoid), so that's why
>> the AxisLineShape gets assigned to the skin on export.  But I don't know
>> why there are 4 axis line shapes yet.
>>
>> Also note that the animations are assigned to the empties (transforms),
>> not the bones.  The vertex_groups hang off the IFS.
>>
>>
>>
>> [image: image.png]
>>
>> On Thu, Dec 26, 2024 at 7:26 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> I will soon modify my Blender importer to add a joint hierarchy of empty
>>> objects under the armature that refers to blender bones that i currently
>>> add for joints under the armature.  I am doing this primarily as
>>> optimization.  I will quickly be able to find the bone_parent of the empty
>>> object, plus have a place to hang segments and sites without confusion of
>>> figuring out which segment goes with each bone.  The empty objects will map
>>> one for one with the bones.  If there’s no skin field, I will seriously
>>> consider deleting all bones.  If there’s a skin field, i will seriously
>>> consider deleting all joint empty objects.  Then we will also consider
>>> Hanim exports with and without bones to decide what to do.  Obviously, we
>>> only want one joint hierarchy on output.
>>>
>>> This seems like a good approach to handle both skinning and site/segment
>>> geometry.
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20241229/1d72b376/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 144748 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20241229/1d72b376/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 235044 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20241229/1d72b376/attachment-0003.png>


More information about the X3D-Ecosystem mailing list