POV-Ray : Newsgroups : povray.binaries.animations : FOG with turbulence-- animation tests : Re: FOG with turbulence-- animation tests Server Time
24 Apr 2024 20:00:07 EDT (-0400)
  Re: FOG with turbulence-- animation tests  
From: clipka
Date: 8 Dec 2017 19:25:36
Message: <5a2b2d80@news.povray.org>
Am 08.12.2017 um 22:59 schrieb Kenneth:
> "Kenneth" <kdw### [at] gmailcom> wrote:
> 
>>
>> From what I can tell, fog/turbulence appears to be a kind of sophisticated
>> 'camera-projection effect', onto object SURFACES-- not actual volumetric fog,
>> even though it looks very similar to media... However, turbulence behavior
>> is strangely affected by the geometry of the objects; the animation examples
>> show the rather odd behavior of the fog 'conforming' to the particular geometry
>> its projected onto.
> 
> If the idea of fog being a 'projection effect' is true, then fog/turbulence
> behavior reminds me very much of Rune's old ILLUSION.INC include file (but
> possibly more sophisticated.)

From what little I know of fog turbulence, this has nothing to do with
any intended projection effect; rather, the algorithm /happens/ to make
it appear projection-ish.

In media, a pretty realistic effect is achieved by taking multiple
samples along the entire ray's length, thus effectively evaluates the
"entire" 3D turbulence space.

Using this approach, the "granularity" of the turbulence (i.e the
average distance between dark and bright regions) varies across the
resulting image depending on the depth, in accordance with the usual
perspective: Just like nearby objects are rendered larger in 2D image
space than far-away objects, the granularity of the turbulent media in
front of nearby objects is rendered larger in 2D space than in front of
far-away objects.

Now this multi-sample approach is obviously expensive in terms of render
performance. Fog is designed to be much cheaper (at the cost of
realism), taking only a single turbulence sample along each ray's
length. So in essence a 2D "sheet" of the turbulence space is evaluated.

Now a naive approach would be to make this 2D sheet a plane or spherical
surface at a fixed distance to the camera. However, this would render
the turbulence's "granularity" uniform in 2D image space, contrary to
the expected perspective effect.

To fix this, the 2D sheet of turbulence evaluated by POV-Ray is not
flat, but rather adapts to the depth of the scene: In areas of the image
where objects are close, POV-Ray takes a sample of 3D turbulence space
quite close to the camera, whereas where objects are far away, POV-Ray
takes a sample of 3D turbulence space quite far away. In this manner,
turbulence granularity does somewhat match the expected perspective effect.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.