POV-Ray : Newsgroups : povray.advanced-users : How to avoid or remove fog from the backgound? : Re: How to avoid or remove fog from the backgound? Server Time
28 Jul 2024 12:24:30 EDT (-0400)
  Re: How to avoid or remove fog from the backgound?  
From: Warp
Date: 27 Jul 2005 14:11:07
Message: <42e7ce3b@news.povray.org>
Elmar Krieger <elm### [at] cmbirunl> wrote:
> 1) Create fog that doesn't start immediately at the camera, but only at a
> certain distance from it, so that some close objects are not fogged at all.
> Comparable to the OpenGL GL_FOG_MODE GL_LINEAR feature that allows to
> specify where the fog starts and where it reaches the maximum density.

  You have to take into account that povray, as a raytracer, can also
calculate reflections and refractions. Thus you have to make a distinction
between fog which is calculated along a ray (regardless of where the ray
starts) and a fog which is calculated in relation to the location of the
camera.

  Probably what you want is a "sphere" of fog centered on the camera so
that the "inside" of the sphere is fog-free and then, at some distance,
the fog starts getting denser.

  If I'm not complately mistaken (I haven't actually tried it) you can
get this effect by using a global media (which type? that's a good
question) using spherical mapping (just scale the media big enough).
  Even though media cannot be sampled for rays which do not hit anything,
I think that povray still calculates the color of the media correctly
assuming that it travels an infinite distance inside it (or at least
I remember encountering this phenomenon in the past).

  If it works it will give you a sphere of "fog" around the camera which
will work correctly for reflections and refractions also.

-- 

                                                          - Warp


Post a reply to this message

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