Displacement Mapping Methods
Independant Study about implementing and comparing different displacement methods in Unreal Engine (Version 5.3.1).
Methods
Parallax mapping
Using height value to move uv-coordinate in view direction [Kaneko, Tomomichi, et al. "Detailed shape representation with parallax mapping." Proceedings of ICAT. Vol. 2001. 2001.].
Parallax mapping with offset limiting
With parallax mapping the offset value approaches infinity as the viewing angle gets more grazing. To fix this, the offsets get limited depending on viewing angle [Welsh, Terry. "Parallax mapping with offset limiting: A per-pixel approximation of uneven surfaces." Infiscape Corporation (2004): 1-9.].
Parallax mapping with slope information
Additionally the normal can be included to better approximate the surface given by the heightmap [McGuire, Morgan, and Max McGuire. "Steep parallax mapping." I3D 2005 Poster (2005): 23-24.].
Iterative parallax mapping
Calculating the parallax mapping with slope information iteratively [Premecz, Mátyás. "Iterative parallax mapping with slope information." Central European Seminar on Computer Graphics. Vol. 1. 2006.].
There exist many different iterative methods, such as Linear search, Binary search or hybrid methods as the secant method. One characteristic is that these only use the height and normal map.
Cone stepping
Cone stepping is an iterative method that uses a pre-computed 2D cone texture that stores the cones radius to height ratio [Dummer, Jonathan. "Cone Step Mapping: An Iterative Ray-Heightfield Intersection Algorithm (2006)."].
It is one of the methods that use pre-computation. Other methods exist that use other pre-computed data structures, such as sphere tracing uses a 3D distance field, pyramidal displacement mapping uses a quadtree image pyramid.
Cone map generator
For the generation of the needed cone maps a self-written generator is included in the repository.
The Visual Studio Solution can be compiled and then used by providing file paths to height map and result name.
Optionally different scale and bias can be provided used to sample the height map.
Textures
All used textures are from Poly Haven and licensed as CC0.
aerial_rocks_04,
rocky_trail_02,
rocks_ground_01,
rocks_ground_05
Results
The various methods for displacement mapping are compared to the flat texture and the bump mapping and parallax mapping build-in in Unreal Engine.
In the main level are all eight different variants for each texture set displayed. All use the same simple mesh containing only two triangles.
These are from left to right flat texture, parallax mapping, parallax mapping with offset limiting, parallax mapping with slope information, iterative parallax mapping, cone stepping, unreal engine bump mapping and unreal engine parallax mapping.