[x3d-public] X3D Working Group meeting minutes, 27 July 2018: LocalFog

Don Brutzman brutzman at nps.edu
Fri Jul 27 20:40:30 PDT 2018

Feedback much appreciated.  It could certainly be our misunderstanding of the specification, interpreting "Local" both as a location-based and as a scene-graph-local effect.

Meanwhile no fog effect has any direct impact on a viewpoint per se, it is only affected Shape objects whose rendering changes.

It is certainly a bit confusing.  Your response makes sense but some issues (of understanding at least) remain.  We should work on this concept a bit more...

a. Do you agree with the foggy rendering of the left side columns in the example (within scope) while the other right-side columns (outside of scope but quite close nearby, inside LocalFog boundaries) have no fog effects?

b. If LocalFog only changes the effect on objects within it's scene subgraph scope, might all views be able to see its effect even if the Viewpoint is outside that scene subgraph?  What if the bound Viewpoint is not in the same subgraph, is there any difference?  If Viewpoints outside the scene subgraph see the LocalFog effects, then Viewpoints are not subject to scene-graph scope like shapes are.

c.  Based on your understanding, is fog density uniform within the visibilityRange sphere centered about LocalFog coordinate frame?

d. We often get fog in different parts of the Monterey area, and it usually tends to be situated with respect to location (for example in a small valley or blowing in from sea).  The visibility of objects within that localized fog is primarily dependent on x-y-z location, fog density is strongest inside and dissipates with lesser density at the boundaries of the fog zone.  The following images show the location dependency of fog effects.


d. Consider that last image from Seattle.  If the camera zooms in towards a street on the left, I'd expect that the observed fog effects would not change while the camera is outside the fog bank.  That is because the same number of moisture/fog particles are occluding the view, fogging the target shape.  It is only when the camera is within the physical boundaries of the fog bank that effects begin to vary based on camera distance.

e. LocalFog use within an Inline would seem to have no effect on anything else in the overall scene under these definitions.

We might do well to list some expected use cases, describe expected effects, check spec prose for consistency, then craft some simple scenes that demonstrate them.

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

all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman

More information about the x3d-public mailing list