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:
install_deps.sh --skip-osl --skip-opencollada
- 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)
- 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.
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.
- 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).