[X3D-Ecosystem] Converting orientation interpolators (progress!)
John Carlson
yottzumm at gmail.com
Tue Nov 26 19:25:31 PST 2024
Okay, I added “Prefer Flat” defaulted to True as a Blender import in my
fork.
In a script, you specify a prefer_flat=True or prefer_flat=False to the
(import) function, which you can see in my scripts under X3DJSONLD/blend
(below link).
https://github.com/coderextreme/X3DJSONLD/blob/master/blend/importJoe.py
Note on MaleWaving.py, I made some adjustments to load the X3D way! The
gizmo is correct and oriented right. No floor though!
2 down, 4+ to go!
I’ll probably go 4,3,2,1 unless someone recommends something. There’s also
an issue with one of the Jin’s having a large skeleton (joint center
transform?). Another issue is having too many EMPTY objects as Joints in
Blender (duplicates).
The real good news is that a Jin’s skeleton animated through a whole
concatenation of animations. In Blender, I hope. ;)
If someone has a way to simplify DEFs, ROUTE toNodes and ROUTE fromNodes,
speak up!
“4. Add Segment and Site object geometry for Jin (This may be a puzzle if
we are using bones).” I think for this, I can detect a site or segment
with geometry when scanning for Shapes, and not do Blender bone or skin
weight mode if segment or site geometry is found on import. This may
require prefer_flat=True to merge the Site transform with the geometry. If
I turn prefer_flat=True, then some animations for Transforms may not be
included (ugh)!
If someone wants to contribute Python to draw a 1m grid in the X-Z plane,
that would be great!
John
On Tue, Nov 26, 2024 at 4:33 PM John Carlson <yottzumm at gmail.com> wrote:
> Okay. I got X3DJSONLD/blend/JoeSkinTexcoordDisplacerKickUpdate3.x3d at
master · coderextreme/X3DJSONLD
<https://github.com/coderextreme/X3DJSONLD/blob/master/blend/JoeSkinTexcoordDisplacerKickUpdate3.x3d>
and
maleWaving.x3d imports in half decent shape (applying PREF_FLAT=True for
the latter) on Blender import. Jin skin and skeleton load, but there are no
skin weights. Playing a bunch of animations at the same time is not ideal!
So I have a few approaches to take:
1. Implement HAnimDisplacer in Joe
2. Fix ball size in Joe?
3. Fix Gramps animations (perhaps by transforms on interpolators)
4. Add Segment and Site geometry for Jin (add Boolean flag to avoid adding
bones).
>
> What I don't know quite what to do is figure out which end of the bones I
> should animate. Since I switched head and tail centers am I animating the
> wrong joint?
>
> I'll send glTF pictures in a bit.
>
> What really slowed me down was integrating the updates from other people.
> Now I know I can do git fetch and git merge after trying get rebase.
>
> On Tue, Nov 26, 2024 at 8:13 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> So my thought to convert orientation interpolators to Blender is to take
>> an axis angle, convert it to a quaternion, multiply by the transform
>> stack, then pull the rotation out of the animation and put it in the
>> keyframe, then go to the next axis angle, etc. This sounds like a job for
>> a compute shader (SIMD), but I don’t know how to use them, particularly in
>> Blender.
>>
>> Hmm?
>>
>> John
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20241126/e26a1f44/attachment.html>
More information about the X3D-Ecosystem
mailing list