[x3d-public] HAnim Examples

John Carlson yottzumm at gmail.com
Sun Apr 26 16:37:01 PDT 2020


>From a cursory glance at the schema...not SFStrings!

We gotta get this right, now that we have a schema which includes
HAnimMotion.

$ egrep '"joints"|channels' x3d-4.0.xsd|grep -v containerField
                        <xs:enumeration value="joints">
                        <xs:enumeration value="channels"/>
                        <xs:enumeration value="channelsEnabled"/>
                        <xs:enumeration value="joints"/>
                                <xs:element name="joints" type="MFNode"
fixed="inputOutputField" default="HAnimJoint"/>
                                        <xs:attribute name="channels"
type="MFString"/>
                                        <xs:attribute
name="channelsEnabled" type="MFBool"/>
                                        <xs:attribute name="joints"
type="MFString"/>
                                <xs:element name="joints" type="MFNode"
fixed="inputOutputField" default="X3DRigidJointNode"/>

https://www.web3d.org/documents/specifications/19774-2/V2.0/index.html
says:

*interface Motion {* string description "" string channels ""
sequence<Boolean> channelsEnabled [] double cycleTime double elapsedTime
Boolean enabled false int frameCount 0 [0, ∞)    float frameDuration 0.1
(0, ∞)    int frameIncrement 1 (-∞, ∞) int frameIndex 0 [0, ∞)    string
joints "" integer loa -1 [-1,4] Boolean loop false Boolean next Boolean
previous sequence<float> values [] (-∞,∞)    }

My reading of the Motion interface, these two (joints, channels) should be
SFString, not MFString. But I don't read very well!

Do we accept that SFStrings contain newlines? This is very confusing!

Recommendation: I should pay attention to new examples in the standards,
taking them out of the standard and running them through my processes. I am
sorry I did not do that, but I have been under the weather!

So which do we choose, the standard, or the schema?

Hopefully, we can do better on the JSON standard!

Thanks,

John

On Sun, Apr 26, 2020 at 6:11 PM GPU Group <gpugroup at gmail.com> wrote:

> John - I wrote a parsing function that took those few fields as giant
> SFStrings, and ground through them character by character, with a list of
> legal separators to ignore: " ,\n\r\t"
> -Doug
>
>
> On Sun, Apr 26, 2020 at 5:03 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> visualizing more problems with annexdA.x3d file:
>>
>>  <HAnimMotion frameCount="392" enabled='true' loop='true' frameTime =
>> "0.033333" frameDuration=".033333"
>>              joints="HumanoidRoot, l_hip, l_knee, l_talocrural, r_hip,
>>                    r_knee, r_talocrural, vl5, IGNORED, l_shoulder,
>>                    l_elbow, l_radiocarpal, IGNORED, r_shoulder, r_elbow,
>>                    r_radiocarpal, IGNORED, skullbase"
>>
>>              channels="6 Xposition Yposition Zposition Zrotation
>> Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>
>> My Java and JS are choking on these codings:
>>
>> Java:
>> protected class MFString81 {
>>   protected MFStringObject getArray() {
>>     return new MFStringObject(new java.lang.String[] {"umanoidRoot,
>> l_hip, l_knee, l_talocrural, r_hip,
>>                    r_knee, r_talocrural, vl5, IGNORED, l_shoulder,
>>                    l_elbow, l_radiocarpal, IGNORED, r_shoulder, r_elbow,
>>                    r_radiocarpal, IGNORED, skullbas"});
>>   }
>> }
>> protected class MFString82 {
>>   protected MFStringObject getArray() {
>>     return new MFStringObject(new java.lang.String[] {" Xposition
>> Yposition Zposition Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotation
>>                      3 Zrotation Xrotation Yrotatio"});
>>   }
>> }
>>
>> $ node annexdA.js
>>
>> C:\Users\coderextreme\X3DJSONLD\src\main\node\net\coderextreme\data\annexdA.js:2
>> 19
>>           .setMotions((new
>> autoclass.HAnimMotion()).setFrameCount(392).setEnable
>>
>> d(true).setLoop(true).setFrameTime("0.033333").setFrameDuration(0.033333).setJoi
>> nts(java.newArray("java.lang.String", ["umanoidRoot, l_hip, l_knee,
>> l_talocrural
>> , r_hip,
>>
>>
>>
>>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> ^^^^^^^^
>> It appears to me like the XML is missing the critical '...' around the
>> MFString.  This causes chop offs in the JSON of the leading and trailing
>> characters.
>>
>> Can an MFNode be coded as a string as joints is?
>>
>> I'll accept that newlines can be present in an attribute in XML.  Learn
>> something new every day!
>>
>> Thanks.
>> John
>>
>> On Thu, Apr 23, 2020 at 9:45 PM GPU Group <gpugroup at gmail.com> wrote:
>>
>>> Implemented HAnimMotion - may need touchups.
>>>
>>> -Doug Sanden
>>>
>>>
>>> My experience implementing v4 HAnimMotion in freewrl
>>>
>>> - took 4 days
>>>
>>> - there are some fuzzy areas - specs draft from last summer, and HAnim
>>> specs don't match, and some inconsistencies in HAnim specs. For example
>>> startFrame and endFrame are mentioned in text but not in fields list.
>>>
>>> - the annexd scene in Hanim needed some touchups:
>>>
>>> -- put HAnimMotion node inside HAnimNumanoid
>>>
>>> -- changed frameTime='0.03' to frameDuration='0.03'
>>>
>>> -- in code I change angles from degrees to radians
>>>
>>> x not sure I have the sense of the angles and translations correct
>>>
>>> - perhaps scene authors can tell from screen-capture video - link below
>>>
>>>
>>> SPEC COMMENT >>>
>>>
>>> I initially thought and still after implementing think it would be
>>> useful to split the Motion node into MotionPlayer and MotionData
>>>
>>> Then for scenes with multiple characters doing bits of motion
>>> independently,
>>>
>>> HAnimHumanoid 1:1 HAnimPlay m:1 HAnimData
>>>
>>> so the data can be DEF/USEd by more MotionPlayers for different
>>> characters in the scene
>>>
>>> The MotionPlayer would hold state such as frameIndex for a specific
>>> Humanoid
>>>
>>> - and the MotionData would hold the float values and channel
>>> descriptions.
>>>
>>> <<< SPEC COMMENT
>>>
>>>
>>>
>>> http://dug9.users.sourceforge.net/web3d/tests/hanim/freeWRL%202020-04-23%2020-09-44.mp4
>>>
>>> http://dug9.users.sourceforge.net/web3d/tests/hanim/annexdA.x3d
>>>
>>>
>>>
>>> https://sourceforge.net/p/freewrl/git/ci/develop/tree/freex3d/src/lib/scenegraph/Component_HAnim.c
>>>
>>>
>>> - line 340 for 15 lines
>>>
>>> - line 1090+
>>>
>>> On Wed, Apr 22, 2020 at 5:44 PM GPU Group <gpugroup at gmail.com> wrote:
>>>
>>>> SPEC COMMENT > V4 > HANIMMOTION >>>>
>>>>
>>>> I'm parsing the Motion AnnexD scene with a few tweaks.
>>>> Initial thoughts:.
>>>> Q. should Motion be split into MotionPlayer and MotionData?
>>>> DEF/USE HanimHumanoid - marching troops - same skin and same
>>>> synchronizes walk
>>>> DEF/USE HAnimMotion - synchornized dancers -different skins and LOA,
>>>> but still moving in syncrhonized walk
>>>> - the Motion node would need to be parent-aware and hold a mapping to
>>>> each parent separately
>>>> DEF/USE HANimMotionData - several different characters in the scene
>>>> walking at different times
>>>> - you could do it the current node way, by including the motion data
>>>> for each separate HAnimHumanoid.HanimMotion
>>>> - but if the data was separate -and some of that data is a bit big and
>>>> ugly in the scene file- then you'd only need it once for all the characters.
>>>> -Doug Sanden
>>>> <<<<  SPEC COMMENT > V4 > HANIMMOTION
>>>>
>>>> On Mon, Apr 20, 2020 at 3:01 PM GPU Group <gpugroup at gmail.com> wrote:
>>>>
>>>>> Thanks Don, will read up.
>>>>> -Doug
>>>>>
>>>>> On Mon, Apr 20, 2020 at 2:47 PM Don Brutzman <brutzman at nps.edu> wrote:
>>>>>
>>>>>> [cc: group]
>>>>>>
>>>>>> Hi Doug.  Joe is on phone with me.  Joe notes that the HAnim2
>>>>>> specification includes a Motion object and HAnimMotion example (clause 6
>>>>>> part 2) but it is not in our X3D Example Archives - Basic HAnim examples.
>>>>>>
>>>>>> We have requested that Web3D replace the Draft International
>>>>>> Specification (DIS) on the website with the now completed International
>>>>>> Specification (IS) approved by ISO.
>>>>>>
>>>>>> Available already to Web3D members at
>>>>>>
>>>>>> [2.1]   GitHub: Web3D Consortium members, HAnim
>>>>>>         https://github.com/Web3DConsortium/HAnim
>>>>>>
>>>>>> [2.2]   GitHub: Web3D Consortium members, HAnim Specifications
>>>>>> combined parts 1 and 2
>>>>>>
>>>>>> https://github.com/Web3DConsortium/HAnim/raw/master/ISO-IEC19774-combined-IS.Web3D.zip
>>>>>>
>>>>>> On our Thursday afternoon call we will look at hands and feet (in
>>>>>> response to IEEE 3DBP group), HAnimMotion and triage of the remaining
>>>>>> examples.  I'll ask Anita to schedule a regular weekly zoom line for us,
>>>>>> details will be under MEMBERS > RESOURCES > TELECONFERENCE.
>>>>>>
>>>>>> On 4/20/2020 1:11 PM, GPU Group wrote:
>>>>>> > Q. is there an example scene using the v4 HAnimMotion node?
>>>>>> > -Doug Sanden
>>>>>> >
>>>>>> > On Fri, Apr 17, 2020 at 8:29 AM Joseph D Williams <
>>>>>> joedwil at earthlink.net <mailto:joedwil at earthlink.net>> wrote:
>>>>>> >
>>>>>> >     Hi All, a next practical step is to care for the web3D.org
>>>>>> HAnim Archives. Lots is there and nothing is obsoleted except for new names
>>>>>> for items of the skeleton but all can be updated. There is duplication and
>>>>>> some important items not adequately demonstrated.
>>>>>>
>>>>>> all the best, Don
>>>>>> --
>>>>>> Don Brutzman  Naval Postgraduate School, Code USW/Br
>>>>>> brutzman at nps.edu
>>>>>> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
>>>>>>  +1.831.656.2149
>>>>>> X3D graphics, virtual worlds, navy robotics
>>>>>> http://faculty.nps.edu/brutzman
>>>>>>
>>>>> _______________________________________________
>>> 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/20200426/1bd60151/attachment-0001.html>


More information about the x3d-public mailing list