<div dir="ltr">I'm pretty sure freewill follows the Michalis interpretation.<div>-Doug</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 6:28 PM, Michalis Kamburelis <span dir="ltr"><<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2018-07-27 18:49 GMT+02:00 Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>>:<br>
> 4. LocalFog work.  Sungmin Kwon and I have been considering how to use<br>
> LocalFog for<br>
><br>
> 24.4.4 LocalFog<br>
> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/enveffects.html#LocalFog" rel="noreferrer" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/enveffects.html#<wbr>LocalFog</a><br>
><br>
> states:<br>
> "The LocalFog node provides a way to simulate atmospheric effects by<br>
> blending objects with the colour specified by the color field based on the<br>
> distances of the various objects from the viewer."<br>
><br>
> This is incorrect.  LocalFog intensity doesn't consider the viewer distance.<br>
> Rather the next sentence pertains:<br>
> "The distances are calculated in the coordinate space of the LocalFog node."<br>
><br>
> Recommended correction: change "from the viewer" to something like "from the<br>
> local center of the LocalFog node's transformation heirarchy".<br>
<br>
</span>The change of LocalFog prose, as you propose, would break the way it<br>
is implemented in view3dscene / Castle Game Engine. It would also<br>
break my understanding, and use-cases, of the LocalFog node.<br>
<br>
I see in <a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsPresentation.pdf" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/<wbr>content/examples/<wbr>ConformanceNist/Miscellaneous/<wbr>LocalFog/<wbr>LocalFogEffectsPresentation.<wbr>pdf</a><br>
that you  made tests (with 2 browsers that support LocalFog). But I<br>
tested X_ITE at<br>
<a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/Miscellaneous/LocalFog/LocalFogEffectsTestIndex.html" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/<wbr>content/examples/<wbr>ConformanceNist/Miscellaneous/<wbr>LocalFog/<wbr>LocalFogEffectsTestIndex.html</a><br>
now, and I don't see your conclusions. In X_ITE, the visible intensity<br>
of fog produced by "LocalFog" depends on the distance from the viewer.<br>
X_ITE (at least on my browser, Firefox 60.0.1) behaves exactly like<br>
X3D specification currently says, and exactly like view3dscene/CGE<br>
already do. The fog amount depends on the distance from the viewer,<br>
i.e. moving the camera makes the fog appear at objects closer to you.<br>
<br>
For me (and for my implementation of view3dscene / Castle Game<br>
Engine), LocalFog means that the fog is applied based on the distance<br>
*from the viewer*, not from the "local center of the LocalFog node's<br>
transformation hierarchy" as you propose to change. Various prose in the<br>
specification makes it clear IMHO that it's the distance from the<br>
viewer:<br>
<br>
- "...based on the distances of the various objects from the viewer"<br>
<br>
- "Objects located outside the visibilityRange from the viewer are<br>
drawn with a constant colour..."<br>
<br>
>From <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/enveffects.html#LocalFog" rel="noreferrer" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/enveffects.html#<wbr>LocalFog</a><br>
.<br>
<br>
The LocalFog calculation is much like global Fog calculation in this regard.<br>
<br>
The only difference (and the reason for "Local" prefix) betwen<br>
LocalFog and Fog is that LocalFog only affects a subset of the scene<br>
(following "24.2.2.3 Local fog semantics",<br>
<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/enveffects.html#LocalFogSemantics" rel="noreferrer" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/enveffects.html#<wbr>LocalFogSemantics</a><br>
). Only the things within the same parent as LocalFog are affected. In<br>
contrast, global Fog affects everything, and is a "bindable" node.<br>
<br>
While the X3D spec talks about the "local coordinate system" of<br>
LocalFog, I always understood it to mean that one should apply the<br>
scaling (from LocalFog parent transformations) to visibilityRange.<br>
Nothing more. Exactly the same as the global Fog node is also in<br>
"local coordinate system" (<br>
<a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/enveffects.html#Fog" rel="noreferrer" target="_blank">http://www.web3d.org/<wbr>documents/specifications/<wbr>19775-1/V3.3/Part01/<wbr>components/enveffects.html#Fog</a><br>
).<br>
<br>
My use-case for LocalFog is when you want to cover only specific nodes<br>
with fog, while leaving the rest of the world un-fogged (or with<br>
different fog settings). Like this (in classic encoding):<br>
<br>
```<br>
  Group { ... stuff that is unaffected by red fog ... }<br>
  Group {<br>
    children [<br>
      LocalFog { color 1 0 0 }<br>
      Group { ... stuff that is affected by red fog ... }<br>
    ]<br>
  }<br>
```<br>
<br>
That being said, I support the idea of testing this on various X3D<br>
browsers. If all the other X3D browsers interpret LocalFog as you<br>
describe (calculating distance from local center, not viewer), then of<br>
course we should adjust the specification, and I will adjust my<br>
implementation:)<br>
<br>
Maybe I misinterpret something in your mail and PDF, since your own<br>
test (on X_ITE) contradicts your conclusions, as far as I can see.<br>
X_ITE seems to measure the distance from the viewer, just like X3D<br>
spec already says, and as view3dscene/CGE do.<br>
<br>
Apologies in advance if this is just a big misunderstanding on my part:)<br>
<br>
Best regards,<br>
Michalis<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/<wbr>listinfo/x3d-public_web3d.org</a><br>
</div></div></blockquote></div><br></div>