From the course: Maya: Advanced Materials

Deforming a surface with displacement - Maya Tutorial

From the course: Maya: Advanced Materials

Start my 1-month free trial

Deforming a surface with displacement

- [Instructor] Bump and normal mapping only give the illusion of surface relief. It's a trick of the renderer. To actually deform a surface using a texture, use a displacement map. I've got the Hypershade open displaying the graph of the dancer standard surface. Arnold RenderView is also open and running in interactive production rendering mode. I'll make a snapshot of the undisplaced surface. Displacement in Maya is handled through the shading group. The shading group is of course a node at the end of the material tree, and it's what connects materials to objects and lights. We can see that our dancers standard surface material out color is connected to these surface shader input of this shading group node. To displace an object, connect something to the displacement shader input of the shading group, and that's a special node called displacement shader. Let's search for it. Click in the Hypershade graph, press the tab key, and type in disp and click displacementShader. It comes with its own shading group. We don't need that. We want to connect the displacement shader output to the displacement shader input of the shading group of our object. And we can select that new shading group node that got created and delete it. Now we'll connect something to the displacement input. Let's create a volume noise texture. Once again, click in the graph, press the tab key, and type in volum, and click volumeNoise. It's created with a texture placement node. Let's select them both with the slash key on the keyboard. Move that over and navigate in the graph with alt and middle mouse. Take the Out Alpha of the volumeNoise, and connect it to the displacement input of the displacementShader. And we see something quite strange over here in our Arnold RenderView. We need to change up some attributes. Select that volumeNoise node, and open its attributes with ctrl + a. And scroll down. In the Color Balance section, enable Alpha is Luminance. And now we see a highly detailed surface. But there's too much displacement, so it's kind of creating a chaotic situation. Go into the displacementShader attributes, and set the scale to a value of 0.2. With an appropriate level of displacement, we can art direct the displacement texture. Go back to the volumeNoise, and in its primary Volume Noise Attribute, set the noise type to Perlin, and set the frequency to two. And now we've got a more reasonable result in the Arnold RenderView, so we can go back over there and create another snapshot. Here's an undisplaced model and a displaced model. Click on that snapshot again to go back to a live rendering. Every renderer will deal with displacement differently. Currently, of course, we're using Arnold. We don't have time to go into all of the options for displacement mapping in Arnold, but I covered that in another course, which is Maya Rendering with Arnold 6, and it talks about subdivision displacement, among other things. In this course, I just want to discuss one of the Arnold options, which is Autobump. As the name indicates, Autobump applies an automatic bump map to a displaced surface. It does that in order to resolve surface details that are smaller than a polygon. So we could subdivide the surface and create more polygons, or we could apply an Autobump. And Autobump is the default behavior. Let's see the effect of disabling Autobump. Select the object in the scene. And in the Attribute Editor in its mesh shape node, open up the Arnold section. You want to scroll down into Displacement Attributes, and open up Autobump. Now, there's actually a bug in this version of Arnold, and that is even though Enable Autobump is globally disabled by default, Camera primary is enabled by default. And this is kind of very strange. If any one of these is enabled, it's actually going to override the global setting. In your version of Arnold that might not be the case. But here in order to disable Autobump, I actually have to turn it on, turn Camera primary off. And now we see the effect with no Autobump. It's only displaced the geometry. So we see the triangular structure of that scanned geometry. Okay, we do want to have the Autobump enabled, so I'll turn Camera primary back on again. That's the basics of displacement mapping in Maya.

Contents