# displacement maps [[materials - bump maps#bump maps|Bump maps]] and Displacement maps are used to add texture to a material. Bump maps add the illusion of a texture without changing the underlying geometry while Displacement maps actually change the geometry. Think of Bump maps as laminate flooring that has a picture of wood grain and Displacement maps that have actual wood grain. Displacement maps actually affect the surface of the object instead of just appearing as textures on the surface of a material as happens with [[materials - bump maps|Bump maps]]. In Maya, you will need to change your panel rendering to shaded display (6 on keyboard) to get an approximation of what the textures will look like. Since some of the effect is computed at render time, you will have to actually render the image to see the full effect. ## more faces Displacement maps change the actual surface so you need an object with a complex enough geometry to actually see the effect. You can add faces to a mesh with subdivisions at the **polyObject** level but you will have to remember to do that before you get too complicated with your modeling. You can add more faces through **Mesh > Smoothing** but that will soften all your edges. You could put in Edge Loops prior to smoothing to help maintain hard edges. All of these are worth the effort. There is also a cool trick to only add in subdivisions at render time. Select the **Shape** node (for example polyCubeShape) and then go to **Arnold > Subdivision > Type** and set to **catclark**. Then increase iterations. This will add more faces only at render time so you will get better looking displacements. It will smooth the geometry just as you would have with Smoothing. ![[Pasted image 20221026111814.png]] ## displacement shader node You will be using the [[materials - hypershade editor|Hypershade Editor]] for setting up Displacement maps. The image below shows you the setup much better than the written directions do. ![[Pasted image 20221026104734.png]] In the Hypershade, you will create new nodes for File and for Displacement. Connect the Out Color output of the File node to the Displacement input of the **displacementShader**. Since it is a grayscale input, you may need to open up the Out Color of the File node and use Out Color R. Connect the output of the **displacementShader** to the Displacement Shader input of the final SG node. ## A few tweaks In the File Node, set to **File Attributes > Color Space** to **Utility Raw** to get a better displacement. Your Displacement may look too intense or not intense enough. In the **displacementShader** node, go to **Displacement Attributes > Scale** and adjust higher or lower as needed. You can also connect the exact same File node to the Normal Map of your material to get a double-whammy of both displacement and bump mapping. Finally, you can control the Projection of how the map is applied to your object. Just add a **projection** node between the file node and the rest of the mapping. ![[Pasted image 20221026112122.png]] ## procedural texture maps Instead of using an image for your displacement map, you can also use the procedural textures in Maya to build up complex geometry. Check out how to add [[materials - bump maps#procedural bump map|procedural textures on the bump map page]] and simply swap out for the file node. --- Learn more… - <https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Maya-LightingShading/files/GUID-9E4B4E8F-F4B7-4005-B3F0-5441E65170CF-htm.html> - <https://docs.arnoldrenderer.com/display/A5AFMUG/Displacement> - <https://youtu.be/43Ilra6fNGc> --- tags: #3d #maya #resources home: [[! 3d modeling- maya]]