Sometimes lighting the scene from HDRI image only is not enough. We get blueish shade and shadows are not that crispy we would like to have.
In other rendering engines we can add mr Physical Sky to environment, to get more sharp light:
As you know using HDRI image together with mr Physical Sky in iRay wasn't possible.
Well, until now...
In this tutorial I'll show smart workaround to make it possible.
The solution is based on my first article: Unrealistic Sun and Sky with iRay and mr Physical Sky, so if you want to understand this method - just read it ;)
In mental ray this was rather simple - just setting custom bitmap as background in mr Physical Sky settings.
But it doesn't work in iRay.
So the idea is to make environment map as MIX of HDRI and mr Physical Sky.
1. First, we have to proper set-up the environment
Here is material setting how to do it:
As you can see on images, mix mask is mr Physical Sky, but with very low Output and removed saturation.
IMPORTANT NOTE: Multiplier and Output settings highly depends on the value of the exposure, and the position of sun (time of day), so you have to work it out "experimental" in order to fit your lighting setup.
2. Second step is to match the mr Sun position with the HDRI.
So, after creating Compass with Daylight System we have to manually setup location of Sun.
First, make sure that all offsets of HDRI is set to 0, then setup viewport background to show environment, with HDRI image as background.
By using orbit tool set the view to show HDRI sun in the center of view:
Enabling option "Exposure affects background" and changing the exposure will help you to see exact positin of sun.
Remember to revert exposure to your original settings after aligning to achieve correct results during rendering.
Select Daylight, and set Sun Position to Manual. Then move the sun to match its position with sun from HDRI.
Remember that sun position on your screen may be different than in final environment, because sun in environment is "infinitelly" far away.
To make sure everything fits correctly you can change environment background to mr Physical Sky:
Now - the tricky part: We want to link the HDRI with Daylight/Compass rotation.
This method is explained by Peter Guthrie on his blog.
Then enter this equation in right window below: radToDeg(Z_Rotation/360)
Select the direction arrow (as on image) and press Connect.
If everything went OK, rotating Compass along Z axis will rotate HDRI background image too, maintaing mr Sky and HDRI sky match.
Now you can play with sun power, shadow sharpness and sun colour.
For example from this:
You can get warmer sun colour:
So, Have Fun!!