# Cubemap

A cubemap is a texture made of six square images arranged as the faces of a cube: positive and negative X, Y, and Z. Each face covers a 90-degree field of view, so together they record the full environment around one point. The GPU samples a cubemap with a 3D direction, which makes it efficient for skyboxes, reflections, and environment lighting.

_Rendering · updated 2026-11-16_

---

## What is a Cubemap?

A **cubemap** captures an entire environment as six images. Imagine standing in the center of a cube and photographing each wall, the ceiling, and the floor with a 90-degree lens. The six square photos are the six faces of the cubemap:

- **+X / −X**: right and left
- **+Y / −Y**: top and bottom
- **+Z / −Z**: front and back

When the GPU reads a cubemap, it uses a direction instead of 2D UV coordinates. It picks the face that the direction points at and samples the matching pixel. That makes cubemaps fast for any effect that asks "what is visible in this direction?"

Cubemaps can also store mipmaps: smaller, blurrier copies of each face. Engines use them for rough reflections. A mirror-like surface samples the sharp top level, and a matte surface samples a blurred level, which is how one environment can light materials with different [roughness](/glossary/roughness-map).

## Where Cubemaps Are Used

| Use | How the cubemap is used |
|-----|-------------------------|
| [Skybox](/glossary/skybox) | Drawn behind the scene as a distant background |
| Reflection probes | Sampled along the reflection vector, so metal and glass reflect their surroundings |
| Image-based lighting | Blurred versions light [PBR](/glossary/pbr) materials; rougher surfaces sample blurrier levels |
| Point-light shadows | Six depth views store shadows in every direction from a light |

## Cubemap vs Equirectangular

| | Cubemap | Equirectangular |
|---|---------|-----------------|
| Images | Six squares | One 2:1 panorama |
| Distortion | Low, even across faces | Stretched near the poles |
| Authoring | Faces must match at the seams | Easy to paint and preview |
| GPU sampling | Native and efficient | Usually converted to a cubemap first |

## Cubemaps in Sloyd

The [Sloyd AI Skybox Generator](/skybox) produces both formats from one prompt. Each skybox is a seamless 360° equirectangular panorama with six matching cubemap faces, so the seams line up without manual stitching. Download the cubemap face images for engines that expect six textures, or choose the Blender file, the Roblox ZIP, or a web embed. For ready-made environments, the [free skyboxes library](/free-skyboxes) has downloadable examples.

## FAQ

### What is a cubemap?

A cubemap is six square images that form the inside of a cube around a point. Each image shows what you would see looking along one axis: right, left, up, down, forward, and back. Combined, they cover every direction, which is why cubemaps are used for skyboxes and reflections.

### What is the difference between a cubemap and an equirectangular map?

Both store a full 360° view. An equirectangular map is a single 2:1 image, like a world map, which is easy to author and preview but stretches the poles. A cubemap splits the view into six undistorted faces, which GPUs sample efficiently. Engines often import an equirectangular image and convert it into a cubemap.

### What are cubemaps used for in games?

The main uses are skyboxes, reflection probes that make shiny surfaces mirror their surroundings, and image-based lighting that tints a scene with the colors of its environment.

### What order are cubemap faces in?

The common order is +X, −X, +Y, −Y, +Z, −Z (right, left, top, bottom, front, back). Engines differ in which axis is up and how faces are labeled, so check the import settings of your engine when assigning the six images.

### Can I generate a cubemap with AI?

Yes. Sloyd's AI Skybox Generator creates a seamless 360° panorama from a text prompt and includes six matching cubemap faces with every skybox.

## Related terms

- https://www.sloyd.ai/glossary/skybox
- https://www.sloyd.ai/glossary/pbr
- https://www.sloyd.ai/glossary/roughness-map

---

Source: https://www.sloyd.ai/glossary/cubemap
