[x3d-public] validator/HAnim error I don't understand; X3D Schematron false positive

Don Brutzman brutzman at nps.edu
Sat Jul 25 15:30:26 PDT 2020


Hmmm let's see.

* X3D Tooltips: IndexedFaceSet, colorIndex
   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedFaceSet
   https://www.web3d.org/x3d/tooltips/X3dTooltips.html#IndexedFaceSet.colorIndex

================================================
[colorIndex accessType initializeOnly, type MFInt32 CDATA #IMPLIED] [-1,+∞)
colorIndex values define the order in which Color|ColorRGBA values are applied to polygons (or vertices).
Hint: if colorIndex array is not provided, then Color|ColorRGBA values are indexed according to the coordIndex field.
Hint: If colorPerVertex='false' then one index is provided for each polygon defined by the coordIndex array. No sentinel -1 values are included.
Hint: If colorPerVertex='true' then a matching set of indices is provided, each separated by sentinel -1, that exactly corresponds to individual values in the coordIndex array polygon definitions.
Warning: if child Color|ColorRGBA node is not provided, then geometry is rendered using corresponding Appearance and material/texture values.
================================================

So it looks like you found a "false positive" error in X3D Schematron (used by X3D Validator).  Since coordIndex is provided, no colorIndex is necessary.

Thanks.  Will follow up to fix that rule - after we ship X3D4 Working Draft 2!

On 7/24/2020 10:41 PM, John Carlson wrote:
> Error:
> <IndexedFaceSet DEF='DiamondIFS'/> missing colorIndex array for contained ColorRGBA node [/X3D/Scene/HAnimHumanoid/HAnimJoint[1]/HAnimSegment[1]/Switch/Shape[3]/IndexedFaceSet, error]
> 
> Should the validator be proposing an example colorIndex for the above?
> 
> See below:
> 
>  From Validator:
> 
> <Shape DEF='HAnimSiteShape'> <IndexedFaceSet DEF='DiamondIFS' creaseAngle='0.5' solid='false' coordIndex='0 1 2 -1 0 2 3 -1 0 3 4 -1 0 4 1 -1 5 2 1 -1 5 3 2 -1 5 4 3 -1 5 1 4 -1'> <ColorRGBA DEF='HAnimSiteColorRGBA' color='1 1 0 1 1 1 0 0.1'/> <Coordinate point='0 0.8 0 -0.8 0 0 0 0 0.8 0.8 0 0 0 0 -0.8 0 -0.8 0'/> </IndexedFaceSet> <Appearance> <Material diffuseColor='1 1 0' transparency='0.3'/> </Appearance> </Shape>
> 
> My code:
> 
>                          <Shape DEF='HAnimSiteShape'>
>                                  <IndexedFaceSet DEF='DiamondIFS' creaseAngle='0.5' solid='false' coordIndex='0 1 2 -1 0 2 3 -1 0 3 4 -1 0 4 1 -1 5 2 1 -1 5 3 2 -1 5 4 3 -1 5 1 4 -1'>
>                                          <ColorRGBA DEF='HAnimSiteColorRGBA' color='1 1 0 1 1 1 0 0.1'/>
>                                          <Coordinate point='0 0.8 0 -0.8 0 0 0 0 0.8 0.8 0 0 0 0 -0.8 0 -0.8 0'/>
>                                  </IndexedFaceSet>
>                          <Appearance>
>                                  <Material diffuseColor='1 1 0' transparency='0.3'/>
>                          </Appearance>
>                          </Shape>

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



More information about the x3d-public mailing list