[x3d-public] Fog and Background

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Sep 28 09:46:37 PDT 2023


Perhaps unsurprisingly, I agree with Principle of Least Surprise too...

 

*	Principle of least astonishment
*	https://en.wikipedia.org/wiki/Principle_of_least_astonishment

 

Paying attention to binding of Background and Fog nodes is important when
composing multiple models, typically the topmost nodes are bound.

 

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.

 

*	X3D 4.0 Architecture, clause 24 Environmental effects component,
24.4.4 LocalFog
*
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.proof/Pa
rt01/components/environmentalEffects.html#LocalFog

 

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 https://faculty.nps.edu/brutzman

 

-----Original Message-----
From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Michalis
Kamburelis
Sent: Thursday, September 28, 2023 8:53 AM
To: Andreas Plesch <andreasplesch at gmail.com>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] Fog and Background

 

I think we should clarify the spec -- Fog doesn't affect Background, so
option A.

 

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.

 

- 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.

 

- As you say, it is possible to blend Background with Fog (option D).

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).

 

    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.

 

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.

 

Regards,

Michalis

 

 

 

 

czw., 28 wrz 2023 o 17:28 Andreas Plesch < <mailto:andreasplesch at gmail.com>
andreasplesch at gmail.com> napisał(a):

> 

> The question came up if global Fog should affect the background sky 

> and ground, in addition to scene  objects/shapes.

> 

> The spec. talks about Fog only in relation to objects with a defined 

> distance to the avatar:

> 

>  <https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.pr>
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-IS.pr

> oof/Part01/components/environmentalEffects.html

> 

> So I think most browsers ignore global Fog for rendering Background.

> 

> Of course, in reality fog would exist in any direction, not just in 

> front of scene objects.

> 

> So global Fog, in principle, should apply in any look direction even 

> if there are no Shapes, it appears.

> 

> One problem is that background would need to be considered to be 

> placed at a very large distance with the effect that blending in the 

> Fog color means effectively replacing all of the Background with the 

> Fog color. For real, dense fog this is probably the desired effect but 

> for light fog, one still would likely want to see through the fog even 

> at large distances.

> 

> Would it make sense to introduce a maximum fog intensity/opacity at 

> the range field distance ?

> 

> But given that perhaps the main purpose of fog is to hide distant 

> objects so that they do not need to be rendered, perhaps just 

> accepting that the fog color becomes the background color in scenes 

> with Fog is acceptable as well. This seems currently to be not 

> inconsistent with spec. as well but it is not how most browsers apply 

> Fog.

> 

> In any case, a clarifying sentence in the spec. on how Fog should 

> affect Background seems to be needed:

> 

> Options:

> 

> A) "Fog only affects rendering of Shapes." May boil down "only" in the 

> appropriate place.

> B) "A Background node is considered to be at a distance larger than
range."

> C) "Fog color replaces any Background for background rendering."

> D) "The intensity field can be used to limit the maximum fog 

> intensity." and updates to the fog equations (replace 1.0 with 

> intensity).

> 

> Any thoughts or ideas on how to address Fog and Background interaction 

> very welcome. Since these nodes exist for a very long time, there 

> probably was an earlier discussion also.

> 

> Thanks, Andreas

> 

> --

> Andreas Plesch

> Waltham, MA 02453

> 

> _______________________________________________

> x3d-public mailing list

>  <mailto:x3d-public at web3d.org> 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

 <mailto:x3d-public at web3d.org> x3d-public at web3d.org

 <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230928/7c38bb3d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230928/7c38bb3d/attachment-0001.p7s>


More information about the x3d-public mailing list