Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Creating displacement maps

From: Creating Textures and Shaders in Maya

Video: Creating displacement maps

In this movie I'm going to show you how to add a little more detail to the texture in the tires here for this car. As you can see, I have applied a file texture to create a decal for the side of the tire, and also a little bit of the tread. But it's not looking entirely realistic right now, mainly because the tread is not actually pushing out of the surface. So it doesn't look like these tires are going to get a whole lot of traction. So there are several ways that you can fix this problem. One is to actually model the tread into the surface.

Creating displacement maps

In this movie I'm going to show you how to add a little more detail to the texture in the tires here for this car. As you can see, I have applied a file texture to create a decal for the side of the tire, and also a little bit of the tread. But it's not looking entirely realistic right now, mainly because the tread is not actually pushing out of the surface. So it doesn't look like these tires are going to get a whole lot of traction. So there are several ways that you can fix this problem. One is to actually model the tread into the surface.

That is very time consuming. Also, you're going to have to add an awful lot of geometry to the surface in order to create a nice looking tread but it is one option that you can use. Another option will be to use a bump texture, a grayscale picture to sort of bump out the tread surface. The only problem with that is that a bump texture makes the surface appear as though it's bumpy, but it doesn't actually change the geometry. So if you apply a bump texture, let's take a look at what that would look like.

So I'm going to select the tire surface, and scroll down here to the Bump section. I'm going to connect the bump to the Standard Bump channel with the tireShader. So I'll click on the checker icon. Pull up the File. I'll set the Bump Depth to 0.250. In the file node, and we are going to set the Filter Type to off, and click on Image Name. I'm going to select tread_bump. So you can see the tread_bump texture has a light color for the treads.

So this is going to push the tread out, and a light color, very dim color for the decal, just to add a little bit of bump to the decal. So I'm going to choose Ope and that will hook up the Bump texture. I'm just going to select in this region around the front tire, and do a test render. So you can see that we have a little bit of tread going here. But the problem with using a bump texture is since it doesn't actually deform the surface. As this surface starts to curve away, we can see that the tread is still actually flat. It's not actually being bumped out.

It just looks as though it's been bumped out on the parts of the surface that face the camera because you have this little specular highlight and a little bit of shadow in there. So it's a good for faking some amounts of detail. It's usually bump maps are best for faking like high frequency detail, like if you wanted to make little sort of a grainy quality to the surface of the tire. But they're not really good for things like treads, since they don't actually deform the geometry. So in this case, what I want to use is a displacement map. The displacement map is a grayscale texture, just like a bump texture.

So it's another type of texture map that wear light values, push the surface out, and dark values pushed the surface in. The difference is that a displacement map actually deforms the surface of the geometry. So when it pushes the geometry out, it changes the way the geometry appears in the render so that you're actually pushing out. It tends to make a much more realistic looking deformation in the render. So let's see how we can hook up a displacement map. I'll choose Window > Rendering Editors > Hypershade to open up Hypershade Editor.

I'll select the tire. You can see it's selected here. I'm going to right-click in the work area of the Hypershade and choose Graph Materials on Selected Objects. Here is our shader network. So we have the tireShader, which is a mia_material, and a bump connection to the tireShader, and also the file node connected to the Color channel of the mia_material. So that's fine. We can leave that the way it is. So if you want to connect a displacement map, what you're actually going to do is you don't connect the displacement texture to the tireShader itself; you connect to the displacement shader to the Shading Group.

This is the node that is between the tireShader and the actual geometry. It has a number of slots that you can use for creating specialized texture maps such as Displacement. So I'm going to select the mia_material_x_passes2SG node. This is the Shading Group node. Let's say we rename that. I'll just call it tireShaderSG to make my life a little bit easier. Then under Displacement material at the very top, under Shading Group Attributes, I'm going to click on the checkerboard icon,. Pull up the Create Render Node.

Again, I'll just select File. This brings up the displacementShader node in the Attribute Editor, which I don't actually have to do anything to this node. I'll just click on the arrow next to Displacement. That will switch me over to the File node that's now hooked up to the Displacement node. I'll click on the folder next to Image Name. I have a file in here called tread_displacement. You can see in the preview that the tread_ displacement looks a lot like the bump texture. We have light values pushing out the tread, and just a little bit for the logo, and the other details in the tire, but just enough. I'll choose Open.

I want to set Filter Type to off. Now before I do a render, I want to point out one thing. I'm using the TIFF file format, which is a personal habit of mine. I use TIFF for a lot of pictures. But mental ray does not always play nicely with the TIFF format. So what it prefers is a format called the .map format. There is a way to have Maya automatically convert all your textures into this .map format, saving your bit of work.

To activate this, go to Windows > Settings/Preferences > Preferences, and under the Categories, click on Rendering, and turn on, under mental ray Preferences, turn on Use optimized textures (auto-conversion) and turn this on. You can choose use Assigned textures only, or All textures. That's up to you. I'll just put it to All textures. I'll click on the Update optimized cache textures now button. Now what this does is this actually creates a separate folder called cache with all the converted file textures.

So if I look in my project directory in the sourceimages folder, there is a folder called cache here. This has basically converted all of my textures in the scene to the .map format. This is a much friendlier format for mental ray. It prefers this because TIFF can often crash mental ray. So it's good to get in the habit of turning on that option in the Preferences. I almost always have it on. Now that I have that set up, let's do a test render.

I'm just going to render this region again. Let's store the current image. Let's see how it looks. Okay, so here is our rendered region. It took a while to render, and we check it out. You can see that there are a couple of problems here. This is normal. The Displacement Map is doing exactly what it's supposed to do. It's displacing the geometry, so you can see that the tread is definitely being pushed out from the tire and same with the logo. The only problem is its being pushed out an awful lot. So we need to adjust this displacement map so that it renders something a little bit more reasonable.

It's fairly easy to do. I just need to go into the file node for the displacement map, scroll down to the Color Balance section and what I need to do is adjust the Alpha Gain. So the Alpha Gain is, kind of, like the volume knob for the displacement map. Now what it actually does is the displacement texture, if you look in the Hypershade, is connected. The file texture is connected to the displacement node using the outAlpha. So the Alpha Gain is a volume knob for this outAlpha connection.

So right now, it's set to 1. Let's pull this down a lot. Let's try 0.1 and render the region again. So this is what we get with a value 0.1. It's a little bit extreme. Now we're in the realm of monster truck tires. So I want to cut that in half again to 0.05. I'm guessing that's going to do the job. There we go. Here is nice displaced tire tread. Now as you, no doubt noticed, displacements maps do take a long time to render.

So you must use them with caution, and use them sparingly, because they will add a lot to render times, because the geometries is actually being displaced. So be careful how you use them. As a general rule, I like to use displacement map for a very large surface changes. Things like this tread, or the logo. Then, I'll combine that by also adding a bump map into the shading network to create more high frequency detail like little tiny bumps on the surface of the tire. But that's the basic workflow for displacement maps. I'll do a final render of the entire car so we can see both tires displaced.

Okay, there is our final render of the car with the displaced tires. You can see we have a nice start going here for creating some really cool effects and some realistic detail. The challenge of course is to continue working with the shading network, and see how much more realism you can get into it by combining things like file textures, and other aspects of the mia_ shader network.

Show transcript

This video is part of

Image for Creating Textures and Shaders in Maya
Creating Textures and Shaders in Maya

37 video lessons · 7988 viewers

Eric Keller
Author

 
Expand all | Collapse all
  1. 2m 19s
    1. Welcome
      1m 6s
    2. Using the exercise files
      1m 13s
  2. 17m 49s
    1. Explaining diffuse reflections
      2m 39s
    2. Defining glossy and blurred reflections
      2m 32s
    3. Looking at refraction
      4m 20s
    4. Describing the Fresnel effect
      1m 56s
    5. Understanding anisotropy
      1m 10s
    6. Identifying ambient and reflection occlusion
      1m 49s
    7. Defining sub-surface scattering
      2m 4s
    8. Simulating translucency
      1m 19s
  3. 1h 8m
    1. Using Maya's standard shaders with mental ray
      7m 2s
    2. Comparing mental ray and Maya shader nodes
      9m 12s
    3. Creating mental ray shaders
      2m 32s
    4. Making sense of mental ray shaders
      10m 35s
    5. Introducing the mia_material
      9m 16s
    6. Creating a custom mia_material preset
      9m 17s
    7. Looking at car paint materials
      6m 43s
    8. Using subsurface scattering shaders
      13m 33s
  4. 1h 5m
    1. Understanding UV coordinates
      4m 26s
    2. Comparing NURBS and polygon UVs
      4m 48s
    3. Mapping polygon UV surfaces
      13m 1s
    4. Using texture maps for color and other shader channels
      8m 1s
    5. Applying and projecting 2D procedural texture nodes
      4m 0s
    6. Applying 3D procedural texture nodes
      7m 1s
    7. Using ramp textures
      8m 12s
    8. Setting up utility nodes
      6m 29s
    9. Using file texture nodes
      9m 41s
  5. 22m 36s
    1. Applying the turbulence texture
      9m 37s
    2. Considering the round corners texture
      4m 17s
    3. Improving skin detail with ambient occlusion
      4m 27s
    4. Applying reflection occlusion
      4m 15s
  6. 33m 6s
    1. Painting bump maps
      4m 14s
    2. Creating normal maps
      5m 24s
    3. Applying normal maps
      6m 17s
    4. Creating displacement maps
      9m 14s
    5. Troubleshooting displacement maps
      7m 57s
  7. 33s
    1. Goodbye
      33s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Creating Textures and Shaders in Maya.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.