POV-Ray : Newsgroups : povray.general : Help:how to build underwater images : Re: Help:how to build underwater images Server Time
5 May 2024 05:05:05 EDT (-0400)
  Re: Help:how to build underwater images  
From: Alain
Date: 24 Mar 2016 14:11:32
Message: <56f42dd4@news.povray.org>

> Hi,
>
> A freshman.I would like to build some underwater images with several objects and
> it seems that there is water in the images.Where can I get some simple examples?
> Thanks!
>
>

Water seriously limit how far yopu can se things. With that in mind, the 
following features, and how to use them, will come handy:

Colour fading. This will make the colour of what you see fade toward 
some value. It's an attribute of the interior of objects.
To use it you need to encase your scene into a large object with a hole 
at the camera location:
difference{
box{-10000, 10000 pigment{rgbt 1}interior{fade_colour<0.1, 0.3, 
0.8>fade_distance 100 fade_power 1001}
hollow // this allow the use of fog and media
}
sphere{Camera_location 0.1 pigment{rgbt 1}}
}
This render fast but don't show any caustics of rays of light.


You can fill your scene with scattering media:

box{-10000, 10000 pigment{rgbt 1}
interior{
media{
  scattering{2, <0.1, 0.3, 0.8>
  }
}
sphere{Camera_location 0.1 pigment{rgbt 1}}
hollow // required to allow media to exist
}

Using media is slower.
Scattering medis will make lights visible.
To get beleiveable results, you need to use fading lights as follow:
light_source{
	Location, rgb Light_colour*1000
	fade_power 2 fade_distance 0.1
}

The light's intensity must be large as it fades rapidly with the 
distance. If the light is not bright enough, increase the intensity. The 
fade_distance need to be short to beheave realisticaly and fade_power 2 
is the only physicaly accurate value that you can use.
If you want to use the area_light feature, you can set fade_distance to 
the dimention of the area_light or to zero and use area_illumination.

Colour fading and media are compatible and can be used at the same time 
in the same area.

Finaly, you can use fog.
fog is a fast and dirty approximation of scattering media that never 
interact with the lights.
I don't recomend using fog except as a "place holder" for the media 
while devloping your scene.


Post a reply to this message

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