EDBarrera 126 Report post Posted May 4, 2009 Hello people, I write here to know if someone can help me to clear up some concepts about the projection plane and what objects project on it. I try to find a better distance between the camera and the projection plane where I'll project the 3D object in 2D. Reading some articles I understand this distance is called "Focal Length" that is the distance between the lens (human's eye) and the film plane (the screen). I know I must locate the plane in front of the camera and not behind like in a pinhole camera. I use a right handled system, so I'll locate this length value on the -Z (0, 0, -255) and my camera is at the origin (0, 0, 0). And... why do I say to find a better distance?, because I want that objects have a perspective as when we see objects in the real world (with a little perspective) but not with a fish eye effect and orthogonal perspective. The problem is that at different resolutions I'll have different angles of view if I use a constant value like z = -255, and this causes the fish eye effect. And if I use a great distance like z = -2000, it causes an orthogonal perspective. I tried this test: For a 35 mm camera, the format dimension are: vertical: 24 mm horizontal: 36 mm diagonal: 43.3 mm Using a normal lens with a focal length F = 50 mm, the angles of view are: vertical: 2 arctan(24 / 2 * 50) = 27.0º horizontal: 2 arctan(36 / 2 * 50) = 39.6º diagonal: 2 arctan(43.3 / 2 * 50) 46.8º Taking now the dimensions of a small window where I'll draw the objects (this simulate the screen): vertical: 300 horizontal: 400 diagonal: 500 (c^2 = a^2 + b^2 - hypotenuse) and replacing the values of the equation before it gives me the following results: vertical: 2 arctan(300 / 2 * 600) = 30.5º horizontal: 2 arctan(400 / 2 * 600) = 39.9º diagonal: 2 arctan(500 / 2 * 600) 48.9º With this I compare that the angles (for example: 39.6º y 39.9º) are seem and I take the value 600 as the distance to locate the projection plane on the -z (z = -600). But this didn't give me the result I waited. This shows me a orthogonal perspective. By other hand I found that there is a concept called "Field of View" and I don't know how to apply this with the "Angle of View" and if the procedure I did before it's OK to find the distance. I read an article too, that says the human's angle of view is near to 180°, and I don't understand taking as parameter the 35 mm cameras, to take a normal picture I need a 50 mm objective (it forms (horizontal) an angle of view of 39.6º). So, my question are: 1. I know the focal length and the distance to the objects to project are different things but, need I locate the objects always in front of the projection plane? for example, if the projection plane is in z = -600, the objects should be in z <= -600 like -601, -700...? 2. How to calculate a better "Angle of View" to use. 3. How calculate the "Field of View" to use. 4. If there are objects between the camera and the projection plane (in the middle) must I project them? and why. 4. If there are objects farther than the object I want to project, how to do to don't project them. Some URL I saw: (http://en.wikipedia.org/wiki/Angle_of_view) Angle of View: AOV = 2 arctan(d / 2f) (http://en.wikipedia.org/wiki/Field_of_view) Field of View: FOV = d × i / f http://www.gamedev.net/reference/articles/article878.asp d=(screen_width/2) / tan(FOV/2) d=320 / tan30 d=554 ... screen_x = (dx * x) / z; screen_y = (dy * y) / z; Thanks in advance. Dany 0 Share this post Link to post Share on other sites