<div><div dir="auto">Perhaps now is the time for doing benchmarking among implementations? Looks good! Can someone point me out an exampl which could use an X3D JSON scripting environment. PROTOs?</div></div><div dir="auto"><br></div><div><div><div class="gmail_quote"><div dir="ltr">On Wed, Nov 28, 2018 at 2:51 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A short update after Joe and me had a good discussion on the phone.<br>
<br>
We could trace back the origins of the new JointBinding fields and<br>
confirm that they are meant to align an initially incompatible<br>
geometry with a given animation of a skeleton. I am more confident now<br>
that these fields essentially correspond to the InverseBindMatrix of<br>
glTF skins.<br>
<br>
With regards to the relationship of the SkinBindingCoords field to the<br>
SkinCoord field, we felt it is possible that only one or the other<br>
should be used. This may still need some additional digging.<br>
<br>
We also discussed how similar glTF skinning is to HAnim skinning. For<br>
example, glTF skinning also requires a binding of one or multiple<br>
weighted joint (trafos) for each single vertex in a skin. in glTF,<br>
this binding occurs in the JOINT_0 vertex attribute of a mesh, whereas<br>
in HAnim the binding occurs in the skinCoordIndex field of a joint.<br>
<br>
x3dom now supports skinned animation in the dev build. Here are a few<br>
examples: <a href="http://andreasplesch.github.io/Library/Models/HAnim/x3d/InlineViewer.html" rel="noreferrer" target="_blank">http://andreasplesch.github.io/Library/Models/HAnim/x3d/InlineViewer.html</a><br>
(BoxMan and Kicker are skinned).<br>
<br>
Other links:<br>
<a href="http://www.web3d.org/documents/specifications/19774-1/V2.0/HAnim/ObjectInterfaces.html#Humanoid" rel="noreferrer" target="_blank">http://www.web3d.org/documents/specifications/19774-1/V2.0/HAnim/ObjectInterfaces.html#Humanoid</a><br>
(sequence<float[4]> skinBindingNormals should be float[3] )<br>
<br>
<a href="https://github.com/andreasplesch/x3dom/wiki/HAnim-and-glTF-skins" rel="noreferrer" target="_blank">https://github.com/andreasplesch/x3dom/wiki/HAnim-and-glTF-skins</a><br>
<br>
has now a complete, and working conversion of a simple glTF skinned<br>
animation to HAnim. Since the conversion is using HAnim 1.0, instead<br>
of the jointBinding fields, it is using an inner Joint to apply a<br>
binding transform. I think it works well.<br>
<br>
I may do another manual conversion of another simple glTF example.<br>
<br>
The main issue with going further on x3dom is now that the skinned<br>
deformation per vertex is currently done in js arrays on the CPU while<br>
the glTF support is using directly the binary vertex data on the GPU.<br>
So it may become necessary to move the skinning in x3dom also to the<br>
GPU which requires uploading additional buffers and deeper<br>
adjustments, and therefore investment. The alternative is to not use<br>
BufferGeometry and translate to IndexedTriangleSet (et al.) which is<br>
not very attractive.<br>
<br>
-Andreas<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Tue, Nov 27, 2018 at 2:51 AM Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:<br>
><br>
> I think we should get together on the phone and discuss. Let’s try and use the web3d conf line sometime. Wed at 5 pacific or Mondays at 3 has worked.<br>
><br>
> Each vertex of a skin has to be bound to the appropriate skeleton parts.<br>
><br>
> Thanks and Best,<br>
><br>
> Joe<br>
><br>
><br>
><br>
><br>
><br>
> Sent from Mail for Windows 10<br>
><br>
><br>
><br>
> From: Andreas Plesch<br>
> Sent: Monday, November 26, 2018 10:37 AM<br>
> To: Michalis Kamburelis<br>
> Cc: X3D Graphics public mailing list<br>
> Subject: Re: [x3d-public] HAnim and glTF skins<br>
><br>
><br>
><br>
> I figured out by now that these fields were added for HAnim 2.0<br>
><br>
> whereas X3D V3.3 uses HAnim 1.0 .<br>
><br>
><br>
><br>
> I think the idea is that you have a skeleton of joints with animation<br>
><br>
> data designed for it but the actual initial geometry is designed for<br>
><br>
> another initial state (pose). Then you can either redo the skeleton<br>
><br>
> and animation, redo the geometry, or apply a first ('binding')<br>
><br>
> transform to get the geometry into the state expected by the animated<br>
><br>
> joint transforms. This first transform would be defined by the<br>
><br>
> jointBinding fields, or as an inner joint in the skeleton's joint<br>
><br>
> hierarchy.<br>
><br>
><br>
><br>
> I think these fields are similar to glTF's inverseBindingMatrix which<br>
><br>
> is also defined for each joint, and is applied to initial vertex<br>
><br>
> positions. So in order to play glTF skinned animations, it would make<br>
><br>
> more sense to implement these fields rather than finding a singular<br>
><br>
> solution.<br>
><br>
><br>
><br>
> It is unclear to me how skinCoord and skinBindingCoord interrelate,<br>
><br>
> and why non-humanoids are supposed to use those. Probably because it<br>
><br>
> is common to have this initial binding step rather than compatible<br>
><br>
> skeletons and geometry in the first place.<br>
><br>
><br>
><br>
> Hopefully somebody can correct all the mistakes and misunderstandings<br>
><br>
> just offered above :)<br>
><br>
><br>
><br>
> -Andreas<br>
><br>
><br>
><br>
> _______________________________________________<br>
><br>
> x3d-public mailing list<br>
><br>
> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
><br>
> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>
</div>