POV-Ray : Newsgroups : povray.text.scene-files : Beach Water Server Time
28 Jul 2024 18:20:09 EDT (-0400)
  Beach Water (Message 1 to 2 of 2)  
From: Kevin Wampler
Subject: Beach Water
Date: 14 Aug 1999 20:34:34
Message: <37B5A9A7.5F721257@tapestry.tucson.az.us>
//This scene needs Superpatch to render

camera {

  location  <-2, 3, -6>*4
  direction 2.0*z
  up        y
  right     4/3*x
  look_at   <0, 3,  0>
}

light_source {
  0*x
  color rgb <1,1,1>
  translate <-2000, 4000, -3000>

}

sky_sphere {
  pigment
  {
    gradient y
    color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] }
  }
}

plane {
  y, -50
  texture { pigment { color rgb <1,.9,.8> } }
}

cylinder {
  <3,-10,15> <3,5,15>, 1
  texture {
    pigment { color rgb <1,1,1> }
    normal { wrinkles .1 scale <.1,1,.1> }
    finish { specular .2 roughness .035 }
  }
}

//*************************************************Sand****************************************************

#declare Sand = function { y+.2*z+noise3d(x/10,0,z/10) }

#declare Sandtex = texture { pigment { color rgb <1,.9,.8> } }

isosurface {
  function { Sand }
  max_gradient 5
  bounded_by { box { <-1000,-11,-1000>, <1000,2,1000> } }
  texture { Sandtex }
}

//*************************************************Water***************************************************

#declare Waves = function { pigment {
  marble
  color_map {
    [ 0 rgb 0 ]
    [ 1 rgb 1 ]
  }
  scale 3
} }

#declare Water2 = function {
.2*(-y+1)*noise3d(.5*x,.5*y,.5*z)^2+.04*noise3d(2*x,2*y,(2*y+1)*z) }

#declare Water = function {
y-Waves(.1*x+.25*y,y,z)^2+.005*noise3d(1*x,1*y,3*z)-Water2(x,y,z) }

#declare Sea = texture {
  pigment { color rgbt <1,1,1,1> }
  finish { specular .5 roughness .005 reflection_type 1 }
}

#declare Foam = texture {
  pigment {
    crackle
    color_map {
      [ 0 color rgbt <1,1,1,0> ]
      [ 1 color rgbt <1,1,1,.6> ]
    }
    turbulence .5
    scale .5
  }
  normal { bumps .2 scale .1 }
  finish { specular .5 roughness .005 }
}

#declare Watertex = texture {
  function { max(0,min(1,Sand(x,y,z))) }
  texture_map {
    [ 0 Foam ]
    [ .5 Sea ]
    [ 1 Sea ]
  }
}

#declare Waterint = interior {
  ior 1.33 caustics 10
  fade_distance 3 fade_power 2
}

isosurface {
  function { Water(x,y,z) }
  max_gradient 10
  bounded_by { box { <-1000,-100,-1000>, <1000,2,1000> } }
  texture { Watertex rotate <0,-90,0> }
  interior { Waterint }
  rotate <0,90,0>
  hollow
}


Post a reply to this message

From: Kevin Wampler
Subject: Re: Beach Water
Date: 14 Aug 1999 20:38:16
Message: <37B5AA7D.FEE42AB8@tapestry.tucson.az.us>
Sorry, I probably should explain what the code is for.  This is in response to a post
asking how to make water
that interacts well with a shore or beach.  I think that the water looks pretty good,
but render time is quite
long.


Post a reply to this message

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