Assign textures and control transparency.
- [Instructor] Picking up from the last movie, I've got the Arnold Render View already open. Let's assign a new material to the leaves, and that'll be a good demonstration of opacity mapping. Let's pedestal down a little bit in the camera view with Alt and middle mouse button. Just go down a bit, and maybe back out with Alt and right mouse button. We've got the quadrilateral geometry for the leaves. It obviously needs to have some mapping of its transparency.
I've got a bitmap file ready to map the opacity. It came from the Paint effects brush that was the original source for these roses. So let's go ahead and assign a material. Select the leaves, right-click, and from the Marking menu, choose Assign New Material. From the Assign New Material dialog, choose Arnold > Shader, and click Surface, and then choose AI Standard Surface. Let's rename it in the attribute editor.
Call it leaf_aistandardsurface. Scrolling up to the top of the attributes, let's adjust the base weight. I'll bring this down a little bit actually to a value of 0.7. I don't want these leaves to upstage the flowers. We don't want any shiny highlights either, so I'll bring the specular weight down to zero. Let's assign the bitmap file to the color, click on Create Render Node, and in the Create Render Node dialog, click File.
The file node is created. We'll need to scroll to the top if necessary, and browse for the image. In the current project source images, you'll see leafSerrate.tif, and note that it's transparent against the browser window here. It's got an embedded alpha channel. Click Open, and although we have an alpha channel in the file itself, it's currently not connected to the opacity, and as you can see, we've got a funny border there.
Before we deal with the opacity, I just want to color-correct the leaves a little bit. In the Color Balance section of the file node, we can scroll down a little bit and click on Color Gain, and let's set these to give it a little bit of a tint to the leaves. We'll set the hue to 92. Press Tab. Set the saturation to 0.6, and press Tab again, and the value we'll bring down to 0.3.
And now it's a much darker and richer green. To connect the file transparency to the opacity of the material, we'll need to go into the hypershade. Click to open the hypershade. Let's graph a network for the leaf material. Right-click on leaf_aistandardsurface, and choose Graph Network. In the graph, we can zoom in with the mouse wheel, and pan around with Alt and middle mouse button. We need to connect the Out Alpha of leafSerrate.tif, the file node, to the opacity of leaf_aistandardsurface.
Let's go down to the bottom here, and you'll see an opacity section. That's an RGB input. Click on the plus sign to open that up, and you'll see Opacity R, G, and B. So let's connect the Out Alpha to each one of those three color components. Out Alpha to Opacity R, Opacity G, and Opacity B. Let's check it out in our Arnold Render View, and unfortunately we don't see anything yet.
But it's not because our shader network has a problem. This is correct. It's actually an issue with the shape node. By default, all objects are opaque in Arnold. Even if you assign a transparent material, Arnold is optimized to treat all objects as opaque and solid by default. We'll need to select the shape node for the leaves, and change that Arnold or attribute. Now close the hypershade, select the leaves, and in the attribute editor in the mesh shape node, open up the Arnold section, and you'll see right up at the top a flag labeled Opaque.
Turn that off, and now we've got our working opacity map. And that's how to map transparency in Arnold.
- Arnold rendering concepts
- Lighting with Maya and Arnold lights
- Controlling exposure
- Filtering light with Gobo
- Light attenuation with Decay
- Image-based lighting with Skydome
- Exterior daylight with Physical Sky
- Arnold Standard Surface material attributes
- Mapping material attributes
- Rendering refractions
- Mesh subdivision and displacement at render time
- Shading effects such as ambient occlusion and vertex color
- Camera effects such as fisheye and depth of field
- Animation image sequence rendering