shadow_matte shader applied to floor plane. Roll over image to view backplate only.
This tutorial will cover how to light, shade, and render a car model using an exterior HDRI and backplate image. It will show you how to light the car model using an Arnold skydome_light. It covers how to realistically shade the car model using the car_paint and standard_surface shaders. We will also use the shadow_matte shader to composite the car model onto a photographic backplate.
A scene file (minus the car model) can be downloaded here.
Importing the CAD Data
Maya does not support .SLDPRT and .SLDASM files. You could download the trial version of 3ds Max and then export them as something Maya can open such as .stp. Alternatively, you could try opening the file 01-AVENTADOR LP700.STEP. Be warned, however, that it will open as a heavy NURBS data set.
- Create a floor plane large enough to capture the shadow from the car model.
- Assign the shadow_matte shader to it. This will 'catch' shadows from lighting within the scene and will be used to integrate the car model onto the photographic background backplate.
Now we want to bring the photographic backplate into MtoA.
- Select the render camera and under 'Environment', create a new image plane, and open BACKPLATE-L-_NIK2854.TIF in Filename.
BACKPLATE-L-_NIK2854.TIF -> RenderCam -> Image Plane
To light the scene we will connect the HDRI to the skydome_light -> color.
- Create an image shader in the Hypershade window and open DA-STR-MB1-HDR-B-4K-SPEED+96.exr in Image Name.
- Drag the image shader onto skydome_light -> color.
- Rotate the skydome_light so that it matches the direction of the lighting in the backplate (around 90 degrees).
- You may have to increase the exposure of the skydome_light 1 or 2 stops (depending on the HDRI).
- Increase the number of light samples to 3 (Rendering tab of skydome_light).
If you are not sure how the lighting should look, add a sphere to the scene, assign a standard_surface shader to it, and increase the metalness to 1. This will give you a chrome sphere with which to match the reflections to the backplate. You could also create another sphere with a dull gray shader to also match the lighting.
DA-STR-MB1-HDR-B-4K-SPEED+96.exr -> skydome_light -> Color/Intensity -> Texture
- Apply a standard_surface shader to the car model. This 'chalk preview' style render will give us a better indicator of how the lighting is affecting the scene.
- Render the scene. You should get something like the image below.
Offscreen Color (shadow_matte)
If we look closer we can see that something is not quite right with the reflection of the floor plane in the reflective sphere. There may be areas visible in the specular reflections which are outside of the background plate; so-called offscreen areas. The shadow_matte.offscreen_color parameter defines the color used for these offscreen areas; you can link a texture for instance.
- Connect the HDR image to the offscreen_color.
Offscreen Color found under Arnold attributes of image plane. shadow_matte.background is set to background_color.
Once you are happy with the lighting and environment it is time to move onto shading the car. For the purpose of this tutorial, we will focus on car paint. The other car materials (windscreen glass, rims, plastic, etc) can be downloaded in the link at the top of the page.
Two-Tone Metallic Car Paint
Now let's create a two-tone car_paint shader and apply it to the car body geometry.
Two-tone car_paint. Base_color: blue, specular_color: purple. Roll over image to view just base_color: blue (with default settings).
- Open the Hypershade window and create a car_paint shader.
- Select the car body and apply the car_paint to it.
Change the following parameters:
- Change the base_color to a dark blue color.
- Change the specular_color to a purple color. This is the color the specular reflection will be modulated with. This color will 'tint' the specular highlight from the base coat layer.
- Increase the specular_roughness to around 0.5. This controls the glossiness of the specular reflections from the base coat layer. The lower the value, the sharper the reflection.
- Increasing the specular_IOR value will give the paint a more reflective quality. In this example, a value of 10 was used.
Two-tone car_paint attribute settings
Now let's move onto shading the headlights.
When rendering glass and metals (and diffuse surfaces), it is very important that the normals of the geometry face in the right direction, otherwise you may get incorrect results when rendered. This can be an issue when importing models from other CAD applications where the normal direction of surfaces can become inverted.
Scenes with many specular surfaces (such as headlights) require a higher specular_ray_depth value to look correct. specular_ray_depth defines the maximum number of times a ray can be specularly reflected.
specular_ray_depth: 6. Roll over image specular_ray_depth: 2 (default).
- Select the headlight glass geometry (01-HEADLIGHTS-1-surface14) and assign a standard_surface shader to it. Rename it 'headlight_glass'.
- Increase the transmission_weight to 1.
Black Plastic Surround
- Select the black plastic surround geometry (01-HEADLIGHTS-1-solid43) and assign a standard_surface shader to it. Rename it 'headlight_plastic'.
- Change the base_color to black. Increase the coat_weight to around 0.1.
Metallic Light Fitting
The piece of glass in front of the light bulb (01-HEADLIGHTS-1-surface12) is single-sided geometry. Thin_walled is ideal for thin (single-sided) objects, like bubbles for example.
- Create another standard_surface shader and rename it to 'light_glass'.
- Increase the transmission_weight to 1 and enable thin_walled (under geometry).
It is recommended that thin_walled only be used with thin objects (single-sided geometry) as objects with thickness may render incorrectly.
- Assign a standard_surface shader to the reflective metallic object (01-HEADLIGHTS-1-solid42) behind the glass.
- Increase metalness to 1.
That's it. You have reached the end of the tutorial. Well done! We encourage you to spend some more time with the MtoA user guide where you can find other tutorials such as this.