<div dir="ltr"><div class="gmail_quote"><div class="gmail_attr">In general, see <a href="https://github.com/michaliskambi/x3d-tests/wiki/X3D-version-4:-New-features-of-materials,-lights-and-textures" target="_blank">https://github.com/michaliskambi/x3d-tests/wiki/X3D-version-4:-New-features-of-materials,-lights-and-textures</a> 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.<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">wt., 8 wrz 2020 o 19:10 Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Michalis, we were looking at draft X3D4 Shape component and updated support table today.  Here are some questions that likely hold general interest.<br>
<br>
---<br>
<br>
1. Hoping you can tell us more (perhaps again) about design rationale for integration of texture-related fields within Shape component nodes.<br>
<br>
[1] X3D4 Working Draft 2, Shape Component<br>
     <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html</a><br>
<br>
Interestingly<br>
- Appearance has the same fields as before including texture (adding backMaterial and pointProperties),<br>
- PhysicallyBasedMaterial has a number of new fields including various textures (seems sensible),<br>
- Material has the same fields as before, plus a set of textures fields similar to PhysicallyBasedMaterial,<br>
- UnlitMaterial has two texture fields (curious since it is unlit).<br>
<br>
---<br>
<br>
2. Wondering, why were a number of texture fields added to Material instead of Appearance?<br>
<br>
- presumably so that Material has a similar design to PhysicallyBasedMaterial...<br>
<br></blockquote><div><br></div><div>Each texture corresponds to a material parameter. So different material nodes -> mean you have different texture possibilities.</div><div><br></div><div>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).</div><div><br></div><div>Similarly PhysicalMaterial has baseColor, metallic, roughness. And therefore it has baseTexture, metallicRoughnessTexture.</div><div><br></div><div>Similarly UnlitMaterial (and Material and PhysicalMaterial too) have emissiveColor. Thus they also have emissiveTexture.</div><div><br></div><div>So all 3 material nodes are consistent. <br></div><div><br></div><div>This design pattern is consistent with everything else I know :) In particular with</div><div><br></div><div>- glTF</div><div>- Blender</div><div>- Unity (standard shader)<br></div><div><br></div><div>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*.</div><div><br></div><div>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", <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture</a> . This mapping makes:<br></div><div>- X3D 4 compatible with X3D 3</div><div>- keeps Appearance.texture still useful<br></div><div><br></div><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
---<br>
<br>
3. Wondering, what is the similarity/difference/interaction between<br>
(a) Appearance texture field and<br>
(b) Material ambientTexture field?<br></blockquote><div><br></div><div>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). <br></div><div><br></div><div>The "ambientTexture" affects the ambient factor.</div><div><br></div><div>See the lighting model ( <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/lighting.html#Lightingmodel" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/lighting.html#Lightingmodel</a> ) and Material description for equations that describe what is "ambient" and what is "diffuse".<br></div><div><br></div><div><div>And, as above, see the Appearance.texture specification in "12.2.5 Coexistence of textures specified in material nodes with the "Appearance.texture" field", <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#CoexistenceMaterialTexturesWithAppearanceTexture</a> .<br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
---<br>
<br>
4. Why does UnlitMaterial have emissiveTexture and normalTexture fields?<br></blockquote><div><br></div><div>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.<br></div><div><br></div><div><div>The answer "why UnlitMaterial has normalTexture" is answered in <a href="https://github.com/michaliskambi/x3d-tests/wiki/How-to-add-PBR-to-X3D%3F#does-it-make-sense-that-unlitmaterial-also-has-normaltexture" target="_blank">https://github.com/michaliskambi/x3d-tests/wiki/How-to-add-PBR-to-X3D%3F#does-it-make-sense-that-unlitmaterial-also-has-normaltexture</a> .</div></div><div> </div><div>Regards,</div><div>Michalis<br></div></div></div>