Good day, I need help with getting access to matrix that deforms 3d coordinates from world space to screen space... Each point can be transformed in 3ds max sdk by MapViewToScreen function of ViewExp, but if I wish to project a large set of objects, is it possible to get the matrix once and then optimize the deformation via vector operation?
Thanks in advance!
Tatiana
Solved! Go to Solution.
Solved by denisT.MaxDoctor. Go to Solution.
Doesn't this help?
GetAffineTM()
Thanks istan,
No, it does not. This is the transform from world coords to the coordinates of the camera, but not the projection to the screen,
actually you first transform your points from world space coordinates with AffineTM matrix to camera coordinate system
(put origin at camera and z aligned with viewing direction, y with up) but then you need to project from 3D to screen with MapViewToScreen,
and do it per point!
I wonder if I could simulate the computations to get the matrix exactly or just get some interface to get the projection matrix.
Thanks!
Tatiana
where is the problem? you have a view (ViewExp*) -> graphic window (GraphicsWindow*) -> its transform ... what do you need extra?
I must admit, I am still lost... What matrix combination do I need to get effect like
vp->MapViewToScreen(pt);
where vp is ViewExp*, pt is a point in a camera coordinates (not projected, i.e pt = AffineTM * ObjectTM * vLocalPt)?
let's say I have 1200x720 viewport, then the result should be x in [0, 1200], y in [0, 720]?
Thank you!
Got it! GetCameraMatrix transforms vertex to NDC, which is even better!
Thanks again Denis!
Can't find what you're looking for? Ask the community or share your knowledge.