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.
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.
Where Cubemaps Are Used
| Use | How the cubemap is used |
|---|---|
| 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 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 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 has downloadable examples.
