What is displacement mapping?

Displacement mapping is a technique used in computer graphics to add details to the surface of a 3D model. While other mapping methods, such as bump mapping and normal mapping, only affect the lighting, displacement mapping modifies the actual shape by displacing the surface vertices along their normal. 

It allows for creating complex shapes and details, like wrinkles on the skin or scales on the lizard, by casting shadows which look realistic from every angle.

How it works

A displacement map is a texture that stores the height information of the 3D model.

The map is a grayscale image where lighter values represent larger displacement and darker values represent smaller displacement.

The displacement values are then used to push the vertices along the normal vectors of the 3D models, thus effectively changing the shape.

In displacement mapping,

  • Every vertex on the surface of the 3D model is displaced along its normal vectorA vector which is perpendicular to the surface at any given point. (nn) by an amount that is determined by the value (dd) from the displacement map.

  • The displacement is then applied to the original position (pp) of each surface point.

The mathematical expression is as follows.

Where,

  • pp' is the new position of the surface point after displacement

  • pp is the original position of the surface point

  • d(p)d(p) is the displacement value obtained from the displacement map for the given surface point

  • nn is the normal vector at the surface point

Note: The formula signifies that the new position of each point pp is calculated by adding the product of the displacement value and the normal vector to the original position.

Wireframe of displacement over a plane
1 of 2

Applications

Given below are some of the applications of displacement mapping.

  • Realistic textures: Displacement mapping can be used to create realistic textures such as fur, skin, cloth or rough surfaces like rocks and terrain.

  • High-frequency details: It is useful for adding detailed 3D features, such as wrinkles, scales, bumps, or crevices, that would be difficult to achieve using traditional modeling techniques.

  • Film industry: Displacement mapping is widely used in the film industry to enhance the characters and environments, adding realistic details to make them visually appealing.

  • Video games: Displacement mapping is increasingly used in video games to enhance the level of detail in the characters, game objects, and environments, providing more immersive user experiences.

  • Avoiding geometry overload: It allows artists to avoid excessive polygonal modeling, which could lead to performance issues in image rendering and increase the complexity of the 3D model.

  • Efficient resource usage: By relying on texture (or displacement) data for the surface details, displacement mapping optimizes resource utilization and streamlines image rendering. It results in faster and more efficient rendering of high-detailed surfaces.

Continue reading


Copyright ©2024 Educative, Inc. All rights reserved