QUOTE(bradon @ 01/31/09, 09:09 PM) [snapback]300024[/snapback]
I would not mind knowing the first route though sounded like an interesting technique that ive not tried anything like that.
Actually you have all the time millions of times in fact (assuming you have played 3d games for more than 10 hours), that's how 3d cameras work they transform the object into a xy plane where z is straight backwards this makes calculating the things just a easy look up, and z is residual. So now drawing is just a matter of sorting the polygons. Or drawing in arbitrary order and using z buffer to decide what is in front.
Now front tarnsfroms nothing so you can transform everything into front just liek any camera.
Observe, let us asume this scene. asete into script editor and execute
CODE
file -f -new;
polyCube;
See how the cube is slanted, go to front view. Affter this apste and execute:
CODE
lattice -divisions 2 2 2 -objectCentered true -ldv 2 2 2;
connectAttr -f perspShape.worldInverseMatrix[0] ffd1.deformedLatticeMatrix;
Now the cube will no longer be right in preps view (tough the lattice shape will and it can act as a way to compare, pan teh view see how the front behaves, it can help to shade both to se differece between latices cage and cube) But surprisingly it looks as if looked trough preps in front. And that's how your camera internally works.
Ok so the matrix i read doesnt include the persp shrinkage coefficient but its easy to multiply in.*
Hope you learned something (ps you ca attach your own matrix for mighty weird projections if you wish, oly it doenst work quite right for raytracing unless you can freeze normals. This is not entirely easy normals dont transform right.)
PS: if you want later to add stuff to thsi new projection make the latices outside lattice attribute to be all.then just adds tuff to the set. The bonus tools uses something mucjh like this for making custom orthorgraphical views. Wahre you can manually am each axis.
PPS: results vary across versions.
*theres a cavat to this maya doesnt like to calculate the point matrix on all tiers at all times. Wich si why results vary across versions.