POV-Ray : Newsgroups : povray.general : little help setting up a scene : Re: little help setting up a scene Server Time
29 Jul 2024 00:29:47 EDT (-0400)
  Re: little help setting up a scene  
From: Le Forgeron
Date: 7 Oct 2013 15:00:34
Message: <525304d2$1@news.povray.org>
Le 07/10/2013 20:10, Travis nous fit lire :
> Hey guys,
> 
> I've used POV-ray off and on over the years but not much recently.  I'm trying
> to build a scene as a background for a game and could use a little help.
> 
> The idea is to be looking under water from an angle that shows the sky at the
> very top, the water surface changing to underwater and then the sea floor at the
> bottom.
> 
> I have this so far:
> 
> #include "colors.inc"
>   camera {
>     location  <0, 20, -100>
>     sky <0, -1, 0>
>     up <0, -1, 0>
>   }
>   background { color SkyBlue }
> 
>     plane{<0,100,10>, 0
>       texture{
>         pigment{rgb <.2,.2,.2>}
>         finish {ambient 0.15
>                 diffuse 0.55
>                 brilliance 6.0
>                 phong 0.8
>                 phong_size 120
>                 reflection 0.6}
>               }// end of texture
>         normal{
>                 bumps 0.75
>                 scale <20.5,10.5,10.5>
>                 turbulence 0.01
>               }
>      }// end of plane
> 
>   light_source { <100, 120, 40> color rgb <1, 1, 1> }
>   fog {
>     distance 400
>     color rgb<0.5, 0.7, 0.9>
>   }
> 
> That has a fairly good underwater look, I'll tweak with the distance and color
> of the fog to perfect but how can I get the fog to stay under the water surface
> and how can I get the sea floor down below?
> 

try looking at fog entry in the doc:
http://wiki.povray.org/content/Reference:Fog

you might want ground fog ( "fog { fog_type 2 "... )
fog_offset, fog_alt and up might help (with a twist of up being upside
down ? or fog_alt being large enough with a big enough offset to be kind
of constant (sort of) for depth under water (so not pushing to 1.0 at
ground level), doing calculation to have near 0 fog above the surface
(maybe not at sea-level, but at 1m above sea-level).

Short of that, create a hollow container for the water, and use a few
media... (absorption and scattering), but it will slow when compared to
fog. One side of the container is the water-air interface, and the other
side is the ground-water interface.


Post a reply to this message

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