# Parallax layers

Make a side-scrolling game background as separate layers, far to near: an opaque back layer that repeats left to right, and front layers with transparent backgrounds, all in one art style. The same page covers 360° panoramas for skies and VR.

## Step by step

1. In the studio, choose **Image**, then the model **Parallax layers**.
2. Describe the place and the time of day in the box, for example `overgrown jungle ruins at golden hour`.
3. Under **More options**, set **layers**, far to near, separated by commas: `sky and distant mountains, ruined temple towers and large trees, ferns vines and rocks`. Use commas only between layers, not inside one. Leave it empty to use three good default layers.
4. Pick the **Aspect** (16:9, 21:9 or 2:1) and press **Generate**.

## Example

|  |  |
| --- | --- |
| Scene | `overgrown jungle ruins at golden hour` |
| Layers | `sky and distant mountains, ruined temple towers and large trees, ferns vines and rocks` |
| Aspect | 16:9 |
| You get | `layer_0.png` (the sky and mountains, opaque and seamless left to right), `layer_1.png` and `layer_2.png` (towers and trees, then ferns, with transparent backgrounds), and `preview_stack.png` (all of them stacked, to check the look) |

## How it works

Every layer is generated from the same scene and style, with seeds next to each other, so the layers belong together. The first layer is made seamless horizontally (**seamless x**, on by default). Every later layer is generated on a plain background and cut out, so only its objects remain.

## In your engine

- Put `layer_0` furthest back and scroll it slowest; each later layer scrolls faster. A common start is 0.2, 0.5 and 0.8 of the camera's speed.
- `layer_0` repeats by itself. The front layers are not made seamless (that would fill their transparent gaps): place and repeat their pieces where you want them.
- Check the edges of cut-out layers against a dark and a light colour; ask for **Cut out** again on a single layer if a fringe remains.

## 360° panoramas

For a sky box or a VR backdrop, choose **360° panorama** and describe the place, for example `alien desert at dusk, two moons, distant mesas`. You get `00_equirect.png` (an equirectangular picture whose left and right edges meet) and, with **upscale** on (the default), `00_equirect_x4.png` at 7168 × 3584. Use it as an equirectangular sky texture in Unity, Unreal, Godot or Blender. The very top and bottom (the poles) are not corrected: keep the sky and the ground simple there, or hide them with fog.

## Tips

- Describe each layer as a silhouette with its distance: "distant", "large", "close". Layers that describe the same objects blur together.
- Low contrast and haze in the far layer make the depth read.
- Keep the scene line short and put the style in it: `pixel art`, `watercolour`, `painterly`.

Canonical: https://illusion.hibira.io/guides/parallax-layers
