[x3d-public] ... X3D4 PBR Material textures: all [X3DSingleTextureNode] vice some [X3DTexture2DNode] ?

Michalis Kamburelis michalis.kambi at gmail.com
Sat Sep 26 06:18:45 PDT 2020


Yes to "use X3DSingleTextureNode throughout".

I deliberately wanted to use the "only 2D" texture type for
normalTexture and occlusionTexture in X3D 4.0 (to make X3D
implementations easier). But I don't think anymore it's necessary. If
no X3D browser developer will object here, I'm cool with using (more
general) X3DSingleTextureNode type for them

While 3D textures with normals, or cubemaps with normals, are not
common -> but they make sense, we should allow them.

Note that your comment about repeatS repeatT or textureProperties is not valid.

- We absolutely *want* to have repeatS, repeatT, textureProperties for
the 2D textures used with materials. And we will: since
X3DSingleTextureNode is the ancestor of X3DTexture2DNode. So changing
these fields (normalTexture and occlusionTexture) to
X3DSingleTextureNode is only adding more possibilities, not taking
away any. You can still place there "ImageTexture" and configure its
repeatXxx field.

- Other (non-2D) textures also have analogous fields, most texture
nodes should have textureProperties, 3D texture nodes have repeatS/T/U
etc. And that's all good :)

- These all properties make sense on textures. Placing textures inside
a material doesn't change anything here, it still makes sense to talk
about texture repeat, filtering etc.

Regards,
Michalis

sob., 26 wrz 2020 o 00:54 Don Brutzman <brutzman at nps.edu> napisał(a):
>
> Found a small inconsistency in X3D4 WD2 spec (while implementing the rest of "mapping" approach in X3D Schema and X3DUOM).
>
> Please look at node types in following, specifically [X3DSingleTextureNode] vs. [X3DTexture2DNode].
>
> =======================================
> 12.4.5 Material
>
> 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]
> }
> =======================================
>
> 18.3.2 X3DSingleTextureNode
>
> X3DSingleTextureNode : X3DTextureNode {
>    SFNode [in,out] metadata NULL [X3DMetadataObject]
> }
> =======================================
>
> 18.3.4 X3DTexture2DNode
>
> X3DTexture2DNode : X3DSingleTextureNode {
>    SFNode [in,out] metadata          NULL [X3DMetadataObject]
>    SFBool []       repeatS           TRUE
>    SFBool []       repeatT           TRUE
>    SFNode []       textureProperties NULL [TextureProperties]
> }
> =======================================
>
> Looks like node type for every SFNode texture field in the new Material nodes should be [X3DSingleTextureNode] rather than any as [X3DTexture2DNode].  Doubtful we'd ever want to rely on repeatS repeatT or textureProperties when modulating materials.
>
> OK to use [X3DSingleTextureNode] throughout?
>
> 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