[x3d-public] X3D JSON schema: X_ITE material extensions

John Carlson yottzumm at gmail.com
Thu Jun 27 11:40:03 PDT 2024


Note that I have a patch for X3DUOM for this issue, but I haven't gotten to
X3D XML schema yet.

I'm having difficulty finding references to
*X3DSingleTextureTransformNode *inside
the inheritance hierarchy in X3DUOM, X3DJSAIL and x3.dpy (there is a
standalone interface).  This absence in X3DUOM is affecting X3D JSON
schema. Here are 3 node types in the standard where the inheritance is
present, but I don't see it in X3DUOM.

*https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#TextureTransform
<https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#TextureTransform>*


*https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransform3D
<https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransform3D>*

*https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransformMatrix3D
<https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransformMatrix3D>*

=============================================================
X3DUOM:

      <ConcreteNode name="TextureTransform">
         <InterfaceDefinition specificationUrl="
https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texturing.html#TextureTransform
"
                              appinfo="TextureTransform shifts 2D texture
coordinates for positioning, orienting and scaling image textures on
geometry.">
            <componentInfo name="Texturing" level="1"/>
            <Inheritance baseType="*X3DTextureTransformNode*"/>
[ snip ]
      <ConcreteNode name="TextureTransform3D">
         <InterfaceDefinition specificationUrl="
https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransform3D
"
                              appinfo="TextureTransform3D applies a 3D
transformation to texture coordinates.">
            <componentInfo name="Texturing3D" level="1"/>
            <Inheritance baseType="*X3DTextureTransformNode*"/>
[ snip ]
      <ConcreteNode name="TextureTransformMatrix3D">
                                   <InterfaceDefinition specificationUrl="
https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/texture3D.html#TextureTransformMatrix3D"

 appinfo="TextureTransformMatrix3D applies a 3D transformation to texture
coordinates.">
                                     <componentInfo name="Texturing3D"
level="1"/>
 <Inheritance baseType="*X3DTextureTransformNode*"/>
==================================================================
Here are some of the issues generated from x3dvalidate, when dealing with
conversions of glTF files using Holger's x3d-tidy.

 location in document:
/X3D/Scene/-children/1/Shape/-appearance/Appearance/-textureTransform/MultiTextureTransform/-textureTransform/0
 params: {"additionalProperty":"TextureTransform"}
 file: ./ChairDamaskPurplegold/glTF/ChairDamaskPurplegold.x3dj

 location in document:
/X3D/Scene/-children/2/Group/-children/1/Switch/-children/0/Shape/-appearance/Appearance/-textureTransform/MultiTextureTransform/-textureTransform/0
 params: {"additionalProperty":"TextureTransform"}
 file: ./GlamVelvetSofa/glTF/GlamVelvetSofa.x3dj

 location in document:
/X3D/Scene/-children/1/Group/-children/0/Switch/-children/0/Shape/-appearance/Appearance/-textureTransform/MultiTextureTransform/-textureTransform/0
 params: {"additionalProperty":"TextureTransformMatrix3D"}
 file: ./SheenChair/glTF/SheenChair.x3dj

 location in document:
/X3D/Scene/-children/1/Shape/-appearance/Appearance/-textureTransform/MultiTextureTransform/-textureTransform/0
 params: {"additionalProperty":"TextureTransformMatrix3D"}
 file: ./SheenCloth/glTF/SheenCloth.x3dj

 location in document:
/X3D/Scene/-children/1/Group/-children/1/Transform/-children/0/Shape/-appearance/Appearance/-textureTransform/MultiTextureTransform/-textureTransform/0
 params: {"additionalProperty":"TextureTransformMatrix3D"}
 file: ./ToyCar/glTF/ToyCar.x3dj
==================================================================
Here's some sample JSON:

                            "-textureTransform": { "MultiTextureTransform":
                              {
                                "-textureTransform": [
                                  { "TextureTransformMatrix3D":
                                    {
                                      "@mapping": "TEXCOORD_0",
                                      "@matrix": [ 3, 0, 0, 0, 0, -3, 0, 0,
0, 0, 1, 0, 0, 1, 0, 1 ]
                                    }
                                  },
                                  { "TextureTransformMatrix3D":
                                    {
                                      "@mapping": "TEXCOORD_1",
                                      "@matrix": [ 1, 0, 0, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, 1, 0, 1 ]                                      }
                                  }
                                ]
                              }
                            }
                          }
[ snip ]

                            "-textureTransform": { "MultiTextureTransform":
                              {
                                "-textureTransform": [
                                  { "TextureTransform":
                                    {
                                      "@mapping": "TEXCOORD_0",
                                      "@translation": [ 0, -1 ],
                                      "@scale": [ 1, -1 ]
                                    }
                                  },
                                  { "TextureTransformMatrix3D":
                                    {
                                      "@mapping": "TEXCOORD_1",
                                      "@matrix": [ -2.080734, 4.546487, 0,
0, 4.546487, 2.080734, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1 ]
                                    }
                                  }
                                ]
                              }
                            }

I don't currently have any XML, but it should be easy to generate.

I don't see any specific "glTFisms" in these examples, but there might be
some??

Note: when I repaired the inheritance hierarchy in X3DUOM, the validator
got past the problem.

Thanks,

John

On Thu, Jun 27, 2024 at 9:49 AM John Carlson <yottzumm at gmail.com> wrote:

> Okay, I ran x3d-tidy on glTF-Sample-Assets/Models at main ·
> KhronosGroup/glTF-Sample-Assets (github.com)
> <https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models>  to
> produce .x3dj files (JSON)
>
> This was a first step.  Then I installed the JSON schema I developed for
> X_ITE in x3dvalidate.
>
> Then I ran:
>
> $ find . -name '*.x3dj' | xargs node.exe ~/x3dvalidate/index.js|grep -E '^
> location|^ params'|sort -u
>
> Most of the reported issues involved
>
> @colorSpaceConversion
>
> inside
>
> ImageTexture
>
> and -extensions
>
> inside
>
> PhysicalMaterial
>
> Other issues involved:
>
>  location in document:
> /X3D/Scene/-children/1/Transform/-children/0/Shape/-geometry/IndexedTriangleSet
>  params: {"additionalProperty":"-tangent"}
>
>  location in document: /X3D/Scene/-children/1/HAnimHumanoid/-skeleton/0
>  params: {"additionalProperty":"Transform"}
> [ not per spec, no Transform inside HAnimHumanoid.-skeleton ]
>
>  location in document: /X3D/Scene/-children/1/Group/-children/0
>  params: {"additionalProperty":"EnvironmentLight"}
>
>  location in document:
> /X3D/Scene/-children/1/Group/-children/0/HAnimHumanoid/-skeleton/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0/HAnimJoint/-children/0
>  params: {"additionalProperty":"HAnimHumanoid"}
> [ not per spec, no humanoid inside joint ]
>
>  location in document: /X3D/Scene/-children/1/InstancedShape
>  params: {"additionalProperty":"-appearance"}
>
>  location in document:
> /X3D/Scene/-children/1/Group/-children/0/Transform/-children/0/Shape/-appearance/Appearance/-material/SpecularGlossinessMaterial
>  params: {"additionalProperty":"-diffuseTexture"}
>
> (I'll be looking at your X3DUOM in more detail).
>
> If you would like more detail, I can provide it, particularly, you might
> be interested in specific filenames.
>
> On Thu, Jun 27, 2024 at 1:04 AM John Carlson <yottzumm at gmail.com> wrote:
>
>> Here's a X3D JSON schema with extensions for X_ITE material extension
>> nodes (including an X3DMaterialExtensionNode abstract node type).
>>
>> Please review.
>>
>> X3DJSONLD/src/main/schema/x3d-4.0-debug.json at master ·
>> coderextreme/X3DJSONLD (github.com)
>> <https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-debug.json>
>>
>> I will eventually get this into x3dschema, x3dvalidate, etc. This depends
>> on demand, I guess.
>>
>> I'm going to let Holger publish any X3DUOM extensions for X_ITE for now,
>> since Holger is more aware of what values are actually good ones for these
>> nodes.
>>
>> My current plan is to convert over to using x3d-tidy instead of
>> X3dToJson.xslt.  I realize this will probably mean reordering component,
>> meta and unit statements, but I'm crossing my fingers.
>>
>> John
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240627/8b7d26e8/attachment-0001.html>


More information about the x3d-public mailing list