POV-Ray : Newsgroups : povray.general : little help setting up a scene Server Time
28 Dec 2024 23:38:33 EST (-0500)
  little help setting up a scene (Message 1 to 6 of 6)  
From: Travis
Subject: little help setting up a scene
Date: 7 Oct 2013 14:15:00
Message: <web.5252f8cf15378e21a5846360@news.povray.org>
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?

Thanks for the help!


Post a reply to this message

From: Le Forgeron
Subject: Re: little help setting up a scene
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

From: Alain
Subject: Re: little help setting up a scene
Date: 7 Oct 2013 21:10:08
Message: <52535b70$1@news.povray.org>

> 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?
>
> Thanks for the help!
>
>
>

Just a little hint:
A fog don't exist inside any non-hollow object.

Maybe if the AIR above the water was effectively inside some object...

In this case, the camera would need to be encased in some opening in 
that object if it's situated above the water.

As for the sea floor, you can use an hight_field of an isosurface.


Alain


Post a reply to this message

From: Travis
Subject: Re: little help setting up a scene
Date: 8 Oct 2013 00:40:01
Message: <web.52538bda18f47b6a5846360@news.povray.org>
Thanks for the pointer about fog, I may be able to make the "sky" be the inside
of a cube or something. I'll look in to that.


Post a reply to this message

From: Travis
Subject: Re: little help setting up a scene
Date: 8 Oct 2013 00:40:01
Message: <web.52538c1318f47b6a5846360@news.povray.org>
Thanks for the Ground Fog idea, I hadn't even heard of that.  When I first
started this scene it was all upside down anyway, I can always flip it.
Thanks!


Post a reply to this message

From: Le Forgeron
Subject: Re: little help setting up a scene
Date: 8 Oct 2013 03:41:23
Message: <5253b723$1@news.povray.org>
Le 08/10/2013 06:36, Travis a écrit :
> Thanks for the pointer about fog, I may be able to make the "sky" be the inside
> of a cube or something. I'll look in to that.
> 
> 
the "sky" might simply be inside a plane (yes, plane have interior)

-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

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