The_KnightShift › Free tools

Skybox converter: panorama to cubemap, and back

Turn one 360 degree equirectangular image into six cube faces already named for Unity's Skybox/6 Sided slots, make the mirrored copy that Unity's Skybox/Panoramic shader expects, or stitch six faces back into a panorama. Everything runs in your browser; your images never leave your computer.

Need a sky to convert? The free Skybox Sampler has six finished skies as 2048 x 1024 panoramas, with the six-face sets and the Unity panoramas already made. The paid packs (Space, Stylized Sky, Alien Worlds) ship every sky in all three forms at 4K.

Download the free sampler How the conversion works

1. Panorama to six cube faces

Drop a 2:1 equirectangular image (PNG or JPG; 4096 x 2048 is a typical size). You get six square faces. With Unity names each file is named after the Skybox/6 Sided slot it goes into (Front, Back, Left, Right, Up, Down). With axis names the files are px, nx, py, ny, pz, nz in the OpenGL cubemap layout, which is what most other engines and tools expect.

Drop a panorama here, or
No image loaded.

2. Panorama for Unity's Skybox/Panoramic shader

Unity's Skybox/Panoramic shader reads a latitude-longitude image mirrored compared with Godot, Blender and most HDRI viewers, and with its seam a quarter turn away: a panorama that is right in Godot shows the sun on the wrong side in Unity and does not line up with the same sky's six-face set. This makes the copy that does line up. Use the same panorama as above (it is reused if you have loaded one).

Drop a panorama here, or
No image loaded.

3. Six cube faces to a panorama

Drop six square images at once. Names containing front, back, left, right, up, down (Unity slots) or px, nx, py, ny, pz, nz (axis names) are matched automatically; fix any slot by hand below. The output is a 2:1 panorama in the standard layout (Godot's PanoramaSkyMaterial, Blender, HDRI viewers), with the Front face at the centre of the image.

Drop six faces here, or
No faces loaded.

How the conversion works

A skybox is a function of the view direction. An equirectangular panorama stores that function as a 2:1 image where the horizontal axis is the compass heading (longitude) and the vertical axis is the angle from straight up (latitude). A cubemap stores the same function as six square images, each the view through one face of a cube centred on the camera. Converting between them means, for every pixel of the output, working out which 3D direction it shows and reading the colour of that direction from the input. This page does exactly that, with bilinear filtering, in JavaScript on your own machine.

Conventions used here

FaceWorld directionUnity 6 Sided slotAxis name
Front+ZFrontpz
Back-ZBacknz
Left slot+XLeftpx
Right slot-XRightnx
Up+YUppy
Down-YDownny

Unity's manual defines the six slots by world axis, and its Left slot is the +X face, which sits to the right of a default camera. The files made here are named after the slot they go into, so put each file into the slot with the same name and the sky is upright with no swapped sides. The six images are "inside view" faces in the OpenGL cubemap layout: the bottom edge of Up meets the top edge of Front, as on an unfolded cross. The centre of the panorama becomes the Front face.

These are the same conventions our own packs use, and they were checked in Unity 6: faces line up with no seams, the horizon is level and the sky is upright. If your source panorama has a different "front" (the sun where you do not want it), rotate the panorama first by rolling it horizontally; a quarter of the image width is a 90 degree turn.

Import settings that avoid seams

Privacy and limits

No upload happens: the files are read by your browser and never sent anywhere. Very large images (8K panoramas, 4K faces) may be slow or fail in the browser; for batch work, our packs' pipeline does the same conversion offline. The output is 8-bit PNG, so an HDR source loses its range; convert HDR files in your engine or in Blender instead.

Skip the conversion. Every sky in our packs comes as a 4K panorama, a six-face set named for Unity, a mirrored panorama for Skybox/Panoramic and a Godot 4 addon with ready Environments. The free sampler has two skies from each pack. Royalty-free, no attribution required.

Free sampler Space Skyboxes Stylized Sky Alien Worlds