Community
3ds Max Shading, Lighting and Rendering
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Camera Center cooridinates

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
491 Views, 2 Replies

Camera Center cooridinates

I am working on 3D reconstruction for computer vision and using the 3D Max model and rendered output images as my test images. However, onething is confusing me. What are the coordinates of the camera center?

 

Currently the coordinates that are shown on the screen does not seem to be the upper left corner of the image. 

 

I have a Film width of 36mm and a focal length of 36mm. My rendered output is 640 x 480.

 

I would like to know that the camera coordinates, that are given in world coordinate system, are located where? upper right corner upper left corner or somewhere else.

 

Let say my corrdinate wrt to the world coordinate system is 382.027 -199.991 59.998. Then which point should i consider as camera center?

 

regards

 

 

2 REPLIES 2
Message 2 of 3
PROH
in reply to: Anonymous

Hi. Might be me not understanding your question correct, but it seems to me, that you're confusing yourself by mixing 3d world coordinates with 2d pixel counting.

World coordinates (xyz) are the measured distance from drawing origin (0,0,0), and are measured in meters, millimeters, inches etc. depending on what your "system units" and "display units" are set up to use - but not pixels!

The coordinates described for the camera are the center of the camera, as if it were a physical camera. This is the point were the camera is "looking from", and it is looking towards the center of what is going to be your rendered image. Not the upper left corner, but the exact center of the image, no mater what size, focal length etc. used.

If I totally misunderstood your question, then please describe what you're trying to achieve.

Hope it helps
___________________________________________________________________________________________________
3dsMax 4.2 to 2018
AutoCAD 2000 to 2018
Infrastructure Design Suite Premium 2012 to 2018

Message 3 of 3
Anonymous
in reply to: PROH

Hi, Thank you for your reply,

Actually, I was trying to find the projection of the 3D points in the
viewport to camera, that I placed in the scene. This requires the camera
matrix or in other words the camera transformation matrix from 3D to 2D.

If I use the current camera center given by the 3D studio max. The result
is a shift of the 2D points both in the x and y directions.

I also tried to find the coordinates using the following script

fn getViewDirectionRay =
(
-- The affine TM transforms from world coords to view coords -- so we need
the inverse of this matrix
local coordSysTM = Inverse(getViewTM())
-- The Z axis of this matrix is the view direction.
local viewDir = -coordSysTM.row3
-- get the view position from this matrix
local viewPt = coordSysTM.row4
return ray viewPt viewDir
)

That gives me the view point.

Then I used this few point to replicate the construction of the rendered
image

Camera position and Frame 30 = C = [382.027 -199.991 59.998];

Then I used the formula Camera MAtrix = P = K*R[I| -C] to find the
Transformation
matrix that will change my 3D points into a 2D projection given by my 3D
Max Camera.

K is the intrinsic parameters = K1 = [640 0 320 ; 0 640 240 ; 0 0 1];


The rotation of the matrix = [(-0.077) (-1.017) (-44.635)] in degrees.

I am doing this all in matlab

regards
WSQ

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report