FORUMS: list search recent posts

3D Camera Match to Real World Camera

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Nicholas Joseph
3D Camera Match to Real World Camera
on Aug 30, 2011 at 5:55:01 pm

Hi.

I want to combine real video footage with cg elements. The real footage is shot and loaded into maya as image plane. Now I want set up the camera (manually) and create some rough 3D surroundings. I noted down a couple of camera parameters during the shooting and tried to feed them into Maya, but it doesn't work out. If I enter the focal length the resulting field of view is way too big. I'm not too familiar with the relations between focal length, film gate, field of view etc. How do you tune a camera in maya to match a real camera? How should I tune a camera to match these settings?

Here's what I got:

I used a still frame with iPhone as a test.

READ OUT FROM NUKE
The camera uses a 1/3.2" CCD
exif/0/Make = Apple.
exif/0/Model = iPhone 4.
exif/2/PixelXDimension = 2592.
exif/2/PixelYDimension = 1936.
exif/2/ApertureValue = 4281/1441.
exif/2/FocalLength = 77/20


Btw: I am trying to do this mathematically. I can match it using tracking software or even eyeballing it but I want to learn what numbers work where and the formulas used to getting the correct perspective.

I attached my test file which is has a frame with my guessed FOV and Focal. The paper in the scene is to scale. If you'd like to play please feel free to download.

http://f1.creativecow.net/2875/maya-file

thanks a lot!
__________________
--N!K--


Return to posts index

Steve Sayer
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 7:20:17 pm

Do you have some real-world measurements of the scale of the scene? Things like focal length etc. aren't going to match if you've got your objects modelled to centimeters instead of meters and so on.

I'm afraid I don't have any kind of photography background, so I can't be of much help. Sorry!

-Steve


Return to posts index

Nicholas Joseph
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 7:25:50 pm

The measurements of the paper in the scene in 11.75" and the 8.5".
From what I've researched, its a very difficult subject and no one seems to know....but there is obviously a way to do it because its used in most all movies.

thanks


Return to posts index


Steve Sayer
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 8:16:00 pm

Well, it's all very technical. Obviously there's a difference between being able to perform the task (being a tracker who uses software designed to do this) and having a complete mathematical understanding of the process (being an engineer who creates the software to do this).

If you want the most thorough understanding you're going to have to learn all about cameras and optics as well as about specific pieces of software. I'm sure there are resources out there, but you're not talking about quick-and-easy tutorials at this point; it's pretty specialized and advanced stuff. Certainly it's beyond my own experience.

Good luck,

-Steve

P.S. All this being said, I haven't actually opened your file, and won't have a chance to... I'm assuming the problem isn't something simple like the wrong units being used, or something like that!


Return to posts index

Nicholas Joseph
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 8:57:26 pm

oh i'm not really looking for a full technical explanation. The issue I am having is converting the numbers to maya's world (which according to the manual I think I did) and actually using the numbers correctly.

So here is what I learned so far...

-note the camera and its settings (iPhone4 as a test)
The EXIF data of the image gives a nice table of all the iPhone settings at the time the picture was taken.
-When taking the picture, add an object of known dimension. (paper in pic)
-in Maya : create a new camera, get the CCD info for the camera and add it to the aperture. Maya's aperture is in inches so I convert mm to inch.
I got the dimentions from http://en.wikipedia.org/wiki/Image_sensor_format
-fill in the focal Length...which according to windows its 3.85mm

- postion the camera correctly.

now with all the correct values in the correct slots...except FOV which maya fills in automatcally...the perspective is incorrect. Maya's Calculation of the FOV is incorrect which means one or more of the numbers I put in are wrong.

So i think Steve that it maybe a scale or unit or maybe numbers in the wrong place kinda thing. I have asked around, but no happiness.
I know theres a formula that when I use any camera with any focal length will allow me get the proper perspective.

In the Maya file I have got the perspective correct, but it was done with alot of trial and error.


btw...thanks for taking the time to read my posts. :)


Return to posts index

Steve Sayer
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 9:40:24 pm

No problem, Nicholas, I'm sorry that I haven't been of more help.

The only thing I can think of is that tiny digital cameras like the iPhone are so different from the film cameras that Maya is designed to work with, the math maybe isn't going to work out properly for them. I have no idea whether the sensor size and focal length "work" the same way for a super-compact device like a camera phone as they do for a normal (old fashioned?) film camera... or a larger-scale digital camera.

Have you done any tests with other cameras?

Hopefully someone with more info than I have will chime in.

-Steve


Return to posts index


keith mcgregor
Re: 3D Camera Match to Real World Camera
on Aug 30, 2011 at 9:58:52 pm

You'll need to set your working units to real-world settings. Feet instead of centimeters. You will also need the real focal length or lens size, if you use a 20mm lens you would then set you camera to the same. Don't use an iphone unless you know what the lens is (20 or 50 or what) real cameras have that info. what does "exif/2/FocalLength = 77/20" even mean? I tried a 77mm lens which was way off and so was a 20mm lens. You are trying to get a real setting from what nuke thinks it is? How much can you trust the info from nuke?

"Btw: I am trying to do this mathematically. I can match it using tracking software or even eyeballing it but I want to learn what numbers work where and the formulas used to getting the correct perspective."

Yes but if you use the real lens number that gives you the correct perspective, there is no magical math formula involved on our end that I know of. I always use the lens size and things turn out great!

For your project a 30mm lens seems to work the best but if I knew what it really is it would look better. Also as this isn't a video frame size it's kinda moot.
"exif/2/ApertureValue = 4281/1441" we don't work in this type of setting I have never seen this on any camera, is it 2.4? 5.6? And how much does the aperture play a part when you have DOF that is manipulatable?

Get the actual settings from the camera and you will be set.
-B

Reality? What did you make it?


Return to posts index

Nicholas Joseph
Re: 3D Camera Match to Real World Camera
on Aug 31, 2011 at 7:45:03 pm

Thanks for responding Keith. You make some good points. I will try it tonight and see what happens.

Thanks Again!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]