Hey DrMcCleod

i have a feeling fov is broken in away3d at present. this is certainly
something we want to fix, so any further information you can supply us with
(even a test file from your experiences with it) would help speed things up
in this area. the formulas should be sound, but there may be a problem to do
with the updating scripts in camera once a property has changed.

Rob


On Wed, Oct 7, 2009 at 11:24 AM, DrMcCleod <[email protected]> wrote:

>
> Then again, this looks a bit odd to me. Surely the x term
> ( _camera.focus*_camera.zoom +_clipTop*_clipBottom) will always
> dominate here. Which explains why the result is always just under 180
> degrees.
> Anyone know how this works?
>
>
> On Oct 7, 10:38 am, DrMcCleod <[email protected]> wrote:
> > Thanks, that should help me find out what is going on.
> >
> > On Oct 7, 12:23 am, Pavel Jacko <[email protected]> wrote:
> >
> > > //calculated from the arctan addition formula arctan(x) + arctan(y) =
> > > arctan(x + y / 1 - x*y)
> > > return Math.atan2(_clipTop - _clipBottom, _camera.focus*_camera.zoom +
> > > _clipTop*_clipBottom)*toDEGREES;
> >
> > > this is in function getFOV() implemented by ILens interface
> > > you can have closer look if you go to away3d.cameras.lenses package
> > > and open some lenses class.
> >
> > > Hope this helps little bit.
> >
> > > Pavel
> >
> > > On Oct 6, 3:31 pm, DrMcCleod <[email protected]> wrote:
> >
> > > > I need to explicitly set the Field of View angle of my camera but I
> am
> > > > having trouble doing so.
> >
> > > > example:
> >
> > > > (in constructor)
> > > > {
> > > > boundCamera = new Camera3D( { x:0, y:0, z: -100} );
> > > > boundCamera.lens = new ZoomFocusLens();
> >
> > > > boundCamera.moveTo(0, 0, 0);
> > > > boundCamera.centerPivot();
> >
> > > > boundCamera.fov = 30;
> > > > boundCamera.zoom = 1;
> >
> > > > }
> >
> > > > (in enterFrameListener)
> > > > {
> > > > trace("fov: " + boundCamera.fov + " z: " + boundCamera.zoom + " f: "
> +
> > > > boundCamera.focus);
> >
> > > > }
> >
> > > > When the program containing this code runs, the trace returns...
> >
> > > > fov: 179.489...  z: 1 f: 100
> >
> > > > And sure enough, the view looks very wide.
> > > > What should I do to explicitly set the field of view, so in genuinely
> > > > renders the correct angle?
> >
> > > > In fact, what is the calculation that relates fov to zoom and focus?
> > > > It does not seem to be the same as Papervision
>



-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to