[x3d-public] HAnim Displacer examples
Andreas Plesch
andreasplesch at gmail.com
Tue Jul 17 17:00:41 PDT 2018
I found this tutorial the best introduction into how skinning is
performed with glTF:
https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_019_SimpleSkin.md
The spec. itself is short on detail:
https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#skins
The principles at work in both HAnim and glTF are very similar:
joints, weights, transforming from and to joint space, taking into
account the root trafo.
There are some important differences. Apparently, the weights in glTF
are direct factors for the joint matrices, and not applied to the
transformed vertex positions like in HAnim. That is how the tutorial
explains it although let's check Three.js implementation to be sure.
The inverse bind matrix needs to be precomputed and provided (although
I think it could be derived from the joint local coordinate system).
The mapping of vertices to be deformed to weighted joints is
different. In glTF each vertex of a skinned mesh is mapped, perhaps
most with 0 weights. In HAnim the joint defines the vertices it
influences.
I think the shader idea in glTF can be perhaps applied to HAnim: Per
vertex two additional vec4 attributes which are four indices into a
joint matrix array and four weights (as floats).
-Andreas
On Tue, Jul 17, 2018 at 4:52 PM John Carlson <yottzumm at gmail.com> wrote:
>
>
>
>
>
> GPU assisted HAnim would be best coordinated with glTF skinned
>
> deformation support in x3dom. This may require first thinking about
>
> how both compare in some detail.
>
>
>
> -Andreas
>
>
>
>
>
> Do we have some good glTF examples?
>
>
>
> Thanks,
>
>
>
> John
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list