User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times

Drop equirectangular panorama here or click to browse

Supports JPEG, PNG, WebP. Recommended: 2:1 aspect ratio.

Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

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.

panorama to cubemap equirectangular to cubemap cubemap generator skybox converter 360 to cubemap cube map faces

Formulas

For each pixel (x, y) on a cube face of size N, normalize to the range [โˆ’1, +1]:

u = 2 โ‹… x + 0.5N โˆ’ 1
v = 2 โ‹… y + 0.5N โˆ’ 1

Construct direction vector d = (dx, dy, dz) based on face orientation, then convert to spherical coordinates:

ฮธ = atan2(dx, dz)
ฯ† = asin(dy|d|)

Map to equirectangular pixel coordinates in source image of width W and height H:

sx = ฮธ + ฯ€2ฯ€ โ‹… W
sy = ฯ€ โˆ’ 2ฯ†2ฯ€ โ‹… 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 FaceDirectionForward AxisUp AxisRight AxisOpenGL Convention
Positive XRight+X+Yโˆ’ZGL_TEXTURE_CUBE_MAP_POSITIVE_X
Negative XLeftโˆ’X+Y+ZGL_TEXTURE_CUBE_MAP_NEGATIVE_X
Positive YTop+Yโˆ’Z+XGL_TEXTURE_CUBE_MAP_POSITIVE_Y
Negative YBottomโˆ’Y+Z+XGL_TEXTURE_CUBE_MAP_NEGATIVE_Y
Positive ZFront+Z+Y+XGL_TEXTURE_CUBE_MAP_POSITIVE_Z
Negative ZBackโˆ’Z+Yโˆ’XGL_TEXTURE_CUBE_MAP_NEGATIVE_Z
Panorama WidthRecommended Face SizeAngular ResolutionTypical Use
1024px256px0.35ยฐ/pxThumbnails, previews
2048px512px0.18ยฐ/pxMobile VR, low-end games
4096px1024px0.088ยฐ/pxDesktop games, WebGL
8192px2048px0.044ยฐ/pxHigh-quality skyboxes
16384px4096px0.022ยฐ/pxFilm-grade environments

Frequently Asked Questions

The source image must be a true equirectangular projection with a 2:1 aspect ratio (width exactly double the height). Common sizes are 4096ร—2048, 8192ร—4096, or 16384ร—8192. If your ratio deviates, the mapping from spherical to Cartesian coordinates will be skewed, producing stretched or compressed faces - especially visible at the poles (top and bottom faces).
Equirectangular images compress polar regions into a narrow strip of pixels. The top face maps to the uppermost row and the bottom face to the lowermost. These source regions have the lowest angular pixel density because all 360ยฐ of longitude are squeezed into progressively fewer horizontal pixels near the poles. Higher-resolution source panoramas mitigate this but cannot eliminate it - it is an inherent limitation of the equirectangular projection.
Without interpolation, each output pixel snaps to the nearest source pixel (nearest-neighbor sampling), producing blocky, staircase-like artifacts. Bilinear interpolation reads the four surrounding pixels at the fractional source coordinate and blends them weighted by proximity. This yields smooth gradients and sub-pixel accuracy, critical for skyboxes where seams between faces must be invisible.
A useful rule: face size โ‰ˆ panorama width รท 4. A 4096px-wide panorama yields clean 1024px faces. Going higher (e.g., 2048px faces from a 4096px source) will not add real detail - it simply interpolates existing data. Going lower saves memory and texture bandwidth, useful for mobile or WebGL targets.
No. This tool implements the equirectangular-to-cubemap projection exclusively. Cylindrical projections do not cover the full sphere (they omit the poles), and fisheye projections use a nonlinear radial mapping. Feeding these formats will produce geometrically incorrect cubemap faces. Convert your source to equirectangular first using a stitching tool like Hugin or PTGui.
The tool uses the standard OpenGL cubemap convention: +X right, โˆ’X left, +Y up, โˆ’Y down, +Z front, โˆ’Z back. DirectX swaps the Z axis direction. If you need DirectX layout, swap the Front (PosZ) and Back (NegZ) images after export. The reference table above lists exact axis assignments for each face.