Rory Björkman guides us through rendering a steampunk ship in mental ray for Maya and compositing the final image in Photoshop...
In this section of the tutorial, we'll be looking at how to render and finish our sci-fi airship model using mental ray and Photoshop.
Texturing sci-fi ships with MARI
Model a steampunk spaceship in Maya
Step 01: Scene setup
First let's start by opening the scene 'airship.MA', or import your own model if you'd prefer to use that. In the Windows menu, access Settings and Preferences, then open the Plug-in Manager. In here, enable the 'mayatomr.bundle'. Next, under the Display Render Settings tab, we need to enable mental ray. In this tab, under Common, scroll down to Render Options and uncheck the Enable Default Light box.
Open airship.MA or import your own model
Enabling mental ray for Maya
Step 02: Preparing the background image
When choosing a background image, it's important that our airship will fit into it compositionally. In order to create more width and landscape, we can easily widen the image in Photoshop with the Crop tool. In the assets folder you'll also find a tower. Place the tower on top of the image and flip it horizontally. By adjusting the color settings, you can off-set the colors to add more of a blue tint to it until you're happy it matches the environment of the background image. Save and close.
Preparing the background image in Photoshop
Step 03: Importing our background image
To import the background image, we first need to access the camera settings. Under the Environment tab, press Create and plug in our prepared background image. At present our image will cover the ship, so in order to offset it behind the ship, we can adjust the depth under the Placement settings. Finally, let's select the Image Plane in the viewport and assign it to a new layer. This way we can view or hide it easily.
Importing the background image we made previously
Step 04: Material overview
For this project we shall use the Mia_Material_x. To understand how this works, I have laid out a quick illustration of the parameters of this material. In the Color node we can place our Diffuse textures. In the Reflection Color we can tint the Glossiness output. It's important to note that the grayscale maps in Color will also drive the Reflection output, where black is matte and white is shiny. This is the same for the Reflectivity, where I've plugged in a black-and-white checker to demonstrate the difference. The gloss works the same way, where black will drive a noisier output to super shiny glaze. Finally we can make chromium or metallic finishes by adjusting the BRDF in a similar manner, where black with full gloss creates a perfect mirror.
An overview of mental ray's materials
Step 05: Applying materials
All of the metals on the body are applied in the same manner as above. For the normal map, open up the Bump node and plug the normal map into the Standard Bump node.
When this node opens, select Tangent Space Normals. You can preview materials in the viewport by pressing 6. Press 5 to revert back to the smooth shaded mode. Apply the main body diffuse to the Color tab and the Reflection Color tab. The specular map can then be used in both the Reflective node and the Glossiness node. Also, input the specular map to the '0 Degree Reflection'. Remember to enable the 'Alpha is Luminance' option.
Applying materials to the ship
Step 06: Applying the glass material
The glass material is different to the metal in that we do not apply a map to the BDRF. First apply your specular map to the glossiness, and leave the reflectivity at a standard. The diffuse can be plugged into the reflective color if you wish. Lastly apply our diffuse map to the color tab. As well as using the 6 key to see textures in real time, it may be a good idea to make some quick preview renders as you go, using a basic physical sky light under the Scene menu in the Render Settings Window.
Applying the glass material works slightly differently
Step 07: Lighting setup
First create a physical sun and use the scale to enlarge the sun direction arrows. Then rotate the sun direction of the shadows on the background image. Next create an image-based light sphere and import an HDR image to this. I will use the glacier.HDR supplied. The HDR intensity can also be tuned with the alpha color settings in the HDR plug-in menu, but usually the standard setting is apt.
Creating a physical sun and adjusting its direction
Creating two test spheres and applying a chrome material
Step 08: mental ray portal lights
mental ray portal lights are powered by the environment IBL we plugged in earlier. The difference is that we can now more accurately boost the IBL in certain places using the portal lights. To create a portal light, we must first create a standard area light, scale it up and point in the direction of our airship. Under the Custom Shaders menu in the area light's attributes, select the Light Shader tab and input a mia_portal_light. If you wish to increase or decrease the intensity, this can be done by manipulating the Intensity Multiplier.
Creating a standard area light
Creating a mia_portal_light
Step 09: Optional
Geometry as a light source: This is an optional method for creating a light source. I've set up a quick little scene to demonstrate. By selecting any piece of geometry and assigning a new mia_material, we can then assign a mia_light_surface node to the additional color under the Advanced tab. In order for the lit object to disperse light to surrounding geometry, we first need to bump up the fg_contribution under the Parameters tab. The higher the fg_contribution, the more the light will spread. To eliminate blotchy light gradients, open the Render Settings window and enable Final Gather. By increasing the accuracy and point interpolation, you will improve the quality but increase render times.
Creating a light source using geometry
Step 10: Optional
Spot lights: In conjunction with object lights, spot lights can be used to cheat object light direction. By setting the fg_contribution value to 0 in the object light settings. We can then place a spot light in the scene. A great way to see where your spot light is shining is to select it, and then under the Panels menu in the viewport, select 'Look Through Selected'. This way the spot light acts as a temporary camera enabling you to accurately place its path of projection.
Creating directional light using spot lights
The airship with windows being used as object light emitters and spot lights
Step 11: Final render settings
Now we are ready to render our final image. Let's first select the mentalrayIbl (IBL sphere) and turn off its primary visibility in the attribute editor. This can be found under the mentalrayIblShape1 Render Stats tab. Next make sure your background image is also turned off. In the Render Settings window, set the file type to PNG or TIF, whichever you prefer. Set the image size you desire and make sure Final Gather is enabled under the quality settings. This will be in the legacy options.
Step 12: Adding steam in Photoshop
If we bring our final render into Photoshop and place it on front of our background image, we may need to slightly tweak the import or background to fine tune blend the color. This can be done using the Color Balance under the Image > Adjustments menu. I've also supplied a steam.psd which you can use to add some life to the scene. But decreasing the exposure value and opacity of this layer we can help blend it to look more like a dark smoke in the sky.
Adding steam effects with Photoshop
Step 13 Quick iterations
It's very easy to completely change our scene because once you change the IBL image it will also drive the color from the portal lights. By rotating the IBL and the sun, we can drop an array of images behind our ship and match the lighting pretty quickly. There are also tons of free Photoshop plug-ins and free background images online to use . For free filters, many good ones can be found here and lots of beautiful background images can be found on www.textures.com. Go have fun!
Importing the background image we made previously
Pro tip: Testing on neutral materials
As for materials, it's a good idea to test your light on color-neutral objects. By inserting two spheres into our scene and applying a standard mia_material_x to one and a mia material_x preset of chrome to the other, we can get a good representation of light shadow and intensity as well as atmospheric hue. To go a step further you can even apply a flat gray to your vehicle to check for shadow lines. Import different HDR images to test the outcome.
Testing HDR lighting on neutral-colored materials
Head over to Rory's website
Check out the 3dcreative magazine back issues