« Return to Thread: Camera FoV

Re: Camera FoV

by Marcelo Caetano Martins Muniz :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

If you use DirectX for example, the FoV has a big rule in the camera Zoom.
Generally people use 45 as diagonal FoV, but if you change from 45 to 25 the object will look closer.

Check the attached images, both images the camera is at the same distance from the object, the only difference is the Field of View.

 

When I use papervision, if I just change the camera focus the objects won’t look any closer. I see the projection difference but no zoom difference.

 

So, I think that if I want to synchronize DirectX or OpenGL camera with Papervision3D I’ll have to change both focus and zoom. And that’s why I’m after a formula that gets as input the scene stage size and diagonal field of view and return the papervision focus and zoom.

 

Does it make sense to you?

 

Thanks,

Marcelo Muniz

 


From: Papervision3D-bounces@... [mailto:Papervision3D-bounces@...] On Behalf Of Peter Kapelyan
Sent: terça-feira, 12 de junho de 2007 21:54
To: Papervision3D@...
Subject: Re: [Papervision3D] Camera FoV

 

Hi, I seriously DOUBT it because it is not truley 3d...however I am sure it comes very close.
Also I realize you maybe have answered your own question! I don't think zoom will help you because I believe it in effect the same as moving the camera closer to the focal point, so it almost seems like zoom might not play a part in your scenario unless maybe you convert it to a Z position? Just an idea.
-Pete

 

On 6/12/07, Marcelo Caetano Martins Muniz <marcelo@...> wrote:

I can't give you a code example but I'll give you the scenario.

 

I have renderers implemented in Directx and OpenGL that output renders (images) to me.

In these renderers I can set any value as diagonal field of view to the camera.

 

What I wanna do is to use a low poly version of my 3d models in papervision, so the user can set the camera position in the scene, click on a button to render and I output an image of the same scene rendered using high poly 3d models on my renderers.

 

The default diagonal FoV that I use in the renderers is 25. The flash stage and the output image have the same size 622x310. I could synchronize the papervision camera with my renderers using the following formula to find the papervision camera focus:

var diagonalFOV:Number = 25;
var width:Number = 622;
var height:Number = 310;
var w:Number = width;
var h:Number = height;
var d:Number = Math.SQRT((w * w) + (h * h)) ;
var focalDistance:Number = d * Math.TAN(diagonalFOV / 2.0) ;

And I had to manually adjust the papervision camera zoom until it matches the rendered images.

 

I have the following questions:

1) Does the papervision camera focus represent the focal distance that we find in any standard 3D game library (DirectX/OpenGL) for camera settings?
2) How can I calculate automatically the papervision camera focus and zoom if I give you as input my stage size and diagonal field of view?

Thank you,

Marcelo Muniz


From: Papervision3D-bounces@... [mailto:Papervision3D-bounces@...] On Behalf Of Peter Kapelyan
Sent: terça-feira, 12 de junho de 2007 20:57


To: Papervision3D@...
Subject: Re: [Papervision3D] Camera FoV

 

Ok I am back - can you send me any code (hopefully flex as3 or cs3)?
I will try to give you a good answer!
-Pete

 

On 6/12/07, Marcelo Caetano Martins Muniz <marcelo@...> wrote:

Ok. I'll be waiting for you response.

 


From: Papervision3D-bounces@... [mailto:Papervision3D-bounces@...] On Behalf Of Peter Kapelyan
Sent: terça-feira, 12 de junho de 2007 15:30
To: Papervision3D@...
Subject: Re: [Papervision3D] Camera FoV

 

Hi someone posted a calculator or something (my suggestion). I will look tonight - literally out the door now.
-Pete

 

On 6/12/07, Marcelo Caetano Martins Muniz <marcelo@...> wrote:

Hi,

 

I still got no answer about how to calculate the camera Field of View using focus and zoom.

 

I did some research and I find out how to calculate focalDistance, is it the same as the camera focus?

Here is formula I found how to convert diagonalFOV to focalDistance.


var diagonalFOV:Number = 25;

var width:Number = 622;

var height:Number = 310;

var w:Number = width  ;

var h:Number = height  ;

var d:Number = Math.SQRT((w * w) + (h * h)) ;

var focalDistance:Number = d * Math.TAN(diagonalFOV / 2.0) ;

 

If focalDistance is the same as the camera focus, it still doesn't make sense how to calculate the correct camera zoom for one selected FoV.

Does anyone have some clue to this puzzle?

 

Thanks,

Marcelo Muniz

 

 

 


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 


_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

 




_______________________________________________
Papervision3D mailing list
Papervision3D@...
http://osflash.org/mailman/listinfo/papervision3d_osflash.org

tt_FoV45.jpg (37K) Download Attachment
tt_FoV25.jpg (40K) Download Attachment

 « Return to Thread: Camera FoV