Color Space Pipeline
Sanctus Bake v1.2 introduces an Adaptive Color Space Resolution system that dynamically handles any Blender OCIO working space — detecting whether the active scene_linear role resolves to Linear (standard sRGB primaries) or ACEScg — instead of hardcoding sRGB.
This system is 100% automatic. You don't need to configure anything. But understanding how it works helps you make informed decisions about file formats and bit depth for your pipeline.
How It Works
The engine performs three automatic steps for every bake:
1. Environment Detection
At bake time, the addon queries Blender's active OCIO configuration to identify the working color space. It reads the scene_linear role — the definitive reference for the render engine's linear space:
scene_linear OCIO Role |
Detected Working Space |
|---|---|
Linear (Blender default) |
sRGB (sRGB primaries, linear transfer) |
ACEScg |
Linear Rec.709 (AP1 primaries) |
| Custom OCIO | Whatever the scene_linear role defines |
2. Per-Map-Type Color Space Assignment
Each map type is tagged with the correct color space. Since Cycles always bakes in linear working space, color maps are tagged as Linear Rec.709 regardless of the OCIO environment. The sRGB conversion is applied only at save time when using save_render().
| Map Type | Color Space (in memory) |
|---|---|
| Base Color | Linear Rec.709 |
| Emission | Linear Rec.709 |
| Metallic | Non-Color |
| Roughness | Non-Color |
| Specular | Non-Color |
| Normal | Non-Color |
| Displacement | Non-Color |
| Alpha | Non-Color |
| Ambient Occlusion | Non-Color |
| Curvature | Non-Color |
3. Bit Depth Allocation
The engine automatically selects the optimal bit depth based on map type and the chosen export format:
| Map Type | PNG / JPEG | TIFF | OpenEXR |
|---|---|---|---|
| Base Color / Emission | 8-bit integer | 16-bit integer | 32-bit float |
| Normal / Displacement | 16-bit integer | 16-bit integer | 32-bit float |
| Roughness / Metallic / AO / Curvature | 8-bit integer | 16-bit integer | 32-bit float |
Why Normal maps get 16-bit in PNG
Normal maps contain directional vector data stored as RGB. 8-bit integer quantization causes visible banding in smooth gradients. Sanctus Bake automatically locks Normal and Displacement maps to 16-bit depth when saving as PNG or JPEG to eliminate this banding entirely.
File Format Behavior
PNG / JPEG (Standard Workflow)
- Base Color / Emission: Tagged as
Linear Rec.709. 8-bit integer. The sRGB gamma encoding is applied at save time viasave_render(). - Normal / Displacement: Tagged as
Non-Color. 16-bit integer (auto-locked to prevent banding). - Roughness / Metallic / AO / Curvature / Alpha: Tagged as
Non-Color. 8-bit integer. - Performance: Fastest save times, smallest file sizes. Ideal for game engines and web delivery.
TIFF (High Quality)
- All maps tagged appropriately (Linear Rec.709 for color, Non-Color for data).
- 16-bit integer depth across all channels.
- Lossless compression. Larger files than PNG but preserves gradient fidelity.
- Good middle-ground for print production and archival.
OpenEXR (Professional / HDR Pipeline)
- All maps tagged as
Linear Rec.709(linear data). - 32-bit float buffers preserve HDR values above 1.0 and below 0.0.
- Ideal for compositing pipelines (Nuke, Fusion, After Effects).
- Larger file sizes but lossless data integrity.
EXR Codec & Depth Overrides
When using OpenEXR as your default export format, you can configure the bit depth and compression codec in the Addon Preferences. The default is 16-bit half-float with ZIP compression — an optimal balance of quality, file size, and performance.
ACEScg Detection
The engine detects ACEScg by querying Blender's OCIO configuration for the scene_linear role. If the role resolves to ACEScg (or any variant like Linear - ACEScg, ACES - ACEScg), the system switches to ACES-aware behavior:
- Color maps are tagged as
Linear Rec.709(same as standard — all in-memory images use linear space) - Data maps remain
Non-Color - Hybrid Lighting Pass skips the sRGB↔linear conversion step — in ACEScg, the data is already linear
- Float buffer allocation is used for all color maps to prevent precision loss
This means your baked textures will look identical to your procedural setup, regardless of the color management environment.
Hybrid Lighting Pass & Color Space
The Hybrid Lighting Pass performs a pixel-by-pixel multiplication of albedo × light mask. In standard sRGB environments, the engine converts the albedo to linear space, multiplies, then converts back to sRGB. In ACEScg environments, this conversion is skipped because the data is already linear — resulting in faster processing and mathematically accurate results.
Performance Considerations
| Format | File Size | Save Speed | Use Case |
|---|---|---|---|
| PNG | Smallest | Fastest | Game engines, web, real-time |
| JPEG | Smallest | Fastest | Preview, web (lossy) |
| TIFF | Medium | Medium | Print, archival |
| OpenEXR (16-bit half) | Large | Medium | Compositing, VFX |
| OpenEXR (32-bit float) | Largest | Slowest | HDR, deep compositing |
Recommendation
For most users, PNG is the best choice. Normal maps automatically get 16-bit depth, so you get excellent quality with small file sizes. Switch to OpenEXR only when you need HDR data for compositing or when working in an ACEScg pipeline.
Summary
The Adaptive Color Space Resolution system ensures that:
- All users get correct
Linear Rec.709tagging for color maps — the sRGB conversion happens only at save time viasave_render() - ACEScg pipeline users get proper Linear Rec.709 tagging, float buffer allocation, and correct linear math
- Game developers get Normal maps at 16-bit to prevent banding, with all other maps optimized for size
- VFX artists get 32-bit float EXR output with lossless compression for compositing workflows
No configuration required. Just choose your preferred export format and bake.