material-maps / README.md
luca115's picture
Deploy from 3dvalley spaces/material-maps
0ca5a80 verified
|
Raw History Blame Contribute Delete
1.71 kB

A newer version of the Gradio SDK is available: 6.30.0

Upgrade
metadata
title: Material Maps - Normal, Height, Roughness from One Image
emoji: 🧱
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.1.0
python_version: '3.12'
app_file: app.py
pinned: false
models:
  - InvokeAI/pbr-material-maps
  - jingheya/lotus-normal-g-v1-1
  - openai/clip-vit-base-patch32
license: apache-2.0
short_description: PBR normal, height, roughness, metallic maps from a texture.

Material Maps - Normal, Height and Roughness from One Image

Turn one picture of a surface, a texture tile or a photo, into the maps a PBR renderer needs: a tangent-space normal map (OpenGL, or DirectX on request), a 16-bit height map, roughness and metallic. The maps come back at the picture's size, up to 1024 pixels, and a seamless picture gives seamless maps: every network pads by wrapping around the edges.

Height is not guessed from brightness. Nets trained on texture sets (the Material Map Generator ESRGAN models) read painted bricks as raised and white mortar as sunk, which a brightness-based height map gets backwards. Lotus-G, a surface-normal diffusion model, adds the broad shape of stones and bricks, and CLIP names the material to set how rough it is and whether it is metal.

API endpoint, one GPU call, about a second on the GPU:

  • /material_maps(image, directx=False) returns normal.png, height.png (16-bit), roughness.png, metallic.png and a JSON note (material, classes, roughness_level, metal, seconds).

Free on 3D Valley

Used by the texture generator and the normal map tool on 3D Valley. Built by Upsampler, which also offers AI image generation, editing, upscaling, and enhancement tools.