[x3d-public] HAnim skinned deformation

GPU Group gpugroup at gmail.com
Mon Jul 16 06:07:37 PDT 2018


if you can find a way to send a few auxiliary floats per vertex in the
vertex array, then maybe the integer part of the float can be the matrix
number/index of the matrix in list of matrices you send, and the decimal
part the weight.

On Mon, Jul 16, 2018 at 6:42 AM, Andreas Plesch <andreasplesch at gmail.com>
wrote:

> Primitive restart would be available for webgl2:
>
> https://www.khronos.org/registry/webgl/specs/latest/2.
> 0/#NO_PRIMITIVE_RESTART_FIXED_INDEX
>
> I was also trying to think to think of a way to offload the matrix
> multiplications per vertex to the GPU. Instead of just a single world
> transformation for each geometry, it would be necessary to have a
> transformation matrix per vertex. Hopefully, the uploading of all the
> matrices per frame to the GPU would not negate the computional
> performance gains.
>
> -Andreas
>
> > Date: Sun, 15 Jul 2018 21:10:43 -0600
> > From: GPU Group <gpugroup at gmail.com>
> > To: X3D Graphics public mailing list <x3d-public at web3d.org>
> > Subject: Re: [x3d-public] HAnim skinned deformation
> >
> > There's a thing in GLES3 if x3dom can detect that availability.
> > https://www.khronos.org/files/opengles32-quick-reference-card.pdf
> > page 3 > vertex arrays > Primitive Restart
> > And I haven't tried primitive restart. You know how IndexedFaceSet has an
> > index, with -1 to indicate the end of a face?
> > Well that -1 can be the restart index. Then I don't know what I was
> > thinking but somehow I thought that related to HAnim, in particular the
> > ability to write a shader that works on an indexed face set, rather than
> > more basic primitives like triangle fan. And so for HAnim you won't need
> to
> > rebuild triangle fans on every frame - just modify the vertices and
> normals
> > in-place, and re-send the same indexes with -1 to end each face or
> triangle.
> > Hope that idea works, haven't tried it. -Doug
> >
> > On Sun, Jul 15, 2018 at 6:41 PM, Andreas Plesch <andreasplesch at gmail.com
> >
> > wrote:
> >
> > > Further observations
> > > On Fri, Jul 13, 2018 at 4:36 PM Andreas Plesch <
> andreasplesch at gmail.com>
> > > wrote:
> > > >
> > > > Some partial answers:
> > > >
> > > > On Thu, Jul 12, 2018 at 8:18 AM Andreas Plesch <
> andreasplesch at gmail.com>
> > > wrote:
> > > > >
> > > > > Before diving into an HAnim skinned deformation for x3dom, there
> are a
> > > few questions:
> > > > >
> > > > > proto
> > > > >
> > > > > Is there a proto implementation for skinned deformation, eg. the
> skin
> > > related fields ?
> > > >
> > > > Boxman has a script which does some skinned deformation:
> > > >
> > > > http://www.web3d.org/x3d/content/examples/Basic/
> > > HumanoidAnimation/BoxManIndex.html
> > > > http://www.web3d.org/x3d/content/examples/Basic/
> > > HumanoidAnimation/BoxMan.js
> > > >
> > > > The scene uses native HAnim tags. It may or may not work in x_ite
> with
> > > > HAnim protos.
> > >
> > > Joe has a native tag BoxMan with test skin deformations.
> > >
> > > > The script just applies the weights as factors to a transform matrix
> > > > which may be quite different from the blending of coordinates. Of
> > > > course, the weights can be generated in the first place in such a way
> > > > that this application could work.
> > > >
> > > > > examples
> > > > >
> > > > > Are there examples in addition to Joes kicking player ?
> > > >
> > > > There are the Lucy avatars available from seamless3d:
> > > > http://www.seamless3d.com/hanim/
> > > > I had view3dscene convert them to xml:
> > > > https://github.com/andreasplesch/x3dom/blob/
> HAnim_work/test/functional/
> > > HAnim/Lucy_test4.x3d
> > >
> > > All players I tested which have skinned deformation implemented show
> > > the Lucy animation with inverted rotations. The players are:
> > > view3dscene 3.18
> > > BSContact
> > > freewrl 4.0
> > > Probably there is a problem with the Lucy example and perhaps how
> > > seamless3d exports hanim.
> > >
> > > > A maria_noscript model was also available at some point but seems
> lost.
> > > >
> > > > > skinCoordWeight
> > > > >
> > > > > This field modulates the transformation applied to the indexed
> coords
> > > by a factor ranging from 0 to 1. It is not quite clear how the factor
> > > should be applied. The spec. focuses on the amount of rotation but
> scaling
> > > and translation presumably should also be affected.
> > > > >
> > > > > Should scaling and translation be weighted ?
> > > > >
> > > > > The most straightforward way would be to just scale all the
> components
> > > of the transformation matrix. However, that does not work for the
> > > rotational components. Is there a recommended way to apply the weights
> to
> > > the complete transformation matrix ? Multiply all the individually
> weighted
> > > field matrixes ? That would be a lot of matrix multiplications, for
> each
> > > coord for each frame of an animation.
> > > > >
> > > > > skinNormals
> > > > >
> > > > > The spec. only refers to the skinCoords as being affected by the
> > > weighted transform. Presumably the skinNormals also need to be
> transformed ?
> > > > > If so, it seems to make sense to only apply the rotational
> component,
> > > and ignore scaling and translation ?
> > > >
> > > > Apparently there was some opiniated discussion around normal
> > > > generation: http://seamless3d.com/hanim/hanim_with_hardware_shaders_
> > > issues.html
> > > >
> > > > > Mix of skeletal and skinned bodies
> > > > >
> > > > > It is possible to have geometry both in the skin and the skeleton
> > > (within segments) fields.
> > > > > In this case it seems the full transform would be always applied to
> > > the segment geometries. That may lead to out of sync movement during
> > > animation but such mixed representation may not be intended to be fully
> > > supported. How should an implementation deal with such humanoids ?
> > > >
> > > > May not be a priority to resolve.
> > > >
> > > > --
> > > > Andreas Plesch
> > > > Waltham, MA 02453
> > >
> > >
> > >
> > > --
> > > Andreas Plesch
> > > Waltham, MA 02453
> > >
> > > _______________________________________________
> > > x3d-public mailing list
> > > x3d-public at web3d.org
> > > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> > >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://web3d.org/pipermail/x3d-public_web3d.org/
> attachments/20180715/eeb24df0/attachment.html>
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> >
> > ------------------------------
> >
> > End of x3d-public Digest, Vol 112, Issue 17
> > *******************************************
>
>
>
> --
> Andreas Plesch
> Waltham, MA 02453
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180716/b66a462f/attachment-0001.html>


More information about the x3d-public mailing list