Third Party Fuses/CubeToLatLong Description

From VFXPedia

Jump to: navigation, search

CubeToLatLong_v1_0

Converts a single face of a cube map to a latlong (equirectangular) panorama image. Slow. But useful to fix skydomes and matte paintings. Appears in Warp menu. Formulas based on [1]

Cube Maps are a useful projection for panoramas because straight lines stay straight, even if the direction of view isn't straight to the front/left/right/top... Here's an example workflow:

We want to fix the hole in the floor of this equirectangular panorama. Due to distortion and edge wrapping, this doesn't look like an easy feat.
Using a camera with a 90° AoV we export a cube tile. The camera was rotated around the X and Y axis to suit our needs.
Since the floor is straight now, we can easily touch up the image using Photoshop's vanishing point clone tool.
The resulting image is redistorted using this Fuse and the same orientation we used in step 2.
The Fuse has created an alpha channel as well, so the painted patch can be merged over the original panorama. Done.


  • Main Inputs
    Input
    A cube map tile to be converted. The source image can have any resolution and doesn't even have to be square but it will be treated as such.
  • Controls
    Direction
    Which direction the cube map tile is facing. You can also define custom latitude and longitude angles.
    Height
    The latlong map's height in pixels. As a rule of thumb, the latlong map should be about twice as high as the cube map tile. The output image will always have a 2:1 aspect ratio.
    Depth
    The bit depth of the resulting image.
    Filter Method
    Define a filter that will be used to scale the input image before transforming it. Internally, the cube map will be scaled (independently in X and Y) to cover the area it will occupy in the latlong map. This results in smoother results, especially when the output is smaller than the input map. Strictly speaking, this isn't correct since the filtering would have to adapt to a pixel's latitude (y-coordinate). However, this would require custom filtering code in Lua which would be very very slow.
    Only Use Filter in HiQ
    Like the resize tool, this Fuse will trade quality for speed when HiQ is disabled and use nearest neighbor sampling. Uncheck this to always use the filter defined above.


Download CubeToLatLong_v1_0

Development History on PigsFly



Stefan Ihringer
www.bildfehler.de