Archive

Posts Tagged ‘camera’

Papervision 3D and Maya Camera

September 30th, 2009

Worked with Papervision 3D in a couple of project and trying to simulate the Maya 3D world to Papervision 3D as much as possible to make it easier for the art directors. A big problem has been with the Maya Camera and units. What we did is that the 3d modeler setups a camera in Maya and we are converting the values to the camera in actionscript to fit Papervision 3D.

What we are looking at is the FOV (focal length), the flash convert value isĀ (xv / (2 * Math.tan(Math.PI * fov / 360))) /1.5;

Bojidar Dimitrov has an 1.5 lens converter that works excellent:
http://www.bdimitrov.de/kmp/technology/fov.html

By using the Maya Focal Length thru the converter and adding that to this formulas variable xv, you will get a Papervision 3D camera that is the same.

1
2
3
4
5
6
// FOV from Maya
var fov:Number = 35;
// FOV to F from http://www.bdimitrov.de/kmp/technology/fov.html
var xv:Number = 45.741390734365076;
var focus:Number = (xv / (2 * Math.tan(Math.PI * fov / 360))) /1.5;
camera.focus = focus;

Please visit Papervision 3D blog for great info.

Flash, Flex , , ,