No SkyBox projection

Bug #1031914 reported by Ted Shaneyfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
Wishlist
Unassigned

Bug Description

3D SkyBox (cubic) projection should be offered as one of the projection options in Hugin.

It is a commonly required 3D background format for 3D rendering.

According to http://www.ptgrey.com/support/downloads/documents/ladybugSDK/ProjectionTypes.html
the formulas needed are: U=X/Z, V=Y/Z

It seems this may be similar like a set of six square rectilinear projections (Front, Right, Top, Left, Bottom, Back) designed to fit together to make a cube.

(platform independent feature request)

Revision history for this message
tmodes (tmodes) wrote :

There were some discussion about this already on the mailing list.
It is not so easy: The blending step by enblend needs to take this into account. And this takes some more changes to enblend.
Also this projections needs to added to panotools, so Hugin can use it.

Please use the search function on the mailing list for more details.

For a workaround: stitch to equirectangular and then use erect2cubic to create the cubeface http://search.cpan.org/dist/Panotools-Script/bin/erect2cubic

Changed in hugin:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Ted Shaneyfelt (shaneyfelt) wrote :

Thanks. Trying it, but it's such a hassle because it expects Panotools::Script to be set up correctly, and unfortunately my attempt to use cpan in the normal way or to install cpanm fails on SnowLeopard.

Sometimes I think the cool features of OSX don't quite outweigh all the things they break under the hood. I'll keep trying, but please bump the priority a bit since the workaround is not working as easily as one would expect. Time to try it under an UBUNTU virtual machine next...

Revision history for this message
tmodes (tmodes) wrote :

To make enblend to blend around the cube faces is not so easy as you might think. I have not the skills to implement this.

If you are on Mac OS you could try a package of panotools::scripts by Harry ( http://panorama.dyndns.org/index.php?lang=EN&subject=Panotools&texttag=Panotools - it's an older version, but if I remember correctly, it should contain erect2cubic.

Revision history for this message
Ted Shaneyfelt (shaneyfelt) wrote :

OK - Thanks, that workaround works for me. It generates this sky.pto file to process my erect.tif file:

p E0 R0 f0 h3968 n"TIFF_m" u0 v90 w3968
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p0 r0 v360 w12466 y0
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p0 r0 v360 w12466 y-90
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p0 r0 v360 w12466 y180
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p0 r0 v360 w12466 y90
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p-90 r0 v360 w12466 y0
i a0 b0 c0 d0 e0 f4 h6233 n"erect.tif" p90 r0 v360 w12466 y0

then it calls nona -o side sky.pto

to produce files side0.tif, side1.dif, side2.tif, side3.tif, side4.tif, side5.tif
h6233 is the original height
w12466 is the original width
h3968 is the original height times 2/pi
w3968 is the original width times 1/pi
(The original image was twice as wide as high - seems to be the default for rectilinear output)

There's a few other lines that don't seem to affect anything when left out. Is that difficult t o add as a script to Hugin? It looks like nona (comes with Hugin) does all the hard work for you. It would be a nice convenience if it would do the two step process of creating a rectilinear projection as intermediate format and then process this pto to create these images.

Thanks.

Revision history for this message
Ted Shaneyfelt (shaneyfelt) wrote :

created a tutorial on making a skybox.

http://ace.utsa.edu/ted/skybox

It would be nice if the skybox step were a menu item rather than platform dependent command line and pto file editing, but it gets the job done 'till that's implemented.

Revision history for this message
Ted Shaneyfelt (shaneyfelt) wrote :

The tutorial has been moved to http://www2.hawaii.edu/~tvs/skybox

Revision history for this message
tmodes (tmodes) wrote :

Added a user defined output sequence which creates first the equirectangular image and then the 6 cube faces.

Changed in hugin:
milestone: none → 2017.0beta1
status: Triaged → Fix Committed
tmodes (tmodes)
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.