-
Notifications
You must be signed in to change notification settings - Fork 124
ExamplesImagesIrradianceMap
Ben Toogood edited this page Jun 13, 2013
·
2 revisions
This example uses !ImageConvolveOp to build an irradiance environment map from a given environment map image. It convolves image channels using Spherical Harmonics with any given number of bands. Using 3 bands you get diffuse irradiance environment maps. Using more bands you get sharper maps ( for specular convolution ).
Based on "An efficient representation for irradiance environment maps." by Ramamoorthi, Ravi and Hanrahan, Pat - 2001.
The code below requires changing the the input and output images files.
import IECore
convolve = IECore.ImageConvolveOp()
envMap = IECore.Reader.create( "/myPath/inputImage.exr" )()
irradianceMap = convolve( input = envMap, bands = 3, samples = 100000 )
IECore.Writer.create( irradianceMap, "/myPath/outputImage.exr" )()
- Introduction
- General Functionality
- Data Handling
- Parameters and Ops
- Point Primitives
- Mesh Primitives
- Image Primitives
- Procedurals
- Cortex & Python
- Cortex & Maya
- Cortex & Houdini