[][src]Function cloth_bumpmap::cloth_bumpmap

pub fn cloth_bumpmap(
    width: u32,
    height: u32,
    fixed_seed: bool
) -> Option<RgbImage>

Generates a bumpmap to be used in clothify.

Based on:

  • https://fossies.org/linux/gimp/plug-ins/script-fu/scripts/clothify.scm
  • http://oldhome.schmorp.de/marc/pdb/plug_in_noisify.html
  • https://docs.gimp.org/2.10/en/gimp-filter-noise-rgb.html

Example

use cloth_bumpmap::cloth_bumpmap;
if let Some(bumpmap) = cloth_bumpmap(1000, 1000, false) {
    bumpmap.save("bumpmap.png").unwrap();
}