[x3d-public] Upgrade model? AllenDutton Legacy

John Carlson yottzumm at gmail.com
Sun Jul 13 20:14:46 PDT 2025


Don,

Note that viewpoints is a perfectly valid containerField for HAnimSite, at
least according to X3DOM.


<ConcreteNode name="HAnimHumanoid">

[snip]

<field name="viewpoints"
                   type="MFNode"
                   accessType="inputOutput"
                   acceptableNodeTypes="HAnimSite"
                   description="List of HAnimSite nodes containing
Viewpoint nodes that appear in the skeleton model, usually as USE node
references."/>


https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/hanim.html#HAnimHumanoid
26.3.2 HAnimHumanoid

HAnimHumanoid : X3DChildNode, X3DBoundedObject {
  SFVec3f    [in,out] center                0 0 0    (-∞,∞)
  SFString   [in,out] description           ""
  SFBool     [in,out] bboxDisplay           FALSE
  MFString   [in,out] info                  []
  MFVec3f    [in,out] jointBindingPositions []       (-∞,∞)
  MFRotation [in,out] jointBindingRotations []       [-1,1] or (-∞,∞)
  MFVec3f    [in,out] jointBindingScales    []       (0,∞)
  MFNode     [in,out] joints                []       [HAnimJoint]
  SFInt32    [in,out] loa                   -1       [-1,4]
  SFNode     [in,out] metadata              NULL     [X3DMetadataObject]
  MFNode     [in,out] motions               []       [HAnimMotion]
  MFBool     [in,out] motionsEnabled        []
  SFString   [in,out] name                  ""
  SFRotation [in,out] rotation              0 0 1 0  [-1,1] or (-∞,∞)
  SFVec3f    [in,out] scale                 1 1 1    (0,∞)
  SFRotation [in,out] scaleOrientation      0 0 1 0  [-1,1] or (-∞,∞)
  MFNode     [in,out] segments              []       [HAnimSegment]
  MFNode     [in,out] sites                 []       [HAnimSite]
  SFString   [in,out] skeletalConfiguration "BASIC"
  MFNode     [in,out] skeleton              []       [HAnimJoint, HAnimSite]
  MFNode     [in,out] skin                  []       [Group, LOD,
Shape, Switch, Transform, IndexedFaceSet, IndexedFanSet,
IndexedLineSet, IndexedQuadSet, IndexedTriangleSet,
IndexedTriangleStripSet]
  SFNode     [in,out] skinBindingCoords     NULL
[Coordinate|CoordinateDouble]
  SFNode     [in,out] skinBindingNormals    NULL     [X3DNormalNode]
  SFNode     [in,out] skinCoord             NULL
[Coordinate|CoordinateDouble]
  SFNode     [in,out] skinNormal            NULL     [X3DNormalNode]
  SFVec3f    [in,out] translation           0 0 0    (-∞,∞)
  SFString   [in,out] version               "2.0"    ["2.0"]  * MFNode
    [in,out] viewpoints            []       [HAnimSite]*
  SFBool     [in,out] visible               TRUE
  SFVec3f    []       bboxCenter            0 0 0    (-∞,∞)
  SFVec3f    []       bboxSize              -1 -1 -1 [0,∞) or −1 −1 −1
}


This suggests that there's an issue with my version of X3DJSAIL, I
will try recompiling!


John


On Sun, Jul 13, 2025 at 9:40 PM Don Brutzman <don.brutzman at gmail.com> wrote:

> HAnimSite does not have a viewpoints field, but it does have a *children*
> field which can work for that purpose.  Note *children *is the default *containerField
> *value for the XML encoding of Viewpoint.
>
>    - X3D 4.0 Architecture, clause 26 Humanoid Animation (HAnim)
>    component, 26.3.6 HAnimSite
>    -
>    https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/hanim.html#HAnimSite
>
> Also please avoid use of *setContainerFieldOverride()* method.  It is
> only there to support experimental efforts and perhaps should be private
> (disallowing programmer usage).  I just did a search of over 4000
> autogenerated Java source files in the X3D Examples Archive and did not
> find a single instance.  If you ever need to use it, there is an error
> somewhere.  Please consult the Javadoc to search for
> setContainerFieldOverride you find the following explanation.
>
>    - X3DJSAIL, X3D Java Scene Access Interface Library, Javadoc, search
>    *setContainerFieldOverride()*
>    - *org.web3d.x3d.jsail > X3DConcreteNode* * > *
>    *setContainerFieldOverride*
>    - *Warning: containerFieldOverride describes a non-default (and quite
>    possibly incorrect) field relationship of a node to its parent, overriding
>    the default or alternate containerField value. Programmer usage is not
>    ordinarily needed when using this API (in rare cases it may be needed for
>    ProtoInstance nodes). Instead of using containerFieldOverride workaround
>    methods, focus on defining correct parent-child node relationships instead.*
>    -
>    https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/X3DConcreteNode.html#setContainerFieldOverride(java.lang.String)
>
> If you want to upgrade that model, be my guest.  Be aware that conversion
> may be a nontrivial task, from scene metadata:
>     13
> <https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Legacy/AllenDutton.html#13>
>       <meta name='* error *' content='* Legacy model, not valid as X3D4
> HAnim version 2.0 since HAnim version 1.0 has significant differences and
> is no longer directly supported *'/>
>
> all the best, Don
>
> On Sun, Jul 13, 2025 at 2:14 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Is there a chance we can upgrade this model to V4.0, HAnim2?
>>
>>
>> https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Legacy/AllenDuttonIndex.html
>>
>> I can do the work, I hope that my contribution will be added to the
>> archive (in another folder).
>>
>> Let me know!
>>
>> Note that X3DJSAIL complains about a potentially valid
>> cotainerField="viewpoints".  Castle Model Converter reports it's valid
>>
>> $ java -cp ~/Downloads/X3DJSAIL.4.0.full.jar
>> org.web3d.x3d.jsail.CommandLine -validate AllenDutton.x3d
>> [snip]
>> Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException:
>> *** Invalid setContainerFieldOverride() value='viewpoints', legal values
>> for HAnimSite are containerField_ALLOWED_VALUES='"children" "sites"
>> "skeleton"'
>>         at
>> org.web3d.x3d.jsail.X3DConcreteNode.setContainerFieldOverride(X3DConcreteNode.java:422)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:631)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:619)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:490)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.toX3dModelInstance(X3DLoaderDOM.java:453)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:247)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:231)
>>         at
>> org.web3d.x3d.jsail.X3DLoaderDOM.loadModelFromFileX3D(X3DLoaderDOM.java:205)
>>         at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:922)
>>         at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:242)
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250713/4074ef5c/attachment.html>


More information about the x3d-public mailing list