Skip to content

Generating Occlusion Maps

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

Support for generating ambient-occlusion maps is built-in to PixelGraph. They can be manually "pre-baked" into the project, or automatically generated during publishing. Since generating occlusion maps is often very slow, it is recommended that you pre-bake all your occlusion texture rather than allow the to be generated during publishing.

Using the User Interface

Occlusion Properties

Properties

  • Quality - Controls the quality (ray-count) of the generated occlusion texture.
    • For fast, low-quality occlusion use a value around 0.04.
    • For high-quality occlusion, use values between 0.1 and 0.2.
    • Avoid using higher values as it will likely take a very long time to complete.
  • Step-Count - Defines the maximum distance each ray will travel.
  • Z-Bias - Increases the height of the ray origin by the specified value.
  • Z-Scale - Defines the vertical scale of the height texture.

Manual / Command-Line Usage

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

occlusion:
  quality: 0.08
  steps: 16
  z-bias: 0.1
  z-scale: 20

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

pixelgraph generate occlusion <options>

TODO