Physical scale, tone and slope
These are optional. Leave them alone until you need them.
Physical scale
By default the normal strength is a look, not a measurement. If you know the real size of the surface, PBrokkR can compute the true slopes.
| Parameter | Meaning |
|---|---|
tile_size_m | How many metres one repeat of the texture covers |
height_range_m | The height difference, in metres, between black and white |
With both set, the normal map shows the real steepness of that surface, and the values are written in the manifest so an engine or a shader can use the same numbers for displacement.
pbrokkr-cli generate foam.png -p foam_mat --set tile_size_m=4 --set height_range_m=0.12 -o out\foamTone map
tone_enabled writes <prefix>_Tone.png: a grey map of brightness variation that a shader multiplies into a flat colour, so a surface with one colour still shows its relief and grain. It mixes three things, each with a weight:
| Parameter | What it adds |
|---|---|
tone_height_weight | The shading of the height itself |
tone_band_weight | Clump-sized variation of the source image |
tone_grain_weight | The fine grain of the source image |
Slope map
slope_enabled writes <prefix>_Slope.png: the slope of the height in X (red) and Y (green), signed, in 16 bits. A shader can read the slope directly instead of sampling the height several times.
slope_scaleis the slope that maps to the ends of the range.0picks it automatically and writes the value used in the manifest.slope_pack_heightalso writes<prefix>_SlopeHeight.png, with the slope in R and G and the height in B and A.
Two-channel packing
pack_channels = rg writes a packed texture with only R and G, for the BC5 format: two channels at high quality.
Float heights (EXR)
height_format can be exr_float or exr_half instead of PNG. The Godot profile uses it, and it suits displacement in renderers that read float images.