<div dir="ltr"><div>There's a thing in GLES3 if x3dom can detect that availability.</div><a href="https://www.khronos.org/files/opengles32-quick-reference-card.pdf">https://www.khronos.org/files/opengles32-quick-reference-card.pdf</a><br><div>page 3 > vertex arrays > Primitive Restart </div><div>And I haven't tried primitive restart. You know how IndexedFaceSet has an index, with -1 to indicate the end of a face?</div><div>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.</div><div>Hope that idea works, haven't tried it. -Doug</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 15, 2018 at 6:41 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Further observations<br>
<span class="">On Fri, Jul 13, 2018 at 4:36 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br>
><br>
> Some partial answers:<br>
><br>
> On Thu, Jul 12, 2018 at 8:18 AM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<br>
> ><br>
> > Before diving into an HAnim skinned deformation for x3dom, there are a few questions:<br>
> ><br>
> > proto<br>
> ><br>
> > Is there a proto implementation for skinned deformation, eg. the skin related fields ?<br>
><br>
> Boxman has a script which does some skinned deformation:<br>
><br>
> <a href="http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/BoxManIndex.html" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/<wbr>content/examples/Basic/<wbr>HumanoidAnimation/BoxManIndex.<wbr>html</a><br>
> <a href="http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/BoxMan.js" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/<wbr>content/examples/Basic/<wbr>HumanoidAnimation/BoxMan.js</a><br>
><br>
> The scene uses native HAnim tags. It may or may not work in x_ite with<br>
> HAnim protos.<br>
<br>
</span>Joe has a native tag BoxMan with test skin deformations.<br>
<span class=""><br>
> The script just applies the weights as factors to a transform matrix<br>
> which may be quite different from the blending of coordinates. Of<br>
> course, the weights can be generated in the first place in such a way<br>
> that this application could work.<br>
><br>
> > examples<br>
> ><br>
> > Are there examples in addition to Joes kicking player ?<br>
><br>
> There are the Lucy avatars available from seamless3d:<br>
> <a href="http://www.seamless3d.com/hanim/" rel="noreferrer" target="_blank">http://www.seamless3d.com/<wbr>hanim/</a><br>
> I had view3dscene convert them to xml:<br>
> <a href="https://github.com/andreasplesch/x3dom/blob/HAnim_work/test/functional/HAnim/Lucy_test4.x3d" rel="noreferrer" target="_blank">https://github.com/<wbr>andreasplesch/x3dom/blob/<wbr>HAnim_work/test/functional/<wbr>HAnim/Lucy_test4.x3d</a><br>
<br>
</span>All players I tested which have skinned deformation implemented show<br>
the Lucy animation with inverted rotations. The players are:<br>
view3dscene 3.18<br>
BSContact<br>
freewrl 4.0<br>
Probably there is a problem with the Lucy example and perhaps how<br>
seamless3d exports hanim.<br>
<div class="HOEnZb"><div class="h5"><br>
> A maria_noscript model was also available at some point but seems lost.<br>
><br>
> > skinCoordWeight<br>
> ><br>
> > 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.<br>
> ><br>
> > Should scaling and translation be weighted ?<br>
> ><br>
> > 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.<br>
> ><br>
> > skinNormals<br>
> ><br>
> > The spec. only refers to the skinCoords as being affected by the weighted transform. Presumably the skinNormals also need to be transformed ?<br>
> > If so, it seems to make sense to only apply the rotational component, and ignore scaling and translation ?<br>
><br>
> Apparently there was some opiniated discussion around normal<br>
> generation: <a href="http://seamless3d.com/hanim/hanim_with_hardware_shaders_issues.html" rel="noreferrer" target="_blank">http://seamless3d.com/hanim/<wbr>hanim_with_hardware_shaders_<wbr>issues.html</a><br>
><br>
> > Mix of skeletal and skinned bodies<br>
> ><br>
> > It is possible to have geometry both in the skin and the skeleton (within segments) fields.<br>
> > 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 ?<br>
><br>
> May not be a priority to resolve.<br>
><br>
> --<br>
> Andreas Plesch<br>
> Waltham, MA 02453<br>
<br>
<br>
<br>
-- <br>
Andreas Plesch<br>
Waltham, MA 02453<br>
<br>
______________________________<wbr>_________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org">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/<wbr>listinfo/x3d-public_web3d.org</a><br>
</div></div></blockquote></div><br></div>