[x3d-public] wondering about Texture mapping specified in material nodes [corrected]

Don Brutzman brutzman at nps.edu
Sat Sep 19 10:54:54 PDT 2020


continuing just a little more.

[...]

On 9/19/2020 7:59 AM, Don Brutzman wrote:
> If we are converging, then identical field pattern for PhysicalMaterial above would be similarly applied to Material and UnlitMaterial in X3D4 specification.

[3] 12.4.5 Material
     https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#Material

============================================
# Current WD2 Material with mapping fields, backwards compatible with X3D3

Material : X3DOneSidedMaterialNode {
   SFFloat  [in,out] ambientIntensity          0.2          [0,1]
   SFNode   [in,out] ambientTexture            NULL         [X3DSingleTextureNode]
   SFString [in,out] ambientTextureMapping     ""

   SFColor  [in,out] diffuseColor              0.8 0.8 0.8  [0,1]
   SFNode   [in,out] diffuseTexture            NULL         [X3DSingleTextureNode]
   SFString [in,out] diffuseTextureMapping     ""

   SFColor  [in,out] emissiveColor             0 0 0        [0,1]
   SFNode   [in,out] emissiveTexture           NULL         [X3DSingleTextureNode]
   SFString [in,out] emissiveTextureMapping    ""

   SFNode   [in,out] metadata                  NULL         [X3DMetadataObject]

   SFNode   [in,out] normalTexture             NULL         [X3DTexture2DNode]
   SFString [in,out] normalTextureMapping      ""
   SFFloat  [in,out] normalScale               1            [0, ∞]

   SFFloat  [in,out] occlusionStrength         1            [0,1]
   SFNode   [in,out] occlusionTexture          NULL         [X3DTexture2DNode]
   SFString [in,out] occlusionTextureMapping   ""
   
   SFFloat  [in,out] shininess                 0.2          [0,1]
   SFNode   [in,out] shininessTexture          NULL         [X3DSingleTextureNode]
   SFString [in,out] shininessTextureMapping   ""

   SFColor  [in,out] specularColor             0 0 0        [0,1]
   SFNode   [in,out] specularTexture           NULL         [X3DSingleTextureNode]
   SFString [in,out] specularTextureMapping    ""

   SFFloat  [in,out] transparency              0            [0,1]
}
============================================

to follow the explicit-field pattern shown in PhysicalMaterial would replace "mapping" fields to become something like

============================================
# Suggested Material without mapping fields, backwards compatible with X3D3

Material : X3DOneSidedMaterialNode {
   SFFloat  [in,out] ambientIntensity          0.2          [0,1]
   SFNode   [in,out] ambientTexture            NULL         [X3DSingleTextureNode]
   SFNode   [in,out] ambientTexCoord           NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] ambientTextureTransform   NULL         [X3DSingleTextureTransformNode]

   SFColor  [in,out] diffuseColor              0.8 0.8 0.8  [0,1]
   SFNode   [in,out] diffuseTexture            NULL         [X3DSingleTextureNode]
   SFNode   [in,out] diffuseTexCoord           NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] diffuseTextureTransform   NULL         [X3DSingleTextureTransformNode]

   SFColor  [in,out] emissiveColor             0 0 0        [0,1]
   SFNode   [in,out] emissiveTexture           NULL         [X3DSingleTextureNode]
   SFNode   [in,out] emissiveTexCoord          NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] emissiveTextureTransform  NULL         [X3DSingleTextureTransformNode]

   SFNode   [in,out] metadata                  NULL         [X3DMetadataObject]

   SFNode   [in,out] normalTexture             NULL         [X3DTexture2DNode]
   SFNode   [in,out] normalTexCoord            NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] normalTextureTransform    NULL         [X3DSingleTextureTransformNode]

   SFFloat  [in,out] occlusionStrength         1            [0,1]
   SFNode   [in,out] occlusionTexture          NULL         [X3DTexture2DNode]
   SFNode   [in,out] occlusionTexCoord         NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] occlusionTextureTransform NULL         [X3DSingleTextureTransformNode]
   
   SFFloat  [in,out] shininess                 0.2          [0,1]
   SFNode   [in,out] shininessTexture          NULL         [X3DSingleTextureNode]
   SFString [in,out] shininessTexCoord         NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] shininessTextureTransform NULL         [X3DSingleTextureTransformNode]

   SFColor  [in,out] specularColor             0 0 0        [0,1]
   SFNode   [in,out] specularTexture           NULL         [X3DSingleTextureNode]
   SFNode   [in,out] specularTexCoord          NULL         [X3DSingleTextureCoordinateNode]
   SFNode   [in,out] specularTextureTransform  NULL         [X3DSingleTextureTransformNode]

   SFFloat  [in,out] transparency              0            [0,1]
}
============================================

... so for proper spelling of field names ("*TexCoord" vice "*TextureCoord"), consistency correction to previous Version 3-fieldnames-verbose and Version 4-fieldnames-terse examples:

       diffuseTextureCoord  USE TEXTURECOORDINATE_6
       normalTextureCoord   USE TEXTURECOORDINATE_6
       specularTextureCoord USE TEXTURECOORDINATE_7

should be

       diffuseTexCoord      USE TEXTURECOORDINATE_6
       normalTexCoord       USE TEXTURECOORDINATE_6
       specularTexCoord     USE TEXTURECOORDINATE_7

No change to logic or topology here, just getting precise on spelling.

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