[Bf-committers] Help with some Matrix math

Alexander Ewering blender at instinctive.de
Mon Nov 15 06:31:38 CET 2004


Another attempt to get coding help on this list ... ;-)

I'm writing a PostScript exporter (in native Blender code) which exports
the 2d view as seen from the camera.

I'm having trouble transforming the 3d coordinates correctly into the
field of view. I'm right now taking the inverse matrix of the camera
object, multiply the 3d coords of a vertex with it, and then use
x/z and y/z as the 2d x/y coordinates.

This works, but I get some arbitrary scaling and translation in the
2d plane. 
I would like the FOV of the camera to span the range (0,0) to (1,1) in the 2d coordinate
system.

How can I achieve this? I guess this also has something to do with
the Lens value.

Thanks

| alexander ewering              instinctive mediaworks
| ae[@]instinctive[.]de   http://www[.]instinctive[.]de


More information about the Bf-committers mailing list