How to stitch Blender renders (90º FOV) with Hugin?

212 views
Skip to first unread message

Dalai Felinto

unread,
Aug 26, 2009, 10:36:20 PM8/26/09
to hugin and other free panoramic software
Hello there,

I've been using Blender for creating fisheye images and videos [1]
[2]. My current method is to render 4 square images with a FOV of 90º
and to use Blender nodes to stitch them [3]. Blender however is not
accurate for this, and it produces some visible undesirable seams.

Those images don't have any shared pixel, however they are perfect
matches. It would be possible to use Hugin with this workflow? I
couldn't find any option that allows one to stitch images without
control points. An option to do this through command-line would be
even better in order to allow the warping of movie files.

Thanks,
Dalai

http://blenderecia.orgfree.com


[1] - http://www.youtube.com/watch?v=BA0TpEqaZyY
[2] - http://www.youtube.com/watch?v=BW-jY7oCzAQ
[3] - http://blenderecia.orgfree.com/index.php/blender/real-time-is-not-enough-ou-fulldome-render-com-blender/

cri

unread,
Aug 27, 2009, 1:58:37 AM8/27/09
to hugin and other free panoramic software
Look at this page:
http://search.cpan.org/~bpostle/Panotools-Script-0.22/

You could install the panotools script and use the command
"cubic2erect" described in that page.
> [3] -http://blenderecia.orgfree.com/index.php/blender/real-time-is-not-eno...

James Legg

unread,
Aug 27, 2009, 9:03:08 AM8/27/09
to hugi...@googlegroups.com
On Wed, 2009-08-26 at 19:36 -0700, Dalai Felinto wrote:
> Hello there,
>
> I've been using Blender for creating fisheye images and videos [1]
> [2]. My current method is to render 4 square images with a FOV of 90º
> and to use Blender nodes to stitch them [3]. Blender however is not
> accurate for this, and it produces some visible undesirable seams.
>
> Those images don't have any shared pixel, however they are perfect
> matches. It would be possible to use Hugin with this workflow? I
> couldn't find any option that allows one to stitch images without
> control points. An option to do this through command-line would be
> even better in order to allow the warping of movie files.

You can specify the angle of each face on the images tab without control
points. Use the camera and lens tab to make sure the field of view of
your images is exactly 90 degrees, and all distortion parameters are 0.

If you get any small holes along the seams try making the images 91
degrees instead so there is a very small overlap.

Once you've set this up once you can use the "Apply template" option on
the file menu to copy the image angles and lens parameters from one
project into another.

I imagine there is a way you can do this on the command line, though I
can't provide you with a script.

I've noticed Blender's specular reflections don't line up between the
images in its own cube map renderer, so you will likely have visible
seems if you use specular reflections, whichever method you use to
stitch them.

James


Yuval Levy

unread,
Aug 27, 2009, 9:38:03 AM8/27/09
to hugi...@googlegroups.com
Hi Dalai,

Dalai Felinto wrote:
> I've been using Blender for creating fisheye images and videos [1]
> [2]. My current method is to render 4 square images with a FOV of 90º

are the square images rectilinear or fisheye?

> An option to do this through command-line would be
> even better in order to allow the warping of movie files.

<http://panotools.svn.sourceforge.net/viewvc/panotools/trunk/libpano/doc/stitch.txt>

that's the syntax of PTstitcher/PTmender/nona and easy to set up -
either by editing the script, or by setting yaw/pitch/etc. as described
by James in Hugin's Images tab.

once you have the script, either generated by Hugin or manually texted,
you can parse it to change image names for your source frames and pass
it to nona or PTmender.

Yuv

Dalai Felinto

unread,
Aug 27, 2009, 1:53:00 PM8/27/09
to hugi...@googlegroups.com
First of all thanks you all for all the help.

@Cri:
> You could install the panotools script and use the command
> "cubic2erect" described in that page.

It didn't work in my Windows Vista 64 here. I'll try in Ubuntu later
today. The error I got:
" Can't locate auto/Win32/Win32.dll at (eval 1) line 36.
Compilation failed in require at /loader/0x3036e8/Cwd.pm line 643.
BEGIN failed--compilation aborted. "

Not a problem because Hugin served me kind of well:

@James:
>You can specify the angle of each face on the images tab without control
>points. Use the camera and lens tab to make sure the field of view of
>your images is exactly 90 degrees, and all distortion parameters are 0.

Wonderful. It worked as a charm. 90º cameras (or 16 in lens unit) in
Blender fit perfectly together.
The only problem I had is that I couldn't find a way to export the
images without Hugin try to blend them.
The problematic result can be seen here
http://blenderecia.orgfree.com/blender/dome/images/equi_problem.jpg

The workaround I found was to output "remapped images" and put them
together in Gimp. Am I missing something here?
If you want to try it by yourself, I put a 6MB file online (hugins
file included) -
http://blenderecia.orgfree.com/blender/dome/elephants_dream.zip
Also, is there an option to output the remapped images already
positioned (all images with the same size as the final output, filled
with transparent spaces)?

Thanks a lot. Once I get it working 100% I will remap the ones I
originally map with Blender -
http://blenderartists.org/forum/showthread.php?p=1456767

@Yuval:
They are rectilinear square images.
Once I get it working through hugin, I'll give a shot at the script. Thanks !

Best regards,
Dalai

http://blenderecia.orgfree.com

2009/8/27 Yuval Levy <goo...@levy.ch>:

James Legg

unread,
Aug 29, 2009, 11:42:16 AM8/29/09
to hugi...@googlegroups.com
On Thu, 2009-08-27 at 14:53 -0300, Dalai Felinto wrote:
> @James:
> >You can specify the angle of each face on the images tab without control
> >points. Use the camera and lens tab to make sure the field of view of
> >your images is exactly 90 degrees, and all distortion parameters are 0.
>
> Wonderful. It worked as a charm. 90º cameras (or 16 in lens unit) in
> Blender fit perfectly together.
> The only problem I had is that I couldn't find a way to export the
> images without Hugin try to blend them.
> The problematic result can be seen here
> http://blenderecia.orgfree.com/blender/dome/images/equi_problem.jpg
>
> The workaround I found was to output "remapped images" and put them
> together in Gimp. Am I missing something here?

The overlaps are very narrow which causes a problem with enblend. It
will work fine if you set the enblend options to:
-l1 --fine-mask --no-optimize
and render the full panorama.

> Also, is there an option to output the remapped images already
> positioned (all images with the same size as the final output, filled
> with transparent spaces)?

Yes, uncheck 'Save cropped images' on the Nona options window.

-James

Reply all
Reply to author
Forward
0 new messages