Pepe Equirectangular to Cubemap Strip
Your equirectangular pano, unwrapped into a tileable cubemap strip
- image
- cubemap_strip
A 2:1 equirectangular panorama is great for wrapping onto a sphere, but a lot of the things you actually want to do with a 360 image want perspective faces instead: a game-engine skybox, a texture you can tile, or input for a cubemap-based pipeline. Pepe Equirectangular to Cubemap Strip does that conversion in one node, and it's the projection sibling to the pack's interactive panorama viewer.
With the default settings it produces the familiar cubemap strip - front, right, back, left laid out side by side, each a 90° perspective view, all in one image at a 4:1 aspect ratio. Crank side_count up and the same idea morphs into a panorama that a straight cubemap can't express.
How it works
Under the hood it's pinhole-camera math running on the GPU. For each face, the node builds a set of ray directions, and the first face looks forward while subsequent faces step clockwise around the horizon. It samples the equirectangular image along those rays with the same torch grid-sampling routine the pack's preview node uses, so the faces are consistent with each other.
The two knobs that matter:
side_count- how many faces you get around the horizon (2 to 64, default 4). Each face spans exactly360 / side_countdegrees horizontally, so four faces at 90° each is a true cubemap.vertical_fov- the vertical coverage of each face in degrees (default 90). The node calculates the face height from this, which is the detail that keeps higherside_countvalues from cropping the top and bottom of your scene.
face_size sets the width of each face in pixels; leave it at 0 and it divides the panorama's width evenly by side_count, so the whole strip stays about the same width as your input. Because every face uses the same pinhole projection, the strip's first and last edges meet continuously - it tiles horizontally with no visible seam.
Why you'd reach for it
Four faces is your classic skybox texture: drop it into a game engine's cubemap slot and you're done. Higher side counts are the more interesting case - the geometry becomes a smooth prism, so if you want the look of a panoramic strip rather than six discrete faces, bump side_count up and the "faces" read as one continuous horizon.
There's also a quieter use: 360 video and cubemap diffusion models are starting to show up in the ComfyUI orbit (CubeComposer and friends), and those pipelines want cube-face representations. This is the cheap convert-to-cubemap step such workflows need.
Installing it
It's part of ComfyUI-PepeUtils, so the install is identical to the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Pepehoschi/ComfyUI-PepeUtils.git
or search ComfyUI-PepeUtils in ComfyUI Manager, then restart. No model files and no extra pip packages - it's torch only, which you already have.
Gotchas
- Feed it a proper 2:1 equirectangular image, or the faces will be distorted.
- At higher
side_counts the faces get taller than they are wide. That's deliberate - it preserves vertical coverage and equal pixel scale instead of stretching - but if you were expecting a fixed 4:1 strip, that only happens atside_count4 with 90° vertical FOV. - The output is a single IMAGE tensor, ready to save or feed straight into whatever consumes it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| face_size | INT | 00–8192 | Width of each face; 0 divides the panorama width by side_count |
| side_count | INT | 42–64 | Number of perspective faces around the horizon; 4 produces a cubemap strip |
| vertical_fov | FLOAT | 901–179 | Vertical field of view in degrees; face height is calculated automatically |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cubemap_strip | IMAGE | — |