Setting the Camera Angle to Match a Real Camera

November 19th, 2005 by Francois Lord - Viewed 31609 times -

When you are working on a shot with a live background plate, chances are that you will have to match the angle of view from the camera that shot the plate with the virtual camera in the your scene. If the shot is being matchmoved in a dedicated software, the resulting camera will have the right angle set when imported in XSI. However, it’s still necessary to match the perspective for a still camera or a slight camera movement that can be tracked by hand.

XSI has some tools to facilitate this process, but it’s still not easy enough for most artists without a good knowledge of the relation between the focal length and filmback to understand. I’m saying this because at Buzz, I’m the one everyone comes to see when they need to find a camera angle. I usually go to the camera property page, in the Projection Plane tab, set the Film Aperture and Focal Length, and voilĂ … the angle is set. This looks easy enough but I still need to precisely know the filmback size of that particular camera so I often end up looking in some chart. And the Film Aperture in XSI is expressed in inches while all the filmback measurements I found in books and on the web are in millimeters.

On the other side of things, I’ve seen artists doing some previz work in XSI without knowing anything about a 35mm film camera and the type of lenses usually found in a studio. They build the scene, the camera moves, and when they are asked about the focal length the used, they are totally lost.

Anyway, I wanted to ease the process more so that anyone could find the right camera angle as easily as possible. I wrote RealLens.

It’s a plugin that adds a menu item in Get -> Primitive -> Camera.

RealLens menu item

This opens a PPG.

RealLens PPG

It allows you to convert a real camera and lens angle to an XSI camera and vice versa. The most often used camera types are listed in a menu, with the “35mm Full Aperture” set as default since this is the one we use the most for film and commercial work. You can also choose “Custom Filmback” to set it to the values you want. You then enter a focal length and you obtain the equivalent XSI angle. If you change the XSI angle, the focal length will update automatically according to the camera type.

When everything is ready, you can select a scene camera and hit the “Set” button. This will set the angle of view and the picture ratio for that given camera.

As this is my first plugin to be released into the wild, I applied the teachings of Andrew Skowronsky in his excellent presention last tuesday at the XSI Montreal User Group on how to create plugins for XSI. I created an add-on directory structure in the Plug-in Manager, and I created the help files using the context menu commands. I just had to fill the automatically generated html file to provide documentation when the user hits the “?” button in the PPG. This was so easy that I think nobody should be releasing an addon on the web without including documentation.

I hope you will find this tool useful.

note: This plugin is written in Python. You must have Python installed to use it.

25 Responses to “Setting the Camera Angle to Match a Real Camera”

  1. Steven Caron says:

    Thanks for this contribution…

    I find it frustrating when i am using a custom tool/PPG and press the ”?” and get nothing. thank you for putting that in

  2. Chris says:

    Hi, Great (downloading now). Would it be possible to do a quick blog on some of the information you got from Andrew Skowronsky on the process of making a plugin?

  3. Patrick and I tried to convince Andrew after his presentation to come and blog on this site. Perhaps Luc-Eric could help…

  4. This is huge! Thanks so much!

  5. Kris Rivel says:

    This is awesome….thanks so much!

  6. Gene Crucean says:

    This IS awesome. Thanks.

  7. Luc-Eric says:

    I didn”t do nuthin”, andrew came here on his own! ;-)

  8. Rob Wuijster says:

    A very warm “thank you” from this end, This will definetly help a lot. Only thing is I finally have to install Python ;)

  9. Wow, this looks exactly like what I”ve wanted so long but I guess it only works in 32-bit XSI? I installed Python but RealLens won”t show up in the primitives menu in my XSI 64…

  10. Cy says:

    Installed Active Python 2.4
    Set XSI scripting to active python
    Installed Real Lens addon
    Real causes XSI to crash
    Any reason for this?

  11. I don”t know. Are you sure it”s not Active Python 2.41?
    Otherwise, I couldn”t tell. You should try other Python plugins to see if it”s only RealLens that”s causing problems. In which case I could verify if I didn”t do anything stupid in it.

  12. Cy says:

    Sorted it out, thanks for replying Francois
    Added the buzzLib xsi folder to the /users/…/Application/Plugins folder.
    Noticed that hint in another xsiblog page: “A View To A Selection”

  13. Huh?
    I thought I had removed all the dependancies on the BuzzLib.
    I should verify that…

  14. Kashif Riley says:

    The idea of a real world camera system, is so cool :). But having the problems as Cy and can”t even get plugin to show up. Cy, where did you put the folders…


  15. Don”t forget that you need Python for it to work. With Python installed, you should just have to install the addon the normal way.

  16. John Crane says:

    This is an awesome tool. Thanks so much. Between it and the full EXIF/shooting data generated by the DSLR, compositing stills especially just became way, way easier.

  17. It”s great, really useful !

  18. Edin Gacic says:

    I have just installed Python 2.5 release from the official site using

    33fffe927e4a84aa728d7a47165b2059 python-2.5.msi (10695680 bytes, signature)

    i installed your addon by dragin it into the viewport right?

    I can”t get it to show in the camera and I dont know how to install it?



  19. Edin Gacic says:

    how about just installing this active python ? will that do the trick cuz I just tried to install the 32 and it says i needed 2.2 first but as i said i have 2.5 … anyways I will try active first…. hope to get it to work….

  20. Luis says:

    I tried using the netview version of the script (vb) and it seems to do the same thing. It is available at:

  21. Mark Neumann says:

    Wonderful plugin. Thank you so much.

    For those who need the info for the Sony HVRZ1U the specs are these for the film back. Just add this to the script.

    “Video HDV HVRZ1U – 1/3\” 16:9 sensor”:[4.8, 2.7],

  22. jitesh says:

    quick question, i am doing a project in, and i have to camera match a scene, i have done the correct camera matching many times =, but everytime i sav as a different file name just to be safe and have multiple copies, when i reopen the files the camra match has moved, I have saved my memory cams aswell still same thing happens, anyone have any solutions to this problem

    thank you

  23. Atte Nurminen says:

    Just wondering if you’re planning to update this wonderful plugin…? Canon 7D and Red cameras come to mind first, I’m sure there are others, too!

  24. Francois Lord says:

    Yes. I plan on converting it to a live operator on a camera with ICE and more presets.
    I just need time.