Proper lighting of the scene is probably the most important stage of creating 3D graphics. HDRI maps allow you to obtain natural lighting using a properly prepared image.
Photography and HDRI.
HDRI stands for high-dynamic range imaging. It is a technique in photography that allows you to achieve a greater dynamic range than in standard photography. In ordinary photography, it involves taking several photos, with different exposure values - most often by changing the shutter speed of the camera. The resulting images are combined into one, which allows you to increase the brightness of darkened parts, and reduce the over-exposed. Thanks to this you can get an effect similar to that seen by the human eye.
HDRI in 3D Lighting
In working with 3D graphics, using HDRI is a bit different. First of all, the image used must be a 360 degree panorama. Second, it can not be flattened to 8-bits. Such a file must be saved in a 32-bit version to preserve the entire spectrum of light intensity. The most popular formats for saving such files are Radiance HDR (hdr) and OpenEXR (exr).
Using the HDRI map as a scene lighting, thanks to the fact that the file is 32-bit, allows your 3d application to know which part of the map of should have stronger, and which weaker light value.
To light a scene with HDRI map, we can use both maps that show the entire panorama (full dome), as well as only its upper half (half-dome). In the second case we do not have any information about the terrain, i.e. the bottom half of the panorama. In the place where the ground is, they are simply black.
Types of HDRI Panoramas
We can divide HDRI maps based on how they are presented. We can distinguish here: cylindrical, angular, mercator, equirectangular, circular, stereographic and cubic. The most popular is equirectangular projection, commonly known as spherilac. It works on a similar principle to the most popular maps of the globe. The upper and lower parts of the image are stretched horizontally so that it looks properly when applied to the sphere.
Depending on the software, only some of these mapping methods are supported. In the case of V-Ray, this is for example: angular, cubic, spherical and mirrored ball.
Where to get HDRI maps?
There are many sites on which you can find both paid and free HDRI maps. At cgaxis.com we have a large database of maps showing different panoramas at different times of the day. They all have large resolution – over 10,000 x 5,000 px. In the latest collection of CGAxis Skies Collection III, you will find 100 HDRI maps in the daytimes from early morning to late evening. They also have a very high dynamic range, so you can get sharp shadows without using any additional lights. At free.cgaxis.com, you can also find a few in full resolution, which are available absolutely free.
How to use HDRI Map
As an example, I will use 3ds max with V-Ray as a rendering engine. To use HDRI maps as lighting you need to create a V-Ray Light and change its type to Dome. Then in the Texture you place VRayHDRI and load the map you wish. In dome Light options you can decide if you want it to be a full Spherical map (full dome), or you do not want to use it and have only its upper half. Then you can set Light Multipler and texture resolution according to what brightness and what quality you want to get.
How HDRI maps are created
There are two ways to create an HDRI map. They can be completely computer generated images or created with photos. In the second case you need the following things: DSLR Camera, tripod, panoramic head and photo stitching program. A panoramic head is necessary to reduce the effect of parallax that would be created without it. After selecting the right place and calibrating the head, you can start taking pictures. You need to shoot a few, preferably over 9, images of one frame in different EV values. Then change the position of the head and take the next pictures again. The next frame should overlap with the previous one in about 1/3 to stitch properly.
This is a time-consuming process, especially if you want the panorama to be accurate and you do not use a wide-angle lens. An additional problem may be walking people and a strong wind that changes, for example, the shape of leaves on trees or moving clouds too fast.
Once your photos are ready, you can stitch them to the panorama. If you would like to make a simple 8-bit panorama, there are many tools that you can use. But if you want to do it in 32-bit format, you need to use some special software.
The most popular applications for merging photos into 32-bit format hdr or exr format are: PTGui, Autopano Pro, Photomatix Pro.
It seems to me that I managed to encourage you to sporigate the use of HDRI maps in your work. It will allow you to significantly speed up the setup, and at the same time create a more natural global lighting.