SHEET FORMAT // SIX WAY

Which channels hold the six lighting directions

Six-way lighting stores how bright your smoke is when lit from six directions, packed into two RGBA images. One holds right, above and behind, plus opacity, and the other holds left, below and front, plus flame brightness. A shader mixes the six by your light's direction, so the smoke relights when your sun moves.

  • 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
Smoke plume, 7.0 x 10.8 m, compiled with Spatial Compiler. Spec →

01 // HOW IT WORKS

Six directions in two textures

Six-way lighting means lighting precomputed from six directions so the smoke can be relit. The shader splits your light's direction into three parts (right or left, up or down, front or back), takes the matching channel for each part, weights it by how much the light points that way, and adds ambient light.

Six values fit in two RGBA textures with two alpha channels to spare, so the layout is common. The spare alphas usually carry opacity and an emissive or other mask.

02 // SPATIAL COMPILER

The channels in Spatial Compiler's sheets

  • main_pos.png: R lit from the right, G lit from above, B lit from behind, A opacity.
  • main_neg.png: R lit from the left, G lit from below, B lit from the front, A flame brightness.

Directions are relative to the camera that compiled the sheet, side-on by default. six_way is a default entry in export.channels. Godot 4's flipbook_6way.gdshader reads both sheets along with your scene's DirectionalLight3D and ambient light.

03 // OTHER ENGINES

Use the channels in other engines

Check the channel order your material expects against the sheet layout. export.pack can move any channel into any file when a reader expects a different order.

For a quick setup without a six-way shader, use the green channel of main_pos.png as brightness, tinted with your smoke color, and its alpha as opacity. The smoke then looks lit from above in every scene.

05 // FAQ

Six-way lighting questions

All questions →

README.SHEETS_SIX_WAY_CHANNELS
Which texture channels store the six lighting directions?

Here, R, G and B of main_pos.png hold right, above and behind, while R, G and B of main_neg.png hold left, below and front.

Why are two RGBA textures commonly used for six directional lighting?

Six directions need six channels and two RGBA textures give eight, so the two spare alphas carry opacity and flame brightness.

How are six directional lightmaps stored for VFX?

They are stored as grayscale brightness per direction, one direction per color channel, in a flipbook grid like any other sheet.

What is six directional lighting for smoke?

It is lighting precomputed from right, left, above, below, front and back so a shader can mix them for the scene light.

Compile your first effect

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

All effects, guides and explainers →