# Height Grid to Material Maps > Turn numeric height samples into normal, roughness, cavity and ORM maps. 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. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://renderloomheightmaterial.usefulweb.site/ (interactive tool at https://renderloomheightmaterial.usefulweb.site/tool) - JSON API: POST https://renderloomheightmaterial.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://renderloomheightmaterial.usefulweb.site/api/v1/tool) - OpenAPI: https://renderloomheightmaterial.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://renderloomheightmaterial.usefulweb.site/mcp - tool `renderloom_height_material` ## Inputs - grid (textarea): Height grid (0–1, rows separated by newlines) - size (integer): Square map size (px) - normalStrength (number): Normal strength - flipGreen (boolean): Flip normal green channel - roughness (number): Base roughness - variation (number): Height-driven roughness variation - cavityStrength (number): Cavity strength - cavityRadius (integer): Cavity neighborhood radius (px) - metalness (number): Uniform metallic value - seamBlend (number): Edge feather fraction ## Method - 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. ## Limits - Roughness and cavity are authored heuristics. Metallic is a manual uniform value. This does not recover measured physical materials or create a glTF model.