Patch for adding an omnidirectional camera model into Blender (Cycles)
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Initial commit Feb 15, 2016
0001-Add-omnidirectional-camera-model-to-Cycles-rendering.patch Initial commit Feb 15, 2016 Add license CC BY-NC-SA 3.0 Jun 8, 2016
render_fisheye.png add preview image Feb 15, 2016
screenshot.png Initial commit Feb 15, 2016

This patch add a new omnidirectional camera model in Blender, allowing it to render images according to the omnidirectional camera model


Follow the instructions on the Blender Wiki to compile Blender.

Before compiling, apply the patch ("0001-Add-omnidirectional-camera-model-to-Cycles-rendering.patch") to the source code. If you have any conflicts, checkout the commit "c1506454ecb4630119ed7ce13b3f8cdfef6dcee0") and apply the patch again.

Tip: if you don't need OpenCollada nor OSL, you can skip them in the external deps building step: --skip-osl --skip-opencollada

Using the Omnidirectional camera model

  • Make sure you're using the Cycles render engine
  • Select your camera, and go to the camera panel
  • Switch the Lens type to "Panoramic" and select the "Omnidirectional" lens subtype
  • Render your image normally (both CPU and GPU rendering are supported)

Omnidirectional camera parameters

  • Polynomial: a0, a1, a2, a3, a4, a5 correspond to the polynomial backward projection function parameters (in increasing degree order)
  • Shift: projection center shift from the image center, in pixels
  • Affine: correspond to the affine parameters in the omnidirectional camera model
  • Radius: scale factor used to compute the radius of the crop circle (radius = scale * image_height / 2.0). If zero, no crop circle is added.

How to get these parameters?

The easiest is to get them from a real fisheye or catadioptric camera. Calibrate your camera using the Ocamcalib toolbox. The toolbox will output the necessary parameters.

Warning: one set of parameters is valid for a given image size.

Known issues

  • Using motion blur using the omnidirectional camera leads to incorrect results


This code is released under the Creative Commons license (CC BY-NC-SA 3.0), which is free for non-commercial use (including research).