Docs

Guides

Use MF_ReliefPOM in your own material

Add parallax relief to your own material graph with the MF_ReliefPOM function in five steps.

For your own master materials, use the function instead of M_ReliefPOM_Master.

  1. Add MF_ReliefPOM (Content/ReliefPOM/Functions). Connect your height map as a Texture Object to Height and your tiled UV to UV (unconnected = TexCoord 0).
  2. Connect the controls you want (HeightScale_cm, Quality, FadeStart_m, FadeEnd_m, SelfShadow = 1 for the self-shadow, and so on; same meanings as Master material parameters). Unconnected inputs use the defaults. The function does not read MPC_ReliefPOM by itself: to follow the global switches of Global quality and Blueprint control, add Collection Parameter nodes and multiply Enable by GlobalEnable, HeightScale_cm by DepthScale, SelfShadow by ShadowEnable and FadeStart_m / FadeEnd_m by FadeScale, and connect QualityScale to the QualityScale input.
  3. Sample every texture of the surface (colour, normal, ORM) with the function's UV output, set each Texture Sample's Mip Value Mode to Derivative and connect UV_DDX to DDX(UVs) and UV_DDY to DDY(UVs).
  4. Multiply the base colour by the Shadow output (1 = lit) and by lerp(1, Occlusion, 0.75) (the cavity term), and lerp your normal map toward HeightNormal by Flank (then normalize) so steep sides take the height field's normal. Optional: Height for height blends, Fade for anything that should fade out with the relief.
  5. If you rotate the texture with TileRotation (radians), pass the sampled normal through MF_ReliefPOM_UnrotateNormal with the same rotation before it reaches the Normal pin.
The wiring of MF_ReliefPOM in your own material (diagram).
Output Meaning
UV Parallaxed UV. Sample every texture of the surface with it.
UV_DDX, UV_DDY UV gradients for Derivative mip mode. Using them (not the parallaxed UV's own derivatives) avoids mip seams at the relief's steep edges.
Height Height at the parallaxed UV (0..1).
Shadow Self-shadow, 1 = lit (1 when SelfShadow = 0).
Fade Relief strength after the distance fade (0..1).
Offset Parallaxed UV minus the input UV.
HeightNormal The height field's normal at the hit, tangent space of the tile frame (like a normal map).
Flank 0..1 mask of steep, stretched sides: lerp the normal map toward HeightNormal by it.
Occlusion Cavity term from the traced height, 1 = open.

Inputs beyond Master material parameters: TileRotation (radians) and TileOffset (UV offset added after the rotation) for rotated or offset tiles, QualityScale (multiplies the step counts), Dither, FlankShading, StepPixels (Custom quality) and Detail (1 = flank normal and cavity on; connect a constant 0, or a static switch, to compile them out). Tested wired into a third-party style material with its own tiled and rotated texture coordinates and its own texture samples (Platforms and compatibility). The function works inside Nanite materials: all texture reads use explicit gradients, and the direction of the UV in the world comes from screen derivatives, so it needs no tangent basis and no tile size. All reads use the shared wrap sampler, so the function uses none of the material's 16 sampler slots. MF_ReliefPOM_HexTiling takes the four textures as Texture Objects and returns blended BaseColor, Normal, ORM, Height and Shadow; M_ReliefPOM_Master shows both wired. MF_ReliefPOM_HexTiling and MF_ReliefPOM_Landscape4 also have a Flank output: the 0..1 steep-flank mask (where flank shading and the side texture apply), the same mask as MF_ReliefPOM's.