---
title: "What is six-way lighting? Relightable smoke explained"
description: "Six-way lighting compiles how smoke looks lit from six directions into two textures, so a shader can relight the flipbook from your scene light at runtime."
canonical: https://appliedmanifold.com/learn/six-way-lighting/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Learn](https://appliedmanifold.com/learn/)
3.  Six-way lighting

LEARN // EFFECTS

# What is six-way lighting

Six-way lighting stores how smoke looks when lit from the right, left, top, bottom, front and back, packed into the color channels of two textures. Your shader blends those six images by the direction of your scene's light, so a precomputed smoke flipbook brightens on the sunny side and darkens on the shadow side as the light moves.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [See the examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

-   Godot 4 Available
-   Unity Manual setup
-   Unreal Engine Manual setup
-   Roblox Studio Manual setup
-   three.js Available

A draft compile is from $0.05, and new accounts start with $5 of usage.

**SMOKE\_PLUMEFINAL**

![First frame of the smoke\_plume bake](/bakes/smoke_plume/poster.webp)

Smoke plume, 7.0 x 10.8 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-smoke_plume)

01 // HOW IT WORKS

## Six lightmaps in two RGBA textures

A plain smoke flipbook has its lighting painted in, so it looks wrong the moment your sun moves. Six-way lighting renders the smoke once per light direction and keeps only the brightness of each. Six grayscale images fit in the red, green and blue channels of two textures, and the two alpha channels hold opacity and one extra value.

At runtime the shader takes the light direction in the particle's own space and weights the right or left map by its sideways part, the top or bottom map by its vertical part, and the front or back map by its depth part, then adds them. Ambient light uses the same maps, so the smoke picks up a sky tint too.

02 // IN YOUR SCENE

## What changes on screen

-   Smoke from a burning building looks thick and rounded, with a bright rim toward the sun.
-   A day and night cycle relights the same plume without a second compile.
-   The cost is two texture reads per pixel instead of one, plus a few multiplies.
-   For a manual engine setup, use a material that blends the six channels by the direction of the scene light.

03 // REAL OUTPUT

## Two smoke compiles with six-way lighting

The smoke plume is a 4 s loop that leans with the wind, and the smoke column a 6 s one-shot that climbs and thins.

**SMOKE\_COLUMNFINAL**

![First frame of the smoke\_column bake](/bakes/smoke_column/poster.webp)

Smoke column, 8.2 x 9.9 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-smoke_column)

04 // SPATIAL COMPILER

## Relit smoke in Godot 4 today

Every compile stores six-way lighting by default. `main_pos.png` holds light from the right, from above and from behind in red, green and blue, with opacity in alpha. `main_neg.png` holds light from the left, from below and from the front, with flame brightness in alpha. In Godot 4 the scene your agent writes relights the smoke from your `DirectionalLight3D` and ambient light. See [the six-way channels](https://appliedmanifold.com/effects/sheets/six-way-channels/).

05 // RELATED

## Related pages

-   [Six-way channelsWhich RGBA channel holds which of the six lighting directions, how a shader mixes them, and how to use them in engines without a six-way shader.](https://appliedmanifold.com/effects/sheets/six-way-channels/)
-   [Smoke and scene lighting Godot 4Light smoke particles in Godot 4 with a lit material, Backlight and normal maps, or six-way sheets that follow the sun.](https://appliedmanifold.com/guides/godot-smoke-scene-lighting/)
-   [Smoke that is not flat Godot 4Diagnose why smoke particles look like flat cards in Godot 4 and fix each cause with Proximity Fade, randomness and lighting.](https://appliedmanifold.com/guides/godot-smoke-not-flat/)
-   [Godot smoke Godot 4Smoke that loops as a leaning plume or rises once after a blast, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-smoke/)
-   [Lit smoke in Unity UnityLight flipbook smoke in Unity with a URP lit particle material and a precomputed lighting channel chosen to match your sun.](https://appliedmanifold.com/guides/unity-smoke-lighting/)
-   [Flipbook textureA flipbook texture packs an animation's frames into one grid image that your engine plays cell by cell on a quad.](https://appliedmanifold.com/learn/flipbook-texture/)
-   [OutputsWith the default export, each view writes four sheets, `<view>_pos.png`, `_neg.png`, `_colour.png` and `_aux.png`, plus `layout.json`, two still previews, the animated `preview_anim.png` and `bake_report.json`. Sheets are 8 x 8 tiles of 256 px by default.](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All pages in Learn →](https://appliedmanifold.com/learn/)

[← Texture atlas](https://appliedmanifold.com/learn/texture-atlas/)[Flipbook motion vectors →](https://appliedmanifold.com/learn/flipbook-motion-vectors/)

06 // FAQ

## Six-way lighting questions

[All questions →](https://appliedmanifold.com/faq/)

**README.SIX\_WAY\_LIGHTING**

### How does six way lighting improve flipbook smoke?

It lets precomputed smoke react to scene lights by blending lit and shadow sides as the sun moves, making flat quads look volumetric.

### How should transparency be stored in a six way lightmap?

Store straight opacity in the alpha channel of one texture, such as the alpha channel of main\_pos.png in Spatial Compiler outputs.

### Why are two RGBA textures commonly used for six way lighting?

Six grayscale lightmaps need six color channels, so two RGBA textures provide those six channels plus two alpha channels for opacity and extra data.

### Which texture channels store the six lighting directions?

Right, top and back usually sit in the RGB channels of one texture, while left, bottom and front sit in the second, like main\_pos.png and main\_neg.png.

### Does Unity support six way lighting?

Yes, a custom or shader graph material in Unity can blend the six smoke channels using the scene light direction.

## Compile your first effect

You pay per compile and see the price before it runs. New accounts start with $5 of usage.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Outputs →](https://appliedmanifold.com/docs/pyrofx/outputs/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
