Maya & Arnold – 6 Displacement Mapping

In the previous tutorial we applied a Normal Map in the Bump Material Channel to add roughness to the surface. In this chapter we will compare bump with displacement – another option which really distorts the surface during render time. We will end up creating a wavy water surface from a simple polygon plane with just one texture. To get started download the vector map here and copy it to your sourceimages folder. In our Maya scene we hide all objects except the aiSkydomeLight and aiBackground. As a base object we Create > Polygon Primitives > Sphere, rename it to “BumpSphere” and assign a new aiStandard material. Rename the material to “aiBump” and assign the recently downloaded “OceanShape0000.exr” with a file node in the Bump channel. This time we leave Use As > Bump since the bump file is not the blue normal map type. In the file node we need to switch the Color Space to RAW which is always required when using .exr files. With the exposure slider we can adjust the intensity of the bump effect.

IPRSphereBump
We Create another Polygon Sphere, rename it to “DisplaceSphere”and  move it beside the “BumpSphere” for comparison. Now we select the DisplaceSphere and assign a new aiStandard material. Let’s rename the material to “aiDisplace” and klick on the output connection icon.

DisplaceSphere

A SG (Shading Group) windows pops up where we assign the recently downloaded “OceanShape0000.exr” with a file node in the “Displacement mat.” slot.

DisplacementSlot

In the file node we need to switch the Color Space to RAW.

DisplacementFileRAW

In the IPR view we already can see a distortion. Notice that the object in the viewport remains undistorted. The deformation is calculated at render time which has the advantage of  faster working – and the disadvantage that the final shape cannot be seen in the viewport. Since we have the IPR that’s mostly no big deal. To have full control over collisions and intersections there is another way with deformer modifiers which we explore in a later tutorial.

IPRDisplacementUnsubdivided

Let’s select the DisplaceSphere and in the Shape tab go down to the Arnold section and change Subdivision > Type to catclark. By increasing the iterations we adjust the subdivision level which determines the level of the displacement detail. A higher number also raises the render time, so be careful here. With Displacement Attributes > Height we control the amount of distortion and by increasing the Bounds Padding we avoid that extensions of the resulting shape are cut off. Now the difference between Bump (left) and Displacement (right) is obvious.

IPRDisplacement

Now let’s turn our clay material into water. Water is transparent so we need to turn off Opaque in the Attributer Editor > Shape tab > Arnold.

Opaque

In the Material settings we completely disable Diffuse contribution, maximize Specularity and Refraction, the Specular Roughness of water is about zero. The specularity of most materials changes depending on the viewing angle. By activating the Fresnel effect and entering the IOR (index of refraction) for water we can simulate that natural effect in our scene.

WaterSettings

Probably you already have noticed that the rendering time significantly raises with the use of glossy and refractive materials. The calculation of displacement costs even more render time. You can test the difference by rendering the bump and displacement sphere separately. In my scene the bump sphere alone took 1.30 min and the other with displacement 12.20 min to render. So as a rule of thumb displacement is only recommended if you see the edges of the object and want to have them roughened / distorted. In most cases it’s fine to use bump mapping with normal maps, especially when you look onto that surface like the facade of a building.

WaterBumpDispl

Next we hide both spheres. To start with our water surface Create > Polygon Surface > Plane and adjust the size to 200×200 units. The default subdivision of 10 is fine. Then we repeat the steps we did with the displacement sphere (Arnold opaque and Subdivision settings in the Shape node). With the object selected RMB > Assign Existing Material > aiDisplace. We want to create a water surface with waves and an object among it, so bump wouldn’t work here.

WaterDispl

To easily control the size and repetition of the sea texture you can select UV > Planar > Options > Project from > Y axis and then in the emerging PolyPlanarProj tab of the Attribute Manager adjust the Image Scale or Projection Width and Height .

WaterDisplUV

To block the environment and lighting from below we duplicate the water plane, move it about 10 units below water level, apply a new aiStandard Material and change the Diffuse Color to a dark turquoise. Looks a little bit more like sea water.

WaterDisplGround

When we rotate the camera perpendicular to the surface the fresnel effect becomes more obvious. It’s like in nature, when you directly look onto the water from above you can see the ground, but the more you look towards the horizon the more reflections you see.

WaterDisplGroundTop

Most transparent materials have at least some color when we look through. So for the final rendering of this part I added some blue in the Refraction Color channel of the water material. It’s visible where the water covers the wooden block. Just for fun I copied / pasted the torus several times (to have also the history for modifying the parameter) and applied a copy of the aiDisplace material with slightly modified fresnel settings to make the water rings look more fresh (I increased the specularity). We don’t need to stick to “physical accurate” values – if it looks good then it’s fine. Of course I repeated the steps I did with the displacement sphere in the Shape node (Arnold opaque and Subdivision settings). Voilà.

WaterDisplacementTorus

The sharp water edge at the horizon can be attenuated for instance by some depth of field blur which we will explore in our next tutorial.