Nodes/ComfyUI_Lam/球面图转全景图
ComfyUI Node

球面图转全景图

Stitch a spherical view back into a full equirectangular panorama

By yanlang0123·Created 2 years ago·Updated about a month ago· 76
球面图转全景图
  • images
  • 图片
width4096
height2048

LamSpherical2Panorama (球面图转全景图) is the return half of the pack's 360° projection pair: it takes a spherical/fisheye image and remaps it back into an equirectangular panorama, at the width and height you specify. Use it after LamPanorama2Spherical (or with any spherical-projection source) to get back to a standard 2:1 equirect that other tools, VR viewers, and texture pipelines actually expect.

The realistic workflow is the round-trip: convert your panorama to spherical, edit or inpaint on that projection, then run this node to land back on an equirectangular image with controlled output resolution. If you've ever tried to edit a 360° image in a normal 2D editor, you know the seams and pole-stretch make it miserable - doing the edits in spherical space and converting back is the workaround this pair enables.

How it works

Another OpenCV remap, but in reverse: for every pixel of the target panorama it works out the corresponding polar angle and radius from the spherical image and samples with Lanczos interpolation. The width and height inputs set the output canvas - and unlike the forward node (which sizes itself), here you get control, which matters because you often want to restore the original equirect dimensions or downsample for performance.

Inputs

  • images (required) - the spherical images, as an IMAGE batch.
  • width - output width. Default 4096 (range from 64 up).
  • height - output height. Default 2048.

Outputs

  • 图片 - the equirectangular panoramas.

Install

Part of the ComfyUI_Lam pack:

cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam

or via ComfyUI Manager, then the README's install + 修改文件 steps. OpenCV (opencv-python) is required and comes with the pack.

Gotchas

Resolution is entirely on you here - the default 4096×2048 is a big tensor, and generating that out of a small spherical source just upscales softness rather than adding detail, so match the output to your source's real resolution unless you need the size. The remap is lossy in both directions: remapping to spherical and back won't perfectly restore the original (edge compression at the rim is the giveaway), so don't build a pipeline that round-trips repeatedly. And as always with this pack on Windows portable builds, run the install + patch scripts first or nothing else works.

Categorylam

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
widthINT409664–9999999
heightINT204864–9999999

Outputs (1)

NameTypeDescription
图片IMAGE