<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-2"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1953433537;
mso-list-type:hybrid;
mso-list-template-ids:-1914771584 -1749795904 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:2;
mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New",serif;}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New",serif;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New",serif;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoPlainText>Perhaps unsurprisingly, I agree with Principle of Least Surprise too...<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>Principle of least astonishment<o:p></o:p></li><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>https://en.wikipedia.org/wiki/Principle_of_least_astonishment<o:p></o:p></li></ul><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Paying attention to binding of Background and Fog nodes is important when composing multiple models, typically the topmost nodes are bound.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Of related note, haven’t seen many examples of this, but we also have LocalFog node. This would seem to offer tremendous flexibility for authors when mixing background and fog effects.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>X3D 4.0 Architecture, clause 24 Environmental effects component, 24.4.4 LocalFog<o:p></o:p></li><li class=MsoPlainText style='mso-list:l0 level1 lfo1'>https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Part01/components/environmentalEffects.html#LocalFog<o:p></o:p></li></ul><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>all the best, Don<o:p></o:p></p><p class=MsoPlainText>-- <o:p></o:p></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New",serif'>Don Brutzman Naval Postgraduate School, Code USW/Br brutzman@nps.edu<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New",serif'>Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<o:p></o:p></span></p><p class=MsoPlainText><span style='font-size:9.0pt;font-family:"Courier New",serif'>X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman<o:p></o:p></span></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>-----Original Message-----<br>From: x3d-public <x3d-public-bounces@web3d.org> On Behalf Of Michalis Kamburelis<br>Sent: Thursday, September 28, 2023 8:53 AM<br>To: Andreas Plesch <andreasplesch@gmail.com><br>Cc: X3D Graphics public mailing list <x3d-public@web3d.org><br>Subject: Re: [x3d-public] Fog and Background</p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>I think we should clarify the spec -- Fog doesn't affect Background, so option A.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Other options are nice, but then we'd make a decision for graphic designers, and there are various possible valid ways to go -- they depend on specific scene.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>- Some people may want background to essentially become a solid color matching fog. This makes sense. It also means that Background node contents would not really matter. (option B) I think it would be surprising to do it automatically -- instead users can already achieve this behavior by repeating in Background node the same color as in Fog.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>- As you say, it is possible to blend Background with Fog (option D).<o:p></o:p></p><p class=MsoPlainText>But this is a graphical decision, it means that a "skyline" (where shapes, that are possibly 100% fog color when at far distance, change into background) is very clearly visible. And it may be good (e.g. when your scene has a good "skyline", e.g. city skyscrapers) and sometimes not (when your scene has a nonsense "skyline", and you wanted to hide it using Fog; e.g. if you cull distant geometry using NavigationInfo.visibilityRange).<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText> I imagine that e.g. sometimes (when scene has a nonsense "skyline", e.g. because of culling) graphic artists can do something better. Like a gradient at the bottom of Background matching fog color 100%, and only changing at the zenith.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>So, all these options make sense for some scenes. We should leave the decision to graphic artists and in X3D behave with "least surprise", I think. Option A thus (Fog only affects Shapes) seems best.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Regards,<o:p></o:p></p><p class=MsoPlainText>Michalis<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>czw., 28 wrz 2023 o 17:28 Andreas Plesch <<a href="mailto:andreasplesch@gmail.com"><span style='color:windowtext;text-decoration:none'>andreasplesch@gmail.com</span></a>> napisa³(a):<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> The question came up if global Fog should affect the background sky <o:p></o:p></p><p class=MsoPlainText>> and ground, in addition to scene objects/shapes.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> The spec. talks about Fog only in relation to objects with a defined <o:p></o:p></p><p class=MsoPlainText>> distance to the avatar:<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> <a href="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.pr"><span style='color:windowtext;text-decoration:none'>https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.pr</span></a><o:p></o:p></p><p class=MsoPlainText>> oof/Part01/components/environmentalEffects.html<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> So I think most browsers ignore global Fog for rendering Background.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Of course, in reality fog would exist in any direction, not just in <o:p></o:p></p><p class=MsoPlainText>> front of scene objects.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> So global Fog, in principle, should apply in any look direction even <o:p></o:p></p><p class=MsoPlainText>> if there are no Shapes, it appears.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> One problem is that background would need to be considered to be <o:p></o:p></p><p class=MsoPlainText>> placed at a very large distance with the effect that blending in the <o:p></o:p></p><p class=MsoPlainText>> Fog color means effectively replacing all of the Background with the <o:p></o:p></p><p class=MsoPlainText>> Fog color. For real, dense fog this is probably the desired effect but <o:p></o:p></p><p class=MsoPlainText>> for light fog, one still would likely want to see through the fog even <o:p></o:p></p><p class=MsoPlainText>> at large distances.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Would it make sense to introduce a maximum fog intensity/opacity at <o:p></o:p></p><p class=MsoPlainText>> the range field distance ?<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> But given that perhaps the main purpose of fog is to hide distant <o:p></o:p></p><p class=MsoPlainText>> objects so that they do not need to be rendered, perhaps just <o:p></o:p></p><p class=MsoPlainText>> accepting that the fog color becomes the background color in scenes <o:p></o:p></p><p class=MsoPlainText>> with Fog is acceptable as well. This seems currently to be not <o:p></o:p></p><p class=MsoPlainText>> inconsistent with spec. as well but it is not how most browsers apply <o:p></o:p></p><p class=MsoPlainText>> Fog.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> In any case, a clarifying sentence in the spec. on how Fog should <o:p></o:p></p><p class=MsoPlainText>> affect Background seems to be needed:<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Options:<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> A) "Fog only affects rendering of Shapes." May boil down "only" in the <o:p></o:p></p><p class=MsoPlainText>> appropriate place.<o:p></o:p></p><p class=MsoPlainText>> B) "A Background node is considered to be at a distance larger than range."<o:p></o:p></p><p class=MsoPlainText>> C) "Fog color replaces any Background for background rendering."<o:p></o:p></p><p class=MsoPlainText>> D) "The intensity field can be used to limit the maximum fog <o:p></o:p></p><p class=MsoPlainText>> intensity." and updates to the fog equations (replace 1.0 with <o:p></o:p></p><p class=MsoPlainText>> intensity).<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Any thoughts or ideas on how to address Fog and Background interaction <o:p></o:p></p><p class=MsoPlainText>> very welcome. Since these nodes exist for a very long time, there <o:p></o:p></p><p class=MsoPlainText>> probably was an earlier discussion also.<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> Thanks, Andreas<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> --<o:p></o:p></p><p class=MsoPlainText>> Andreas Plesch<o:p></o:p></p><p class=MsoPlainText>> Waltham, MA 02453<o:p></o:p></p><p class=MsoPlainText>><o:p> </o:p></p><p class=MsoPlainText>> _______________________________________________<o:p></o:p></p><p class=MsoPlainText>> x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText>> <a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>_______________________________________________<o:p></o:p></p><p class=MsoPlainText>x3d-public mailing list<o:p></o:p></p><p class=MsoPlainText><a href="mailto:x3d-public@web3d.org"><span style='color:windowtext;text-decoration:none'>x3d-public@web3d.org</span></a><o:p></o:p></p><p class=MsoPlainText><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org"><span style='color:windowtext;text-decoration:none'>http://web3d.org/mailman/listinfo/x3d-public_web3d.org</span></a><o:p></o:p></p></div></body></html>