Normalize textures, the straight way.
May 6, 2012
Yes I know, when we are working with linear workflow and hdri environments in any 3D package, is quite tedious to keep the consistency of our textures. Sometimes they look washed, sometimes they are dark or tinted by some strange colors…
The problem usually comes because the textures are multiplied by the lighting information which comes from the hdri environments, and we need to compensate that, because we are adding information to our textures that should not be there. That’s called normalize textures.
I’m writing here a simple and quick way to fix that problem. Please let me know you thoughts.
- Create an image based lighting setup.
- Create a new plane and assign to it a new mia_material_x_passes completely white with no reflection at all.
- Do a render and configure it as linear.
- Create another mia_material_x_passes with a gamma corrected texture map and assign it to the plane.
- I’m using this simple texture map.
- If you do a render you will realize that doesn’t looks correct, thats because the texture is multiplied by the lighting.
To fix that:
- Apply again the white shader to the plane.
- Bake the lighting information.
- We have to divide the texture by the lighting to normalize the texture.
- Connect the gamma corrected texture to the input 1 of the multiply/divide node.
- Connect the baked .hdr texture to the input 2 of the multiply/divide node.
- Set the operation to divide.
- Render again and the plane should be looking as it should be.