POV-Ray : Newsgroups : povray.text.scene-files : Water fog for doing underwater scenes Server Time
23 Dec 2024 21:46:50 EST (-0500)
  Water fog for doing underwater scenes (Message 1 to 1 of 1)  
From: Bob Hughes
Subject: Water fog for doing underwater scenes
Date: 16 May 2000 03:56:02
Message: <3920ff12@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: waterfog.pov
// Vers: 3.1
// Desc: water with murkiness
// Date: 2000.375
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene


// above=+1 or below=-1 water surface
#declare ViewPoint= -1;

// water
fog {fog_type 2 distance 10 color rgb<.33,.67,.75>
     fog_offset -9 // drop fog under plane
     fog_alt 4.5 // vertical murkiness
}

// water surface
plane {y,0 pigment {rgbft<.8,.9,.99,.95,.15>}
 normal {wrinkles .5 scale 2}
  finish {ambient 0 diffuse .15 specular .9 roughness .01
          reflection .33 reflection_exponent .33}
 interior {ior 1.33 caustics .01
           fade_distance 300 fade_power 1
          }
 inverse // inside-out, or use -y instead of y
}

// sea bed
plane {y,-9 pigment {rgb<1,.75,.5>}
 normal {wrinkles .5 scale 3}
  finish {diffuse .75 specular .1 roughness .1}}


// sky
sky_sphere {pigment {gradient y color_map {
        [0 color rgb<.9,.8,.6>][.2 color rgb<.3,.6,.9>]}}
}

// sunlight
light_source {<100,1000,1000>, 1.5}
// bright daylight
light_source {<-100,1000,-1000>, <.33,.5,.6> shadowless}

camera {location <0,2.5*ViewPoint,-15> look_at <0,-2.5,0>}

#declare TestObjects=
union {
sphere {2.5*y,1} // above water
sphere {0,1} // at surface
sphere {-2.5*y,1} // underwater
sphere {-5*y,1} // underwater
sphere {-7.5*y,1} // underwater
 pigment {radial frequency 2 color_map {
        [.5 rgb 0][.5 rgb 1]
 }}
 finish {ambient .5}
}

object {TestObjects translate <-15,0,50>} // far
object {TestObjects translate <-5,0,25>} // average
object {TestObjects translate <2.5,0,0>} // near


// omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

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