POV-Ray : Newsgroups : povray.newusers : A trivial example of media ? : Re: A trivial example of media ? Server Time
29 Jul 2024 06:23:36 EDT (-0400)
  Re: A trivial example of media ?  
From: Tom York
Date: 3 Jun 2006 23:20:01
Message: <web.44825122e5b9af5a7d55e4a40@news.povray.org>
"Dennis Clarke" <dcl### [at] blastwaveorg> wrote:
> I see the all of that spec and wonder how much of it is optional parameters
> or are they all needed ?  The vertical bar between parameters seems to
> indicate "OR" but I am not sure.  It seems as if _everything_ is optional.

Back in "the good old days" when media's predecessor system (known as halo)
was around, there was an excellent tutorial/walkthrough that used an
explosion as an example with which to demonstrate the basic syntax and use
of this sort of effect. It was probably replaced by documentation section
2.3.6 (in povray 3.6.1, at any rate), which you may want to check out, it
has many useful examples.

An absolutely minimal media (medium?) would look something like the
following. You have a container object that must be declared to be hollow,
(usually) with a completely transparent surface. The absolute minimum
required for the media definition is a declaration of the type of media
you're using, with any requirements that statement involves.

sphere {
  <0,0,0>, 1

  hollow on

  texture { pigment { colour rgbt 1 } }

  interior {
    media {
      emission <1,1,1>
      // OR:  absorption <1,1,1>
      // OR:  scattering { 1, <1,1,1> }
    }
  }
}

Everything else is optional, but not necessarily ignorable.

> I am trying to put together a trivial example of media in which a beam of
> light would be scattered in much the same way that a flashlight beam would
> be in a dark night with heavy fog or smoke.

In my experience, emission media is almost always trivial, absorption media
is less so, and scattering media is highly non-trivial. Check out those
examples in the documentation and see if any of them serve your needs.
Things I remember that may not be obvious: scattering media, far more than
the other two types, can be extremely time-consuming to render and hence
difficult to adjust. It may require extremely high sampling parameters to
capture shadows cast by light sources. Scattering media is *not*
illuminated by shadowless lights (which is another thing they oddly fail to
do).


Tom


Post a reply to this message

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