Image-based lighting is a technique which illuminates a scene based on lighting information stored in an image. This image is usually a 360 degree capture of an environment, hence the name Environment Map. Environment maps are usually provided as HDRIs in different layouts and file formats, but need additional treatment to work properly in combination with a PBR Material.
Image Format
Images to be used as environment maps within Viz Engine must be 2D panorama images. The source image format should be OpenEXR, because it supports 16-bit or 32-bit float per channel, which is usually needed to properly capture the lighting conditions of a real environment. Do not use .hdr images, they are reserved for Classic usage.
Prefiltering
Prefiltering is a necessary step to prepare an imported image for rendering. It generates and extracts data necessary for both diffuse and specular lighting and stores it on the Graphic Hub within the newly generated image. If an environment map is used, that was not prefiltered before, parts of the lighting equation will be wrong and thus the whole environment lighting will behave incorrectly.
How to Prefilter an Environment Map
Right click a previously imported image in the Asset View, click Prefilter Environment Map. Use the suggested name or enter a new one and press OK. Depending on the size of the input environment map, this step may take a few seconds to complete.
An environment map, which was properly pre-filtered is labelled ENV.
Difference between Unfiltered and Filtered
PBR material parameters on the left and right are the same. Left uses a non pre-filtered image, right one uses a filtered one.
Image | Description |
---|---|
Metallic is set to 1.0, Roughness is set to 0.5 for both materials. The Left side only shows a blockier representation of the original image (mip-map), whereas the right properly changes the overall look in reaction to roughness. | |
Metallic is set to 0.0, Roughness is set to 0.0 for both materials. The Left side only shows mostly black, whereas the right properly uses the environment map for diffuse lighting. |
Acknowledgements
All Environment Maps used are available at https://hdri-haven.com.