[x3d-public] Proposal: X3DFogObject visibilityStart

Holger Seelig holger.seelig at yahoo.de
Mon Nov 17 16:17:49 PST 2025


Yes it is a small mistake. I fixed the email subject now. My real intention is indeed that it is named visibilityStart to match it with visibilityRange.

Thank you all very much,
Holger

—
Holger Seelig
holger.seelig at yahoo.de


> Am 17.11.2025 um 23:40 schrieb Michalis Kamburelis <michalis at castle-engine.io>:
> 
> Kudos, I think it's a great idea.
> 
> I understand that both linear and exponential equations for fog look basically the same, just instead of previous "distance from the viewer" we put "distance from the viewer - visibilityStart" (if distance from the viewer >= visibilityStart, otherwise fog amount is 0).
> 
> Note: Your email title and some description mixes up "startVisibility" and "visibilityStart".
> 
> I understand "visibilityStart" is the right one and the "startVisibility" was just an obvious mistake? :)
> 
> I see example on https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/media/examples/EnvironmentalEffects/Fog/Fog.x3d is using "visibilityStart" .
> 
> My preference would also be for "visibilityStart", looks consistent with "visibilityRange".
> 
> Added to TODO to support this also in CGE :)
> 
> Regards,
> Michalis
> 
> On Monday, November 17th, 2025 at 19:13, Holger Seelig via x3d-public <x3d-public at web3d.org> wrote:
>> All X3DFogObject nodes in X_ITE have a new field startVisibility.
>> 
>> X3DFogObject {
>>   SFFloat [in, out] visibilityStart 0 [0, infinity]
>>   ...
>> }
>> 
>> The motivation is to finely control fog more than it was possible before.
>> 
>> The startVisibility field defines the distance where the fog starts to fade the objects. The visibilityRange defines the range from zero fog to full fog. That means fog now start at startVisibility and ends at startVisibility + visibilityRange. Because startVisibility has a default value of 0 it will not break any existing X3D files.
>> 
>> An implementation of this behaviour should be trivial when shaders are used to render the scene.
>> 
>> The advantage of this new field is that the author can decide when fog fading starts and can have objects in the near environment not affected by the fog. It is also possible to create a fog wall, when visibilityRange very small.
>> 
>> There exist example files with use of startVisibility field to explore the exact behaviour. 
>> 
>> At first a very simple file where you can adjust startVisibility and visibilityRange and see what happens.
>> 
>> https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/media/examples/EnvironmentalEffects/Fog/Fog.x3d
>> 
>> Another file exists which shows an object near to the viewpoint, which is clear and sharp, but look at the horizon, the transition between the floor and the the clouds is very smooth because of the fog.
>> 
>> https://create3000.github.io/x_ite/playground/?url=https://create3000.github.io/media/examples/Navigation/Viewpoint/Viewpoint.x3d
>> 
>> Best regards,
>> Holger
>> 
>>>> Holger Seelig
>> holger.seelig at yahoo.de
>> 
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20251118/51f5856a/attachment-0001.html>


More information about the x3d-public mailing list