Panorama to Cubemap Converter - Equirectangular to 6-Face Cube Map
Convert equirectangular panorama images to 6 cubemap faces online. Bilinear interpolation, adjustable resolution, PNG/JPEG export. Free, client-side.
Drop equirectangular panorama here or click to browse
Supports JPEG, PNG, WebP. Recommended: 2:1 aspect ratio.
Processing...
About
Equirectangular panoramas encode a full 360ยฐ ร 180ยฐ spherical view into a single 2:1 aspect-ratio image. Game engines, VR runtimes, and real-time renderers require this data repackaged as six square cubemap faces - one per axis direction. The conversion demands a per-pixel inverse projection: for every output texel on a cube face, compute its 3D direction vector, convert to spherical coordinates ฮธ and ฯ, then sample the source panorama with bilinear interpolation to avoid blocky artifacts. Getting the face orientations or coordinate conventions wrong produces seam misalignment that is immediately visible at cube edges. This tool performs the full projection client-side with no upload to any server.
Output resolution is independent of input size. A 4096ร2048 panorama can produce 1024ร1024 faces or 4096ร4096 faces - the latter simply samples more densely and interpolates. Note: source images below approximately 2048 pixels wide will produce visibly soft cubemaps at high face resolutions because the angular density of the source is insufficient. Pro tip: always verify your panorama is truly equirectangular (pole-stretched, 2:1 ratio) - cylindrical or fisheye projections will produce warped output.
Formulas
For each pixel (x, y) on a cube face of size N, normalize to the range [โ1, +1]:
Construct direction vector d = (dx, dy, dz) based on face orientation, then convert to spherical coordinates:
Map to equirectangular pixel coordinates in source image of width W and height H:
Bilinear interpolation samples the four nearest pixels at fractional coordinates to produce a smooth output texel. Where ฮธ = azimuthal angle (longitude), ฯ = polar angle (latitude), W = source width, H = source height, N = cube face resolution.
Reference Data
| Cube Face | Direction | Forward Axis | Up Axis | Right Axis | OpenGL Convention |
|---|---|---|---|---|---|
| Positive X | Right | +X | +Y | โZ | GL_TEXTURE_CUBE_MAP_POSITIVE_X |
| Negative X | Left | โX | +Y | +Z | GL_TEXTURE_CUBE_MAP_NEGATIVE_X |
| Positive Y | Top | +Y | โZ | +X | GL_TEXTURE_CUBE_MAP_POSITIVE_Y |
| Negative Y | Bottom | โY | +Z | +X | GL_TEXTURE_CUBE_MAP_NEGATIVE_Y |
| Positive Z | Front | +Z | +Y | +X | GL_TEXTURE_CUBE_MAP_POSITIVE_Z |
| Negative Z | Back | โZ | +Y | โX | GL_TEXTURE_CUBE_MAP_NEGATIVE_Z |
| Panorama Width | Recommended Face Size | Angular Resolution | Typical Use |
|---|---|---|---|
| 1024px | 256px | 0.35ยฐ/px | Thumbnails, previews |
| 2048px | 512px | 0.18ยฐ/px | Mobile VR, low-end games |
| 4096px | 1024px | 0.088ยฐ/px | Desktop games, WebGL |
| 8192px | 2048px | 0.044ยฐ/px | High-quality skyboxes |
| 16384px | 4096px | 0.022ยฐ/px | Film-grade environments |