Descriptions and Examples for the POV-Ray raytracer
by Friedrich A. Lohmüller
Deutsch
Italiano Italiano
Français français

Home
- POV-Ray Tutorial

- Realistic Skies
    - A Realistic Sky
    - Partly Cloudy Sky
    - Layers of Clouds
    - Stacked planes clouds
    - Shadow Casting
    - Massiv media clouds
    - Sunset Sky
    - Starry Skies
   > Skydomes + skymaps
    - Skyboxes + cubemaps
    - HDRI environment

    - Download
 
                                                   

How to create Realistic Skies with POV-Ray

Overview | 1 | 2 | 3 | 4 | 5 | 6 | 7.0 | 7.1 | 8 | 9 | 10

Spherical Environment Mapping
A Skydome with 360° images of clouds:

A skydome is a big hemisphere or a sphere (if we want to simulate space) with an 360° image of a sky ("skymap") mapped on the inside of this sphere or hemisphere. This can be realizised in POV-Ray with image_map and sky_sphere.

For using a 360° panoramic photo or image as a skymap in a skydome (with POV-Ray 3.6/3.7) we need to correct the gamma of the image/photo with the following macro.

// Macro for the adjustment of images
// for image_map with assumed_gamma = 1.0 ;
#macro Correct_Pigment_Gamma(Orig_Pig, New_G)
  #local Correct_Pig_fn =
      function{ pigment {Orig_Pig} }
  pigment{ average pigment_map{
   [function{ pow(Correct_Pig_fn(x,y,z).x, New_G)}
               color_map{[0 rgb 0][1 rgb<3,0,0>]}]
   [function{ pow(Correct_Pig_fn(x,y,z).y, New_G)}
               color_map{[0 rgb 0][1 rgb<0,3,0>]}]
   [function{ pow(Correct_Pig_fn(x,y,z).z, New_G)}
               color_map{[0 rgb 0][1 rgb<0,0,3>]}]
   }}
#end //
// "image_map" gamma corrected:
//    Correct_Pigment_Gamma(
//    pigment{ image_map{ jpeg "colors.jpg"}}
//    , Correct_Gamma)
//------------------------------------------------
sky_sphere{
   Correct_Pigment_Gamma( // gamma correction
     pigment{
     image_map{ jpeg "sky_map_p_04_5200x1300.jpg"
                map_type 2    //  cylindrical
                interpolate 2 //  bilinear
                once //
              } //  end of image_map
      scale<1,1.02,1> rotate<0,0.00,0>
    } // end of pigment
    , 2.2) //, New_Gamma
} // end of sky_sphere --------------------
Here you'll find Free high res skymaps by M@dcow at the Blender Artists Forums (en).
Sky_map
A 360° image cylindrically mapped on a sphere.
180° look up to the zenit
A 180° look up to the zenit of a sky.
Sample scene skymap
Sample scene with skymap mapped on the sky_sphere.
Description of this scenery for POV-Ray
Test_sky_map_p_04_5200x1300.txt or
Test_sky_map_p_04_5200x1300.pov
sky_map_p_04_700x175.jpg
A 360° panorama image for a skymap mapped on the sky_sphere in POV-Ray.
Download of this skymap in 5200x1300 pixel (1.1 MB) here: sky_map_p_04_5200x1300.jpg

Overview | 1 | 2 | 3 | 4 | 5 | 6 | 7.0 | 7.1 | 8 | 9 | 10

top

© Friedrich A. Lohmüller, 2013
homepage:www.f-lohmueller.de
 
Visitors:
(since May-1999)
Thanks for your visit!