In this tutorial we will cover how to convert a scene that has been setup for use with the mental ray renderer to MtoA. We will cover how to use the Standard Surface shader to create realistic materials such as glass and metal. We will also replace the existing scene's lighting with the Skydome light in combination with a HDR image to give us more control and a more realistic look. Lastly, we will add some jet thrust to the exhausts using a combination of spot lights and Atmosphere Volume.
The original Maya scene files for this series of tutorials can be downloaded from Autodesk's Hyperspace Madness production.
This tutorial will cover the following topics:
Import the spaceship model into the scene. It contains various Blinn and Phong shaders. We want to convert these shaders to more physically accurate shaders within MtoA. Fortunately, we can use the shader Type menu in the Attribute Editor window to convert them. We will largely be using the multi-purpose Ai Standard Surface shader.
- Start by converting the spaceship's Body Blinn shader to a Standard Surface shader. Connect the map (ship_body_diffuse.tga) Base Color and Bump map connection (ship_body_normal.tga) . to the
- You will also need to connect the Specular and Emission Color maps.
- Connect the file roughness map (ship_body_roughness.tga) to the Specular Roughness attribute of the Ai Standard Surface shader. You can use the Maya RemapValue utility node in the scene to remap the Specular Roughness value.
The incandescent file map (ship_wings_emissive.tga) Emission Color of the Ai Standard Surface shader. Increase the Emission Scale to 1.should be connected to the
Emission: 0 Emission: 1
We will assign a glass material to the cockpit glass. In this scene, the glass has been modeled without thickness. This will render incorrectly because glass has thickness in the real world and Arnold is a physically accurate renderer. Select the glass objects and extrude them slightly.
Left: Thin surface: Glass refracts improperly as a solid object. Right: Extruded glass: Cockpit refracts properly through the glass. Rollover images.
Ensure that the normals are facing in the right direction. This is essential when rendering realistic glass.
Normals pointing in the correct direction (outwards)
- As with all non-opaque geometry in MtoA, you should disable 'Opaque' in the Arnold attributes for the geometry.
Assign a Standard Surface shader to the cockpit glass and rename it to glass. Reduce the Base Weight to 0 reduce the Specular Roughness to 0.
More information about Specular Fresnel can be found here.
Increase the Transmission Weight to 1 so that the glass is fully transparent. Change the IOR (Index of Refraction) to that of glass (1.5). If you want to add a tint color to the glass, change the Transmission Color to a light color.
More information about rendering glass surfaces can be found here.
When you render the cockpit glass, you may notice that the glass (also a refractive material) appears black. This is because MtoA only traces two refractive rays by default.
Refraction Ray Depth: 2 (default) Refraction Ray Depth: 4
Ai Skydome Light
- Create an Ai Skydome light and connect a HDR image to its Color attribute. In this case we have used an HDR image from this site.
- When you are happy with the lighting and are ready for final rendering, increase the number of Samples to 3 in the Ai Skydome light to reduce any shadow noise. Otherwise keep it at 1 when test rendering with the IPR.
We will use a Maya spot light to represent the jet's thrust emitting from the exhaust.
- Create a spot light and position it so that it is pointing out of the thruster as in the image below.
Spotlight positioned inside exhaust
- Increase the Exposure of the spot light to around 15.
- Enable Color Temperature and change the Temperature to around 3500. This will give the light a warmish hue.
To visualize the thrust effect we must first enable Atmosphere Volume.
- Go to the Environment tab of the Render Settings. Connect a Atmosphere Volume to the Atmosphere attribute.
- You will not see any result if you render the scene. That is because the Density is 0 by default. Increase it to 1 and IPR render the scene. z
- By default, the start of the spot light's cone is too narrow. We can increase this by using the Lens Radius attribute under the Arnold tab of the spot light. Increase it to around 100.
Lens Radius: 0 Lens Radius: 100
Light Decay Filter
The exhaust thrust appears too long. We can limit the distance of light from the spot light by using an Ai Light Decay filter.
- Under the Light Filters tab, add an Ai Light Decay filter to the spot light.
- Enable Use Far Attenuation and increase the Far End to around 600.
Left: Ai Light Decay filter added to spot light. Right: Use Far Attenuation enabled
You can see the effect that adding a Light Decay filter has on the attenuation of the spot light in the images below:
Far End: 0 Far End:600
Open up Sampling in the Render Settings Window. For test rendering Camera (AA) samples at 3 is fine. However, for final frame rendering you will want to increase it to at least 5.
A simple guide to sampling can be found here.
When rendering scenes with MtoA it is a good idea to get familiar with the Arnold Log in the Diagnostics tab of the Render Settings window. This log file will show you any warnings and statistics which will help you diagnose your scene file.
A guide on how to read a render log can be found here.
Thats it. Congratulations, you have successfully converted a scene from mental ray to MtoA! Now go out there and explore new worlds of rendering!