StephenW Posted July 21, 2009 Share Posted July 21, 2009 Given an arbitrary image (like this one: ), how would you go about even roughly matching the projection? First, from the Flickr information, you can get the 35mm equivalent focal length which I can set in the camera node. Next, I don't know any dimensions of anything on the image but (if it's useful) I can probably assume that the person taking the picture is somewhere around 175cm high. Obviously from looking at the picture, I could choose 4 points that would be roughly square on the flat surface, so do I just set the picture as the viewport (and camera) background, create a grid and fiddle with the camera until it looks roughly right? Obviously since I have no known dimensions, it'll never necessarily be perfect, but is there a more clever way to use information I can provide (like chosen points on the image I know to be in the same plane, or three points I know to be a 90 degree angle, or whatever) to improve the camera position? Thanks for your help, Stephen Quote Link to comment Share on other sites More sharing options...
sam.h Posted July 22, 2009 Share Posted July 22, 2009 I would try to figure out how far off of the ground the photo was taken, make a ground plane, project onto the ground plane then fiddle with the camera rotations until the road looks right... that might work. Quote Link to comment Share on other sites More sharing options...
cellchuk Posted July 22, 2009 Share Posted July 22, 2009 Hey Stephen, I dunno how the picture looks like (the link didn't work for me) but you probably will need a couple of dummy objects that you will use as reference.Such As a Grid for the road/Ground, a couple of Boxes for buildings and such... then you can start playing with the relevant parameters like the aperture, focalLength and the translations of the camera , you can also attach a null to the camera and use that as the Locator instead of tweaking the camera translation Parms. cheers, Selcuk Quote Link to comment Share on other sites More sharing options...
Owl Posted July 22, 2009 Share Posted July 22, 2009 if it helps Camera Manufacturer : CASIO COMPUTER CO.,LTD. Camera Model : EX-Z850 Focal length [mm] : 7.9 Object Distance [mm] : 536870912 Quote Link to comment Share on other sites More sharing options...
StephenW Posted July 22, 2009 Author Share Posted July 22, 2009 Thanks for the replies. I used Image Modeler to get a pretty good setup. I created a couple of planes in it and exported them as FBX along with the camera. Weird thing is, when you import that FBX into Houdini, it all looks great until you look through the camera, and then the planes are miles away and you've got to set the Focal length up to somewhere around 12000 to get anywhere near them. I created another camera and put it in the same place as the one imported and then set it up from there and that looked ok. Dunno what's gone wrong with the FBX import... I tried importing the FBX in Maya and that looked right, so I guess it might be a bug or some option on import I'm not aware of. In order to add anything to the image, I put in a plane and a box to test things. I guess because the camera isn't quite set up right, the projected image is skewed (as shown in the attachments). The only reason I'm trying to project it is that I need a surface there so I can drop shadows from the cube. I guess I'd be better using a shadow matte and comping it but I was hoping I'd be able to do it all in the render. Thanks again for the help. Quote Link to comment Share on other sites More sharing options...
StephenW Posted July 23, 2009 Author Share Posted July 23, 2009 (edited) Weird thing is, when you import that FBX into Houdini, it all looks great until you look through the camera, and then the planes are miles away and you've got to set the Focal length up to somewhere around 12000 to get anywhere near them. I created another camera and put it in the same place as the one imported and then set it up from there and that looked ok. Dunno what's gone wrong with the FBX import... I tried importing the FBX in Maya and that looked right, so I guess it might be a bug or some option on import I'm not aware of. In case it helps anyone else, the camera is corrected if you change the Camera's Screen Window Size value to 1 and 1 Edited July 23, 2009 by StephenW Quote Link to comment Share on other sites More sharing options...
beeemtee Posted July 23, 2009 Share Posted July 23, 2009 your problem is probably caused by a wrong aperture setting. to be short, the focal length of the lens doesn't enough in itself to calculate the field of view. the size of the imaging medium also had to be given. this is exactly what the aperture parameter does. set it to the horizontal size of the camera's sensor which made the picture in millimeters, or 36 if it was made onto standard Leica format film. dpreview.com is the site to gather that information if it's a digital still camera. if you only know a mysterious focal length multiplier than divide 36 by this number and you will get a more or less decent estimation of the imaging medium's size. if you are interested in the details search odforce, somewhere i (and probably others) did a lengthier explanation of the matter. hope this helps bmt ps.: the default setting is what makes the most confusion here. if i remember well it has been chosen so that an 50mm lens would give a 45 degrees fov. don't ask me why. the second is the name of this parameter, which is correct, but can be misleading. 1 Quote Link to comment Share on other sites More sharing options...
csp Posted November 29, 2011 Share Posted November 29, 2011 your problem is probably caused by a wrong aperture setting. to be short, the focal length of the lens doesn't enough in itself to calculate the field of view. the size of the imaging medium also had to be given. this is exactly what the aperture parameter does. set it to the horizontal size of the camera's sensor which made the picture in millimeters, or 36 if it was made onto standard Leica format film. dpreview.com is the site to gather that information if it's a digital still camera. if you only know a mysterious focal length multiplier than divide 36 by this number and you will get a more or less decent estimation of the imaging medium's size. if you are interested in the details search odforce, somewhere i (and probably others) did a lengthier explanation of the matter. hope this helps bmt ps.: the default setting is what makes the most confusion here. if i remember well it has been chosen so that an 50mm lens would give a 45 degrees fov. don't ask me why. the second is the name of this parameter, which is correct, but can be misleading. Hi, I know this post is old but I am driving crazy to have an accurate camera match, I have all the measurements (distance from object, from ground, from walls, tilt, lens) from the shooting. Then in Houdini I model in basic shapes the environment in real size and I created a camera with the measurements I got in shooting and it doesn't match as it should. I was then searching about aperture and indeed the name is misleading, I was looking how to figure out or calculate the aperture and I found this number "Sensor size: Full frame (36 x 24 mm)" for the camera I'm using "Canon 5D Mark II" and then I found this post where you mention something about "camera's sensor". Is the sensor size the aperture which houdini's camera needs? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.