I didn't set this value since in away3d it is calculated based on the
zoom value.

I also set the lens property of the camera like this:
var lens:PerspectiveLens = new PerspectiveLens();
camera.lens = lens;

Maybe this would do it. I think what is important is first of all that
you know exactly what those values that maya gives you mean in the
maya world. Is it field of view / angle of view / half angle of view /
horizontally / vertically / frustum stuff etc..
And then you have to transform this into away3d. Wich i think is done
by the above assignCameraSettings function.

I don't know what you are trying to achieve but if you want to match a
rendered image of maya to a real time rendered image in away3d there
are more problems to consider.

On Sep 1, 8:02 pm, rendfox <[email protected]> wrote:
> Thanks Michael, this is very helpful. Still don't quite have it yet
> though. I think I need to convert Maya's Focal Length to camera.focus?
> How did you calculate your camera.focus value?
>
> also, a good 
> linkhttp://blog.tartiflop.com/2008/08/understanding-zoom-focus-and-field-...
> I think these two engines use the same formula.
>
> On Aug 29, 9:43 pm, Michael Klostermann
>
> <[email protected]> wrote:
> > I recently had the same problem matching a camera from blender to
> > away3d.
>
> > This is the function that i used. It should also work for any other 3D
> > package.
>
> > public function assignCameraSettings(camera:Camera3D):void
> > {
> >         var fovMaya:Number = 45.0;
> >         var fov2:Number = (fovMaya/2);
> >         var tan:Number = Math.tan(fov2);
> >         var viewWidth:Number = stage.stageWidth;
> >         camera.zoom = viewWidth/(2*tan*camera.focus);
>
> > }
>
> > viewWidth should be the width of your away3D window.
>
> > On Aug 26, 6:28 pm, rendfox <[email protected]> wrote:
>
> > > is there a method to convert a maya camera into away3D? How does
> > > camera3D.zoom relate to maya's Focal Length or Angle of View?
> > > Thanks for any help
>
>

Reply via email to