Light

Baking

Baking refers to Galacean performing lighting calculations in advance and baking the results into a binary file (containing diffuse spherical harmonics parameters and pre-filtered environment maps), which are then sampled in real-time during runtime.

bake

We provide baking tools in the editor and the glTF viewer.

Editor Usage

1. Baking Switch

The editor has automatic baking enabled by default. It will automatically bake after modifying the background (color, exposure, rotation, etc.) or changing the baking resolution.

image-20240219164704802

You can also disable automatic baking and perform manual baking when needed.

image-20240219164728187

2. Baking Resolution

This indicates the resolution of the pre-filtered environment map after baking. The default resolution is 128, with the baked product being approximately 500KB; a resolution of 64 results in a baked product of about 125KB. You can choose the appropriate baking resolution based on the scene.

image-20240219164802607

3. Setting Background

Refer to the background tutorial to set the scene background. The editor will perform lighting baking based on the baking resolution and baking switch settings. Any modifications to the background (color, rotation, exposure, changing HDR maps, etc.) will depend on the baking switch to decide whether to bake automatically. If you want to set a solid color background or a transparent background but do not want to bake the solid color background, you can first turn off the automatic baking switch and then switch to the solid color background.

image-20231009114455268

glTF Viewer

We also provide a baking tool in the glTF viewer on our official website. Simply drag and drop an HDR map onto the webpage to automatically download the baked product:

Was this page helpful?