4.3. HDRI (High dynamic range illumination)

4.3.1. HDRI tutorial

Christoph Hormann

This part of the MegaPOV documentation should give some insight on how to use the support for high dynamic range images introduced in MegaPOV 1.1 for image based lighting.

The scenes used for illustrating this tutorial can be found in the MegaPOV package.

More detailed information on this matter can be found on http://www.debevec.org/Research/HDR/

In a scene with strong contrasts the dynamic range cannot be represented well with common image formats.

Table 4.1. Example for high dynamic range of raytraced scene

MegaPOV 1.1 can write the render result in a format suited for storing high dynamic range color information. For details on this format see Section 2.6.6, “HDR (High Dynamic Range) image type”.

tut_hdr_view.hdr

For creating a light probe from such a scene it should be rendered using a spherical camera:

camera {
  spherical
  angle 360, 180
}

This renders an omnidirectional view of the scene that can be mapped on a sphere using spherical mapping.

Table 4.2. Views and illumination maps from the scene

lighting 1lighting 2 
 
 

When this light probe is rendered it can be used in scenes as an illumination map to achieve realistic lighting in another scene without the whole content of the original scene being included and slowing down the render.

Table 4.3. The illumination maps being used in a scene

lighting 1lighting 2 
 

In this scene the image map is applied to a large sphere around the scene:

sphere {
  0,200
  pigment {
    image_map {
      hdr "hdr_env.hdr"
      once
      interpolate 2
      map_type 1
    }
  }
  finish { ambient 0.8 diffuse 0 }
  ...
}

When this light probe is rendered it can be used in scenes as an illumination map to achieve realistic lighting in another scene without the whole content of the original scene being included and slowing down the render.