On Mar 3, 2013, at 5:04 PM, sh4dow wrote: > It seems to me this should be as simple as multiplying a given point with > some matrix, maybe scaling it to match the output resolution and bam. Done. > > Unfortunately, it does not appear to be that easy. > I multiply my point with the matrix of my camera, divide by w and presumably, > it should then be in some 0 to 1 or -1 to 1 space? And presumably, I would > then use the projection matrix to bring it to a space matching the output > resolution? > I don't get values anywhere near what I would expect after multiplying it > with my camera matrix though.
Does your camera matrix also contain the projection matrix or just the inverse camera xform? If only the inverse camera xform then don't divide out w yet - divide out w after multiplying by the projection matrix. To check, transform the point by the inverse camera xform - any point that was in front of the camera should now be in -Z. Multiplying that point (with a w of 1.0) by the projection matrix should produce a > 0 w coordinate that you can divide out. -jonathan _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
