Skip to content

Generating Normal Maps

Joshua Miller edited this page Jan 26, 2021 · 4 revisions

Support for generating normal-maps is built-in to PixelGraph. They can be manually "pre-baked" into the project, or automatically generated during publishing.

Using the User Interface

Normal Properties

Properties

  • Filter - One of the above normal-map filters. Default value is Sobel3.
  • Strength - The strength of the generated normals. Default value is 1.0.

Filters

  • sobel3 - This is the most commonly used filter for generating normal maps, and uses a simple Sobel3x3 filter.

  • sobel-high - A variant of the Sobel3x3 filter using high-pass filtering on the kernel to produce "single-pixel" normals. This will limit normals to only being generated for "lower" pixels.

  • sobel-low - A variant of the Sobel3x3 filter using low-pass filtering on the kernel to produce "single-pixel" normals. This will limit normals to only being generated for "higher" pixels.

  • variance - An experimental filter using a combination of down-sampling and variance-mapping to better capture both high and low frequency curves.

Manual / Command-Line Usage

The following properties can be manually specified in the Material Properties file.

normal:
  filter: sobel3
  strength: 1.0

To pre-bake the normal map, you can run the following command.

pixelgraph generate normal <options>

TODO