[x3d-public] multiple texture fields - why in Material rather than Appearance?

Michalis Kamburelis michalis.kambi at gmail.com
Tue Sep 8 11:34:43 PDT 2020


In general, see
https://github.com/michaliskambi/x3d-tests/wiki/X3D-version-4:-New-features-of-materials,-lights-and-textures
and watch my talks I gave at Web3D teleconference some time ago :) (They
were recorded by Zoom and we wanted to put them online -- not sure if that
happened.) The basis of the design is that "each material parameter xxx is
configurable by a texture xxxTexture", this is something I hopefully
explained there many times :) This implies the answers below.

wt., 8 wrz 2020 o 19:10 Don Brutzman <brutzman at nps.edu> napisał(a):

> Michalis, we were looking at draft X3D4 Shape component and updated
> support table today.  Here are some questions that likely hold general
> interest.
>
> ---
>
> 1. Hoping you can tell us more (perhaps again) about design rationale for
> integration of texture-related fields within Shape component nodes.
>
> [1] X3D4 Working Draft 2, Shape Component
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html
>
> Interestingly
> - Appearance has the same fields as before including texture (adding
> backMaterial and pointProperties),
> - PhysicallyBasedMaterial has a number of new fields including various
> textures (seems sensible),
> - Material has the same fields as before, plus a set of textures fields
> similar to PhysicallyBasedMaterial,
> - UnlitMaterial has two texture fields (curious since it is unlit).
>
> ---
>
> 2. Wondering, why were a number of texture fields added to Material
> instead of Appearance?
>
> - presumably so that Material has a similar design to
> PhysicallyBasedMaterial...
>
>
Each texture corresponds to a material parameter. So different material
nodes -> mean you have different texture possibilities.

So e.g. Material has diffuseColor, specularColor, and therefore it also has
diffuseTexture, specularTexture. It would not make sense to put these
textures in Appearance, that specifies appearance properties that are
independent of the material type (i.e. independent of the lighting model).

Similarly PhysicalMaterial has baseColor, metallic, roughness. And
therefore it has baseTexture, metallicRoughnessTexture.

Similarly UnlitMaterial (and Material and PhysicalMaterial too) have
emissiveColor. Thus they also have emissiveTexture.

So all 3 material nodes are consistent.

This design pattern is consistent with everything else I know :) In
particular with

- glTF
- Blender
- Unity (standard shader)

In all of them, the essential feature of materials is that *every parameter
can be configured by a texture*, and *it depends on material type (which
corresponds to the lighting model) which parameters (and thus, which
textures) are available*.

How does it all map to Appearance.texture is in specification in "12.2.5
Coexistence of textures specified in material nodes with the
"Appearance.texture" field",
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture
. This mapping makes:
- X3D 4 compatible with X3D 3
- keeps Appearance.texture still useful



>
> ---
>
> 3. Wondering, what is the similarity/difference/interaction between
> (a) Appearance texture field and
> (b) Material ambientTexture field?
>

If you use (Phong) Material, and leave the "Material.diffuseTexture" as
NULL, then the "Apperance.texture" affects the "diffuse" lighting factor
(this is just like in X3D 3).

The "ambientTexture" affects the ambient factor.

See the lighting model (
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/lighting.html#Lightingmodel
) and Material description for equations that describe what is "ambient"
and what is "diffuse".

And, as above, see the Appearance.texture specification in "12.2.5
Coexistence of textures specified in material nodes with the
"Appearance.texture" field",
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture
.


>
> ---
>
> 4. Why does UnlitMaterial have emissiveTexture and normalTexture fields?
>

It has emissiveTexture because it has emissiveColor. As above, this is the
core idea of the new materials design: you can configure your parameters by
textures.

The answer "why UnlitMaterial has normalTexture" is answered in
https://github.com/michaliskambi/x3d-tests/wiki/How-to-add-PBR-to-X3D%3F#does-it-make-sense-that-unlitmaterial-also-has-normaltexture
.

Regards,
Michalis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200908/8aa0e19a/attachment-0001.html>


More information about the x3d-public mailing list