Convert PV3D zoom / focus to Field of View ?

4 messages Options
Embed this post
Permalink
aaron haines

Convert PV3D zoom / focus to Field of View ?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi
 
Can anyone tell me how to convert the papervision camera zoom and focus into a field of view value in degrees ?
 
Thanks
a.
 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
Tim Knip-2

Re: Convert PV3D zoom / focus to Field of View ?

Reply Threaded More More options
Print post
Permalink
I think this subject was handled earlier on this list. Please search...

In the next release of Papervision there will be a camera-type using
FOV instead of focus/zoom.

ETA: few weeks to few months :-)

Tim

2007/11/1, Aaron Haines <[hidden email]>:

>
>
> Hi
>
> Can anyone tell me how to convert the papervision camera zoom and focus into
> a field of view value in degrees ?
>
> Thanks
> a.
>
> _______________________________________________
> Papervision3D mailing list
> [hidden email]
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
aaron haines

Re: Convert PV3D zoom / focus to Field of View ?

Reply Threaded More More options
Print post
Permalink
In reply to this post by aaron haines
Some javascript/style in this post has been disabled (why?)
 
Here's the solution we arrived at to calculate horizontal Field of View from camera focus / zoom
We're using it to match up a PV3D scene with a server side render engine.
 
Basically all we are doing is working out the X position of the edge of the container in the 3D projection and then calculating the angle from the camera positon
 
Seems to work pretty well.
Hope it's of use to people.
 
-----------------------------------------

var f:Number = camera.focus;

var z:Number = camera.zoom;

var w:Numbercontainer.width; // width of the container in which the scene is being rendered

var d:Number = cameraDistanceZ; // Z distance of camera from 0 along it's axis - camera.z might work just as well

var r:Number = 180 / Math.PI;

var fov:Number = Math.atan(((((f - d) / f) / z) * w) / d) * r * 2 * -1;



From: [hidden email] [mailto:[hidden email]] On Behalf Of Aaron Haines
Sent: 01 November 2007 15:06
To: [hidden email]
Subject: [Papervision3D] Convert PV3D zoom / focus to Field of View ?

Hi
 
Can anyone tell me how to convert the papervision camera zoom and focus into a field of view value in degrees ?
 
Thanks
a.
 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org
aaron haines

Re: Convert PV3D zoom / focus to Field of View ?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Sorry..
 
That should have been
 
var w:Numbercontainer.width / 2; // half the width of the container in which the scene is being rendered


From: [hidden email] [mailto:[hidden email]] On Behalf Of Aaron Haines
Sent: 13 November 2007 17:17
To: [hidden email]
Subject: Re: [Papervision3D] Convert PV3D zoom / focus to Field of View ?

 
Here's the solution we arrived at to calculate horizontal Field of View from camera focus / zoom
We're using it to match up a PV3D scene with a server side render engine.
 
Basically all we are doing is working out the X position of the edge of the container in the 3D projection and then calculating the angle from the camera positon
 
Seems to work pretty well.
Hope it's of use to people.
 
-----------------------------------------

var f:Number = camera.focus;

var z:Number = camera.zoom;

var w:Numbercontainer.width; // width of the container in which the scene is being rendered

var d:Number = cameraDistanceZ; // Z distance of camera from 0 along it's axis - camera.z might work just as well

var r:Number = 180 / Math.PI;

var fov:Number = Math.atan(((((f - d) / f) / z) * w) / d) * r * 2 * -1;



From: [hidden email] [mailto:[hidden email]] On Behalf Of Aaron Haines
Sent: 01 November 2007 15:06
To: [hidden email]
Subject: [Papervision3D] Convert PV3D zoom / focus to Field of View ?

Hi
 
Can anyone tell me how to convert the papervision camera zoom and focus into a field of view value in degrees ?
 
Thanks
a.
 

_______________________________________________
Papervision3D mailing list
[hidden email]
http://osflash.org/mailman/listinfo/papervision3d_osflash.org