Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
Stereo Images and Stereo Animations with POV-Ray
Deutsch Deutsch
Italiano Italiano
Français français

Home
- POV-Ray Tutorial

  Stereo Images and
  Stereo Animations
    Index

    Cross-Eye View
    Stereo Image simple
    Stereo Image advanced
 > Combining Image Pairs
    Stereo Animations 1
    Stereo Animations 2
    Examples Stereo Ani
 
                                                 
Combining Image Pairs to Stereo Images

Combining stereo image pairs can be made by using image_map with an orthographic camera.
   Assuming we have a pair of stereo images:
Right eye view: Stereo_Image_1.jpg
Left eye view:   Stereo_Image_2.jpg

Note: In the following POV-Ray scene there is
no light_source! The only visible things in scene
are the images, both with 'finish{ ambient 1 }'.

The following example works with POV-Ray 3.7,
for POV-Ray 3.6.2, we have to add a gamma
correction of the input images by a macro.
For more details see the attached scene file.

If the images have the size 240 x 240 pixels,
we need now the following command line:
   With POV-Ray 3.7 and jpeg output:
+w480 +h240 +fj100 .
   With POV-Ray 3.6.2 we have to use:
+w480 +h240 and we need to replace
   the extentions ".jpg" by ".bmp"
   and the image type 'jpeg' by 'sys',
   in the image_maps below
//--------------------------------
camera{
 orthographic
 location <0, 0.5,-8.18>
 right x*image_width/image_height
 angle 14
 look_at  <0, 0.5, 0.00>
} //------------------------------
box{ <0,0,0>,< 1, 1, 0.01>
     texture{
       pigment{
         image_map{
       jpeg "Stereo_Image_1.jpg"
         map_type 0
         interpolate 2
         once
         } // end of image_map
       } //  end of pigment
       finish{ ambient 1 }
    } // end of texture
    translate<-1,0,0>
} // end of box //----------------
//--------------------------------
box{ <0,0,0>,< 1, 1, 0.01>
     texture{
       pigment{
         image_map{
       jpeg "Stereo_Image_2.jpg"
         map_type 0
         interpolate 2
         once
         } // end of image_map
       } //  end of pigment
       finish{ ambient 1 }
    } // end of texture
    translate< 0,0,0>
} // end of box //----------------

image for image_map
Stereo_Image_1.jpg: right eye view.
non-stereo image
Stereo_Image_2.jpg: left eye view.

stereo image for cross-eye view
The combined stereo image for cross-eye view.

command line
The command line.

POV-Ray 3.7 scene file:
Stereo_Image_Combine_.pov
POV-Ray 3.6 scene file:
Stereo_Image_Combine_36.pov

We have to put this POV-Ray file in the directory of our images
- otherwise we need to add the full path names
to the image names in scene file text.
top

© Friedrich A. Lohmüller, 2013
www.f-lohmueller.de