Using Physical Sun and Sky with HDR reflections

In Flying car I wanted to make good aerial shot with bright sun and nice HDR reflections of clouds on my vehicle. So I needed to combine Physical Sun and Sky with IBL lighting
If you try to turn on both ‘Image based lighting’ and ‘Physical sun and sky’ – you won’t get nice result, because IBL shape blocks Final Gather rays from your sky. We need to create shader that will be seen in reflections and let Final Gather rays pass through it.
Lets have a look at my initial render.

First render

Fig. 1 First render

 

It looks not so bad for beginning, but let’s improve it.
First – create sphere and reverse it’s normals. Also don’t forget to switch Backface Culling on.

Fig. 02 Create Environment sphere

Fig. 02 Create Environment sphere

 

Set Render Stats for sphere. We don’t need to Catch Shadows, Receive shadows and Double Sided. You can also switch-off Primary Visibility.

Fig. 03 Render stats for environment sphere

Fig. 03 Render stats for environment sphere

 

Assign new Lambert material for sphere. Actually it can be any material, we need only it’s shading group. Open Hypershade, select Lambert, we just created, and press Graph>Input and output connections.

Fig. 04 Create lambert shader

Fig. 04 Create lambert shader

 

And now lets start to build our shading network. First we need to create mip_rayswitch node.
mip_rayswitch is a mental ray production node that allows to use different shaders accordingly  to type of rays.
To add this node execute MEL command:
createNode mip_ rayswitch;

New node will appear in Hypergraph work area.

Fig. 05 Create mip_raysdwitch node

Fig. 05 Create mip_raysdwitch node

 

Double click on lambert Shading group to open it in Attribute editor. Connect mip_ rayswitch to Material Shader.
To do that with MMB drag mip_ rayswitch node from Hypershade into Shading Group opened in Attribute Editor.

Fig. 06 Use mip_rayswitch as material shader

Fig. 06 Use mip_rayswitch as material shader

 

Let’s have a look at mip_rayswitch.

Fig. 07 mip_rayswitch node options

Fig. 07 mip_rayswitch node options

 

It has different fields for every type of rays.
We will need Eye, Reflection and Finalgather. Eye and Reflection will be used for texture. Also we need to make sphere surface to pass Final Gather rays through it. Mental ray has mib_continue shader for this case.
mib_continue – is a simple shader that takes incoming rays and continue them through surface.
To create mib_continue type MEL command:
createNode mib_continue;
Connect it to mip_rayswitch Finalgather input.

Fig. 08 Connect mib_continue to mip_rayswitch

Fig. 08 Connect mib_continue to mip_rayswitch

 

Now create File texture and select image. Connect File to mip_rayswitch Eye and Reflection inputs.

Fig. 09 Add reflection texture

Fig. 09 Add reflection texture

Quick render.

Fig. 10 Draft render

Fig. 10 Draft render

 

We got some reflections, but they are too dark. I think multiply node will help.
Add multiplyDivide node between file node and mip_rayswitch:

Fig. 11 multiplyDivide node added

Fig. 11 multiplyDivide node added

 

I tried few multiply factor and saw 6.0 is pretty good.

Fig. 12 Final render

Fig. 12 Final render

 

Now I’ll open it in Photoshop and add some clouds.

Fig. 13 Final render with background

Fig. 13 Final render with background

Post Written by

0 Comments

Leave A Reply


*