Setting the Camera Angle to Match a Real Camera
November 19th, 2005 by Francois Lord - Viewed 6523 times - Popularity: 9%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.

This opens a 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.





November 19th, 2005 at 8:47 pm
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
November 20th, 2005 at 1:06 pm
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?
November 20th, 2005 at 2:12 pm
Patrick and I tried to convince Andrew after his presentation to come and blog on this site. Perhaps Luc-Eric could help…
November 21st, 2005 at 4:56 am
This is huge! Thanks so much!
November 22nd, 2005 at 10:27 am
This is awesome….thanks so much!
November 22nd, 2005 at 6:50 pm
This IS awesome. Thanks.
November 24th, 2005 at 3:11 pm
I didn”t do nuthin”, andrew came here on his own! ;-)
November 28th, 2005 at 4:03 am
A very warm “thank you” from this end, This will definetly help a lot. Only thing is I finally have to install Python ;)
January 27th, 2006 at 7:05 am
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…
March 8th, 2006 at 11:26 am
Installed Active Python 2.4
Set XSI scripting to active python
Installed Real Lens addon
Real Lens.py causes XSI to crash
Any reason for this?
March 8th, 2006 at 11:59 am
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.
March 8th, 2006 at 2:32 pm
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”
March 8th, 2006 at 2:45 pm
Huh?
I thought I had removed all the dependancies on the BuzzLib.
I should verify that…
July 21st, 2006 at 12:12 am
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…
Thanks…
July 21st, 2006 at 9:06 am
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.
August 15th, 2006 at 12:31 pm
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.
November 6th, 2006 at 4:04 am
It’’s great, really useful !
December 12th, 2006 at 5:51 pm
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?
Help!
Thanks
December 13th, 2006 at 9:34 am
You need pywin32. http://sourceforge.net/projects/pywin32/
Check out the Softimage wiki for more info on installation.
http://softimage.wiki.avid.com/index.php/Python_%28XSISDK%29
December 13th, 2006 at 1:47 pm
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….
Thanks!
February 2nd, 2008 at 5:43 pm
I tried using the netview version of the script (vb) and it seems to do the same thing. It is available at:
http://www.softimage.com/xsinet/L04_body/content/animate/create/oo_filmback/oo_filmback.vbs