Hey Matt yes, this is still something that confuses me, so a little recap is probably in order.
FOV is calculated from the zoom and focus settings of the camera, but also relies on the size of the viewport. as with convention, it represents the vertical field of view in degrees between the bottom edge of the viewport and the top edge of the viewport. by default, viewport dimensions are determined by the size of the flash movie so if this is adjusted then the FOV will change. The project function of a lens class is where perpective is calculated, but for each lens the camera properties are used differently. the default (legacy) zoomfocuslens uses the somewhat arcane formula zoom/(1 + z/focus) for perspective, which is a remnant of papervision days and is generally not considered a standard. However, one advantage of this approach is that the virtual distance between the camera position and the viewing plane (the imaginary plane in 3d that is used for projecting the view) is determined by the focus property allowing a greater degree of control, while the zoom acts as a global scaling property of the resulting projection. In the more standard perspectivelens, perspective is calculated using the simpler zoom*focus/z formula, and the position of the viewing plane is fixed to always intersect with the position of the camera. so your statement in point 3 is correct for the perspectivelens, but not for the zoomfocuslens in all of this, the FOV is calculated using the position of the camera, the distance to the viewing plane and the size of the viewport. by default, FOV varies with viewport size and zoom is absolute, creating a view that retains the same scale regardless of viewport dimensions. However, changing the fixedZoom property of camera3d to false will reverse this behaviour - FOV will be absolute and zoom will vary with viewport size creating a view that retains the same FOV (similar to the showall scale mode of the stage) regardless of viewport dimensions. hope that clears up a few things! let us know if you have any other questions cheers Rob On Tue, May 11, 2010 at 9:34 AM, Matt <[email protected]> wrote: > I'm trying to get a better understanding of the relationship between > the FOV, focus and zoom properties of the camera (or lenses really). > It would seem that: > > 1. The FOV is calculated using the focus and zoom properties (and not > the other way around). > 2. The perspective (as calculated in the project function for the > various lenses) determines how the scene will be drawn. > 3. The perspectives of all the lenses is equal for the same product of > the focus and zoom (focus x zoom) e.g. a focus of 100 and a zoom of 10 > (100 x 10 = 1000) will produce the same result as a focus of 200 and a > zoom of 5 (200 x 5=1000). > > Are these observations correct? > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
