Our thanks to Eric Keller for this tutorial. For more of his excellent work, head to bloopatone.blogspot.co.uk.
This tutorial first appeared in issue 79 of 3D Artist.
For the accompanying video tutorial, head here: https://www.youtube.com/watch?v=tkAfnbBVnhg
Creating a truly realistic macro photography render requires a physically based renderer, some knowledge of basic photography, and patience.
Octane is a GPU-based renderer that is gaining popularity because of how it balances ease of use, speed, and overall rendering power. Octane is a stand-alone rendering application that also offers additional plugins for all of the most popular 3D apps.
This tutorial goes through some techniques developed using Octane for Maya to create the macro photography renders. To use Octane you must purchase the standalone version and then also purchase the plugin.
The stand-alone application is an easy-to-use node-based system with a GUI that is reminiscent of a compositing program such as NUKE. This tutorial focuses on the Maya plugin which integrates perfectly and feels more stable than Maya’s own mental ray renderer! Both the standalone version and the plugin are very affordable, a joy to use, and produce results that can be superior to mental ray and V-Ray.
The rendered images you see in this tutorial had little to no postprocessing in Photoshop beyond slight colour and exposure adjustments. The main advantage of using the Maya plugin versus the Octane standalone is that animations can be rendered without the need to export an FBX sequence to the stand-alone version of Octane.
Octane requires a CUDA-enabled graphics card. For this tutorial we are using a PC running Windows 8.1 Pro, Maya 2015, with 64GB of RAM and two Nvidia GeForce GTX 780 Ti graphics cards.
Step 01 – Configure your render settings
This tutorial assumes that you have both Octane and the Octane Plugin for Maya installed and activated. Let’s start with loading your scene. In the Common Tab, Maya’s Render Settings window, set Render Using to OctaneRender. Choose your rendering camera and resolution – the HD 720 Preset works for this example. Switch to the Cuda Devices tab and activate your CUDA-enabled graphics card(s). In the OctaneRender Settings tab set the Kernel type to Direct Light and Max samples to 200. This is a low-quality preview setting which will keep interaction fast while you set up the scene. You’ll change these options for the final render later.
Step 02 – Set up a camera
Choose the OctaneRender tab on the Maya shelf and click on the camera icon to add an Octane camera – this is just a Maya camera with additional Octane settings. Many of these settings override standard camera options when rendering in Octane. Position your camera to look at your subject. In this example, we’re using an adorable jumping spider model created in ZBrush, perched on a flower petal. Select the camera and open the Attribute Editor. Set the Octane Camera type to Thin lens and set the Aperture to 0 so that the image is entirely in focus while you work.
Step 03 – Add a Sun/Sky node
From the Octane shelf, add an Octane Sun/Sky Environment. In the Attribute Editor for octaneSunSky you can set the Type to Texture environment as an IBL texture, or set to Day light environment to use the procedural Octane physical sun – we prefer using Texture environment. Click on the icon next to Texture to load an HDR image. Pick Octane Image Texture from the Create Render Node window. Then, use the File field to select your HDR image. Click on the texture next to Projection and add a spherical projection node. In the Attribute Editor for SphericalProjection click on Octane Full Transform. You can use this node to position and rotate your IBL image.
Step 04 – View your render
Open up the Render View window and choose Render>Snapshot>Camera 1 to set the test render camera, and now you’ll see a wireframe of your scene. Click the IPR button to start a test render. It takes a moment to compile the geometry for the scene. Then you’ll see the render appear and update. You can change lights, shaders, and the camera view and see the results. Occasionally you may need to press the IPR button to refresh the scene, this is usually when you need to move geometry or add a new object or shader. The statistics at the bottom show your progress. The render continues until the Max samples is reached. It will look grainy until you increase Max samples.
Step 05 – Load Octane Material Presets
There’s a database of user-created Octane materials accessible from within Maya. In the OctaneRender Settings tab of the Render Settings window turn on Enable LiveDB refresh (under Additional). Note: an internet connection is required. Switch to the Octane Live DB tab and click on the arrow to load the database. For the waterdrops in the scene, use the Water drops material in Organic>Liquids. Click on the Create node button to load and then select the material in Hypershade. Apply it to the geometry and press the IPR button in the Render View window to see the result.
Step 06 – Create custom materials
In Hypershade click on Octane materials. The material types here include Diffuse, Glossy, Specular and Mix. We will use Specular for transparent or translucent materials, Glossy for shiny materials, and Diffuse for dull or rough materials and light-emitting objects. Mix material combines two other materials, their respective strength is controlled using a value or a texture. We have mixed a Specular and Glossy material to create the translucent spider, and used Diffuse material applied to a polygon plane to create an area light. Add an EXR texture of a soft light box to the Diffuse material’s Emission channel to create a realistic light. Texture, Displacement and Normal maps can add a lot to the realism of the materials.
Step 07 – Apply shaders to paint effects and hair
We’ve used Paint Effects strokes to create the hair for the spider (realistic spiders must have hair!). Octane can render Paint Effects without the need to convert the strokes into polygons. You must apply an Octane material to the Transform node of the stroke. Select it and in Attribute Editor expand Octane Hair material. Using the middle mouse button, drag Octane Material from Hypershade into the field to make the connection. If you have hundreds of strokes use an MEL script to make the process faster and easier – we created a simple script for this purpose:
Paint Effects shader script
This simple MEL script can be used to apply an Octane material to a number of selected Paint Effects strokes.
//Get list of selected strokes
//Prompt user for name of Octane Material
string $button = `promptDialog – title “Select Octane Material”
“type the name of the Octane Material you want to apply to selected strokes”
– button “OK”
– button “Cancel”
– defaultButton “OK”`;
string $octMatName = `promptDialog -q`;
//Loop through list of strokes and apply named material
for ($i=0; $i<`size $selStrokes`; $i++)
//loop through selected brushes and connect octaneMaterial
connectAttr -force ($octMatName+”.outColor”) ($selStrokes[$i] + “.octMaterial”);
Step 08 – Tune render using IPR
When the materials have been applied and the camera is positioned, you can tune the look of the render using IPR. Select the camera and in the Octane imager section of the Attribute Editor use the Exposure and FStop settings to adjust exposure, allow time for the update in IPR to refresh as the image will get brighter as it renders. To simulate the colour response of real cameras, choose from the list in the Response menu. To add depth-of-field blurring raise the Aperture value and adjust the Focal Depth to set the area of focus (or activate Auto Focus).
Step 09 – Set options for final image
For the final render, switch the render kernel and increase the Max samples. The Direct Lighting kernel, which you have been using thus far, is great for previews but to get photorealistic results use either Path Trace or PMC. Path Trace is the best but takes the longest time to render. PMC is best at handling caustics. The kernels have settings to determine how light reacts with scene objects. Max samples can be set to a figure between 2,000 and 4,000, higher values will mean longer render times. The default setting of 16,000 should be lowered. Save your scene and batch render to create the final image.