relationship between camera zoom, focus and z values

89 views
Skip to first unread message

jimmyhay

unread,
Apr 2, 2008, 6:24:26 AM4/2/08
to away3d.dev
Can anyone shed some light on the relationship in Away3D between the
cameras zoom level, it's focus value and the z value.

Basically, if I import a collada file that contains a plane that is
1024x577, I want to work out what camera values will display this
plane at 100% in the view.

Cheers, Jimmy.

elguapoloco

unread,
Apr 4, 2008, 1:52:31 PM4/4/08
to away3d.dev
Here is the magic formula:
distance = (zoom - scale) * (focus / scale)
where distance is the distance from the camera and scale is the
desired scale of the object

Cheers,

Jerome

Julian Wilson

unread,
Apr 8, 2008, 2:14:12 PM4/8/08
to away3d.dev
I'm wondering about this myself. I have a MovieMaterial that I am
applying to the faces of a Cube and each face is distorted.
How do we figure out what the zoom amount needs to be so the view is
100%? (elguapoloco may have answered it but I am not getting it?)

Thanks, Julian

elguapoloco

unread,
Apr 8, 2008, 8:54:45 PM4/8/08
to away3d.dev
Hi Julian,

Using the following formula:
distanceFromCamera = (camera.zoom - scaleOfObject)*(camera.focus/
scaleOfObject)

You can calculate the camera.zoom value with (Warning my math might be
a bit rusty!):
camera.zoom = (distanceFromCamera/(camera.focus/scaleOfObject)) +
scaleOfObject

Hope that works!

Cheers,

Jerome.

Reply all
Reply to author
Forward
0 new messages