Show tutorials_hdri.html syntax highlighted
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3. HDRI (High dynamic range illumination)</title><link rel="stylesheet" href="megapov.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="MegaPOV Documentation"><link rel="up" href="tutorials.html" title="Chapter 4. Tutorials"><link rel="previous" href="tutorials_simulation.html" title="4.2. Simulation"><link rel="next" href="internals.html" title="Chapter 5. Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.3. HDRI (High dynamic range illumination)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tutorials_simulation.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Tutorials</th><td width="20%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorials_hdri"></a>4.3. HDRI (High dynamic range illumination)</h2></div></div><div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="hdri_tutorial"></a>4.3.1. HDRI tutorial</h3></div><div><div class="author"><h3 class="author"><span class="firstname">Christoph</span> <span class="surname">Hormann</span></h3></div></div></div><div></div></div><p>
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.
</p><p>
The scenes used for illustrating this tutorial can be found in the
MegaPOV package.
</p><p>
More detailed information on this matter can be found on
<a href="http://www.debevec.org/Research/HDR/" target="_top">http://www.debevec.org/Research/HDR/</a>
</p><p>
In a scene with strong contrasts the dynamic range cannot be represented
well with common image formats.
</p><div class="table"><a name="id2595959"></a><p class="title"><b>Table 4.1. Example for high dynamic range of raytraced scene</b></p><table summary="Example for high dynamic range of raytraced scene" border="0" style="border-collapse: collapse;"><colgroup><col><col><col></colgroup><tbody><tr><td style="" align="center"><div><img src="img/tut_hdr_1.png"></div></td><td style="" align="center"><div><img src="img/tut_hdr_2.png"></div></td><td style="" align="center"><div><img src="img/tut_hdr_3.png"></div></td></tr></tbody></table></div><p>
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 <a href="patterns.html#hdr" title="2.6.6. HDR (High Dynamic Range) image type">Section 2.6.6, “HDR (High Dynamic Range) image type”</a>.
</p><p>
<a href="img/tut_hdr_view.hdr" target="_top">tut_hdr_view.hdr</a>
</p><p>
For creating a light probe from such a scene it should be rendered using
a <tt class="function">spherical</tt> camera:
</p><p>
</p><pre class="programlisting">camera {
spherical
angle 360, 180
}</pre><p>
</p><p>
This renders an omnidirectional view of the scene that can be mapped on a sphere using
spherical mapping.
</p><div class="table"><a name="id2596073"></a><p class="title"><b>Table 4.2. Views and illumination maps from the scene</b></p><table summary="Views and illumination maps from the scene" border="0" style="border-collapse: collapse;"><colgroup><col><col><col></colgroup><tbody><tr><td style="" align="center"><span class="emphasis"><em>lighting 1</em></span></td><td style="" align="center"><span class="emphasis"><em>lighting 2</em></span></td><td class="auto-generated" style=""> </td></tr><tr><td style="" align="center"><div><img src="img/tut_hdr_view1.png"></div></td><td style="" align="center"><div><img src="img/tut_hdr_view2.png"></div></td><td class="auto-generated" style=""> </td></tr><tr><td style="" align="center"><div><img src="img/tut_hdr_env1.png"></div></td><td style="" align="center"><div><img src="img/tut_hdr_env2.png"></div></td><td class="auto-generated" style=""> </td></tr></tbody></table></div><p>
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.
</p><div class="table"><a name="id2596171"></a><p class="title"><b>Table 4.3. The illumination maps being used in a scene</b></p><table summary="The illumination maps being used in a scene" border="0" style="border-collapse: collapse;"><colgroup><col><col><col></colgroup><tbody><tr><td style="" align="center"><span class="emphasis"><em>lighting 1</em></span></td><td style="" align="center"><span class="emphasis"><em>lighting 2</em></span></td><td class="auto-generated" style=""> </td></tr><tr><td style="" align="center"><div><img src="img/tut_hdr_res1.png"></div></td><td style="" align="center"><div><img src="img/tut_hdr_res2.png"></div></td><td class="auto-generated" style=""> </td></tr></tbody></table></div><p>
In this scene the image map is applied to a large sphere around the scene:
</p><pre class="programlisting">sphere {
0,200
pigment {
image_map {
hdr "hdr_env.hdr"
once
interpolate 2
map_type 1
}
}
finish { ambient 0.8 diffuse 0 }
...
}</pre><p>
</p><p>
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.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tutorials_simulation.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="tutorials.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="internals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.2. Simulation </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Internals</td></tr></table></div></body></html>
See more files for this project here