<div dir="ltr"><div>Hello Don,</div><div><br></div><div>Answers below :)<br></div><div><br></div><div>A big warning for your points b,c,d,e: do not confuse "Phong shading" with "Phong lighting model". I predicted someone may get confused by it :), I even placed in X3Dv4 draft specification a warning about it: <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/lighting.html#GouraudShading" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/lighting.html#GouraudShading</a> """The lighting equations in previous sections
    assume that you use <i>Phong shading</i>
    (not to be confused with <i>Phong lighting model</i>).""". I have now created a wiki page to address this explicitly: <a href="https://github.com/michaliskambi/x3d-tests/wiki/Do-not-confuse-Phong-shading-with-Phong-lighting-model">https://github.com/michaliskambi/x3d-tests/wiki/Do-not-confuse-Phong-shading-with-Phong-lighting-model</a> .</div><div><br></div><div></div><div>More answers inline below.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Don Brutzman <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">9.2.4 Browser options<br>
<a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/networking.html#BrowserProperties" rel="noreferrer" target="_blank">https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/networking.html#BrowserProperties</a><br>
<br>
lists default and allowed values for X3D Browser options.  Notably "Support for browser options is not required but is strongly recommended."<br>
<br>
Of interest:<br>
<br>
=======================================================<br>
Name,   Description,    Type/valid range,       Default<br>
<br>
Shading;        Specify shading mode for all objects;   Wireframe, Flat, Gouraud, Phong;        Gouraud<br>
=======================================================<br>
<br>
a. Default for X3D 3.0-3.3 appears incorrect, typical is Phong vice Gouraud.  Is that correct?  If so, it is an erratum.<br></blockquote><div><br></div><div>I think we can change the default to "Phong" indeed. It's 2020 and we can recommend "Phong shading" indeed :) Perfect implementation of X3D 3 lighting equations already required Phong shading anyway. Even though many browsers approximate it with Gouraud shading.<br></div><div><br></div><div>Browsers are free to ignore it anyway. I don't know which browsers support it.</div><div><br></div><div>***I highly advise testing various X3D browsers, to actually estimate the potential impact of this change.*** Then make the specification change, after consulting with affected browsers.<br></div><div><br></div><div>( Castle Game Engine / view3dscene doesn't support these options, we have other ways (using engine Pascal API) to set default shading. So my implementation practically doesn't care about this change. )  <br></div><div><br></div><div>Although I don't think that "typical is Phong", as you write. Actually most X3D browsers still by default make "Gouraud shading", as far as I know (hypothesis; testing to confirm/reject this hypothesis is most welcome). But I agree that we can start recommending "Phong shading" here, in X3D v4.</div><div><br></div><div>In the case of PBR, I don't expect X3D browsers to actually support Gouraud shading. Although it is theoretically possible.<br></div><div><br></div><div>( Castle Game Engine / view3dscene by default use Gouraud shading, but we switch to Phong shading when we see that shape uses some feature that requires Phong shading to be sensible -- like normal maps, shadow maps, and even PBR. )<br></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>
b. Should we add PBR?<br></blockquote><div><br></div><div>No no no :) There is no such thing as "PBR shading".<br></div><div><br></div><div>You are making a (very common) mistake here: you confuse "Phong shading" with "Phong lighting model". It is unfortunate that these 2 independent things share the same name.</div><div><br></div><div>I wrote an explanation on <a href="https://github.com/michaliskambi/x3d-tests/wiki/Do-not-confuse-Phong-shading-with-Phong-lighting-model">https://github.com/michaliskambi/x3d-tests/wiki/Do-not-confuse-Phong-shading-with-Phong-lighting-model</a> -- please read that page now, before reading this mail further :)<br></div><div><br></div><div>There is no such thing "PBR shading". You use "Phong shading" with "Physical lighting model (PBR)" when implementing PBR in normal cases. (I fully expect X3D browsers to not even offer "Gouraud shading" with "Physical lighting model (PBR)", although theoretically it should be possible.)<br></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>
c. Use case: X3D4 scene with shapes using PBR then Inlines an X3D3 scene.  Presumably that is rendered in classic manner.<br></blockquote><div><br></div><div>See my answer to b. This use-case is not related to the "shading" option.</div><div><br></div><div>- If you use "Material" -> you have "Phong lighting model" (actually, "Blinn-Phong lighting model", but I often shorten it to just "Phong lighting model" in the context of X3D, because there is only "Blinn-Phong" version)</div><div><br></div><div>- If you use "PhysicalMaterial" -> you have PBR, or "Physical lighting model".</div><div><br></div><div></div><div>It doesn't matter if you "Inline" a model or load it in any other way. It doesn't matter if it's X3D 3 or X3D 4. <br></div><div>  <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
d. Use case: author wants to upgrade an X3D3 model to PBR, so he changes it to X3Dv4 and perhaps updates Material nodes as well.<br></blockquote><div><br></div><div>See my answer to b. This use-case is not related to the "shading" option.<br></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>
e. Use case: X3D4 model wants to load X3D3 Inline and force it to use PBR rendering.  Does this make sense?  Seems like X3D3 Material nodes simply default to classic rendering, and so can be "upgraded" without deliberate modeling changes that make the Inline model into an X3D4 model.  So such a use case might not make sense....<br></blockquote><div><br></div><div>It doesn't make sense, I'm afraid. If a shape uses "Material", then it uses "Phong lighting model", because "Material" specifies parameters like ambient / diffuse / specular that correspond to "Phong lighting model".</div><div><br></div><div>We talked about this, I believe you asked this question a few times :) There is *no* automatic (correct, not only approximate) conversion from "Phong lighting model" (Material) -> "Physical lighting model, PBR" (PhysicalMaterial). These lighting models have incompatible equations with incompatible inputs. Authors that will want to "upgrade" their models to PBR will have to manually replace Material -> PhysicalMaterial nodes, and adjust PhysicalMaterial parameters, which have incompatible names and incompatible meaning from Material parameters.</div><div></div><div><br></div><div>Regards,</div><div>Michalis<br></div></div></div>