POV-Ray : Newsgroups : povray.binaries.images : A more successful render (~120KB) : Re: A more successful render (~120KB) Server Time
7 Aug 2024 01:21:43 EDT (-0400)
  Re: A more successful render (~120KB)  
From: Trevor G Quayle
Date: 12 Oct 2006 14:00:01
Message: <web.452e820fe7485ee6c150d4c10@news.povray.org>
Orchid XP v3 <voi### [at] devnull> wrote:
> >> The color of water is determined by what's underneath it because water by
> >> itself is colorless. Have a look at a swimmingpool :)
> >
> > Swimming pools are tricky to judge.  Every one i've ever seen is *painted*
> > baby boy blue.
> >
> > Water is colorless at the shallow depth that Orchid is rendering.  However,
> > water absorbs light differentially by wavelength.  Red is the first to go,
> > and green fades as you go deeper.  If your body of water is deep enough, it
> > will show blue all by itself.  (Otherwise, the oceans would be the color of
> > basalt and diatomaceous earth.)
>
> I've heard this one before... Does water actually absorb light, or is
> this due to scattering like with the sky?

http://www.seafriends.org.nz/phgraph/water.htm#colour

All you need to know about water and light.  I used this for the basis of my
underwater scene at the CGTalk lighting challenge "Under the Boardwalk".

I found it much more effective to leave the water perfectly clear (rgbt 1)
and use absorption and scattering media (no attenuation either).  Basically
you absorb the inverse of the water colour.  The colour of the scattering
(if you want scattering) should be based on the scattering particle colours
(i.e. dirt, algae, etc.).  In my example below you will need to play with
the numbers in the fade distance function (FD) according to the scale of
your scene.

-tgq

//START

#declare WCol=rgb <0.51373, 0.70588, 0.70588>; //water colour

#declare MWater=
  material{
    texture{
      pigment{rgbt 1}
      finish{conserve_energy  diffuse 0.0  ambient 0  reflection{0 1 fresnel
on metallic 0}}
      normal{P1}
    }

    #local FD=-(1000/(6*25.4))/ln(0.58);
    interior{
      ior 1.33
      media{
        absorption rgb 1-WCol //coastal
        density{rgb 1/FD}
      }
      media{
        method 3
        //intervals 12
        //samples 60,100
        jitter 0.5
        scattering{4,rgb <0.74118, 0.71765, 0.41961>}
        density{
          bozo
            color_map {
              [0.0 rgb 1/100]
              [1.0 rgb 1/200]
            }
            scale 1/2
        }
      }
    }
  }
//END



-tgq


Post a reply to this message

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