Wiki

Clone wiki

arnold_shaders / assExport_physical_sky

Physical Sky

Amaan Akram's aaPhysicalSky shader can be used within the options block as a background and atmosphere shader. To use it with the Maya to Arnold exporter you should group a Maya directional light and an ambient light together, so that the group transformation applies to both nodes (that will determine the sun direction):

Using a distant light source and a physical sky node within one group

The assShader attribute is used to link the Arnold specific nodes aiDistantLight and aiAaphysicalsky to the Maya nodes. Here is how you create this attribute on both Maya nodes. Select one of the nodes and run following MEL commands:

addAttr -longName assShader -usedAsColor -attributeType float3;
addAttr -longName assShaderR -attributeType "float" -parent assShader;
addAttr -longName assShaderG -attributeType "float" -parent assShader;
addAttr -longName assShaderB -attributeType "float" -parent assShader;

The exporter knows how to calculate the sun direction and will add the physical sky node to the options (like this):

...
options
{
...
 background "PhysicalSky"
 atmosphere "PhysicalSky"
...
}
...
aaPhysicalSky
{
 name PhysicalSky
...
 sun_dir_x -0.878258288
 sun_dir_y 0.285021126
 sun_dir_z 0.383960098
...
}

Here is an example scene using the physical sky. You can see the sun and how the color changes (closer to the ground). There is a horizon line where both the sky and the ground color is calculated by the physical sky shader, and there is a disk with a ground material which catches the shadow cast by the simple room/building.

Example scene using the physical sky

Updated