Just a simple (rust) library to create a normal map from a height map.
Also includes a thin CLI wrapper.
rust
let img = image::open(input)?;
let normal_map = normal_heights::map_normals(&img);
normal_map.save(output)?;
rust
let img = image::open(input)?;
let strength = 3.14;
let normal_map = normal_heights::map_normals_with_strength(&img, strength);
normal_map.save(output)?;
For a fully executable example, see src/main.rs.
``` USAGE: normal-heights [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-s, --strength
ARGS: Input height map image file.
sh
normal-heights heightmap.png normalmap.png
See Image crate, version 0.23.7.