Giter Site home page Giter Site logo

rpg_blender_omni_camera's Introduction

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

Building

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

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

License

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

rpg_blender_omni_camera's People

Contributors

supitalp avatar

Watchers

曹明伟,Mingwei Cao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.