Premium apps

Height Grid to Material Maps

Turn numeric height samples into normal, roughness, cavity and ORM maps.

More options

Try an example: A raised rounded tile · A matte diagonal ramp with green flipped

More about this tool

How it works

Author a rectangular height field from 0–1 samples, interpolate it into a texture, and generate seven PNG maps with explicit normal convention and editable roughness, cavity and metallic settings. Download a map ZIP and exact Renderloom material project.

  • The grid has 2–64 equal-width rows and columns of 0–1 values. Bilinear interpolation creates a square RGBA8 source at 16–512 px. All computations and PNG exports are deterministic.
  • Tangent normals normalize (−dx × strength, +dy × strength, 1), using central differences and periodic neighbors. Image Y points down; default output is +Y tangent space. Green may be flipped for a −Y convention. Normal maps are data textures.
  • Roughness = clamp(base + (0.5 − height) × variation). Cavity = clamp(1 − max(0, periodic neighborhood mean − height) × strength × 4). This is a short-range cavity approximation, not ray-traced occlusion. Metallic is a uniform manually chosen value. ORM packs cavity in R, roughness in G and metallic in B.
  • Optional symmetric edge feathering averages opposite edges in a blend band. It removes boundary color jumps, but does not guarantee matching derivatives or hide repeated motifs. Review all maps in the target application.

Roughness and cavity are authored heuristics. Metallic is a manual uniform value. This does not recover measured physical materials or create a glTF model.

Sources

Part of Renderloom

Turn height samples into reusable material maps

Author tangent normals, roughness, cavity and packed ORM textures from a numeric height grid.

What it is for

Height Grid to Material Maps turns small numeric surface studies into reusable texture files. Enter a rectangular grid of heights between zero and one, choose output size and normal strength, then download seven PNG maps and an editable Renderloom material project.

This is useful for raised tiles, simple embossed signs, ramps, decorative panels and teaching normal-map orientation. The browser Texture Lab can also start with local photographs or its own procedural samples. The tool uses original algorithms inspired by Materialize's image-to-material workflow. It does not execute Materialize or copy its code or assets.

Worked example

Start with the default five-by-five grid. The center height is one, its immediate neighbors are lower, and the outer corners are 0.15. Keep a 128-pixel square output, normal strength eight, base roughness 0.65 and cavity strength 0.65.

Calculate the result. The summary reads "Seven material maps are ready at 128 × 128 pixels." The diagnostics report heights from 0.149 to 0.996 with a mean of 0.580, no clipped or transparent pixels, and an opposite-edge jump of 0% before and after feathering, because the outer rows and columns of this grid already match. The height PNG shows the interpolated raised surface. The normal PNG describes its slopes as tangent-space RGB. Roughness varies slightly with height, while the metallic map stays black because the uniform metallic value is zero.

Download the material ZIP to keep the seven maps together with the source and recipe. Open the project in Renderloom Texture Lab, select the light preview and move its light-direction control. Change normal strength, compare the normal map, then undo the change. The light preview helps inspect orientation; it is an illustrative surface preview.

How to read the result

Grid values are bilinearly interpolated and quantized into an eight-bit PNG source. Central differences use periodic neighboring pixels. The default tangent normal points along negative horizontal height slope, positive image-vertical slope and positive Z, then is normalized. The green-flip option creates the alternate negative-Y convention.

Roughness is an authored estimate: base roughness plus half minus height, multiplied by the variation setting, with the result limited to zero through one. Cavity darkens pixels that lie below their local periodic neighborhood average. It is a short-range approximation rather than ray-traced ambient occlusion.

ORM packs cavity into red, roughness into green and the manually specified metallic value into blue. Keep these maps as data textures in the destination renderer. Base color is a display sRGB image. Check the destination's normal convention and channel packing before connecting maps.

Tips and common mistakes

Use two to sixty-four equal-width rows and columns. Commas, semicolons or spaces separate values; newlines separate rows. The output size ranges from sixteen to 512 pixels per side.

A flat grid produces neutral normals and no cavity detail. Increasing normal strength changes slope shading, not actual geometry. Height-based roughness is a creative choice; a bright patch in a photograph may be painted color rather than a raised surface.

Optional edge feathering removes opposite-edge color jumps. Inspect the repeated preview because matching outer pixels can still leave visible slope changes and repeated motifs.

FAQ

Does this recover a physically correct material?

No. Height, roughness and cavity are editable heuristics. Metallic is a manual uniform value rather than an inferred metal mask. Evaluate the exported maps on the intended model.

Does the project preserve its input?

Yes. It embeds the exact PNG source and every processing setting. The source stays separate from the generated maps, so changing settings does not repeatedly process an already filtered output.

Can an agent create these maps?

Yes. Use JSON API tool renderloom-height-material or MCP tool renderloom_height_material. Both return deterministic PNG artifacts, a ZIP, a schema-defined project and an app link when the encoded project fits the link budget.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://renderloomheightmaterial.usefulweb.app/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://renderloomheightmaterial.usefulweb.app/mcp · tool name renderloom_height_material
Example request
curl -s -X POST https://renderloomheightmaterial.usefulweb.app/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{}'
Feedback · ideas & bug reports welcome