Hi Patrick, If I understand your question correctly, you'll want to follow these steps:
1. un-project your 2D coord into 3D space (using cam projection matrix) 2. divide the resulting vector by its 4th component (w coordinate) 3. Scale the vector so that its Z == -depth_sample 4. Apply camera transformations (if any) to go from camera to world space (using cam transform matrix) Hope that helps. Cheers, Ivan On Fri, Nov 2, 2012 at 3:30 AM, Patrick Heinen <mailingli...@patrickheinen.com> wrote: > Hi everyone, > > I'm trying to project a point from a deep image back to 3d space. I'm > currently taking the camera projection matrix, inverting it and multiplying > it with a Vector 4 {pixelX*deep,pixelY*deep,deep,deep}. > However this doesn't give me the exact position. > When projecting from 3d to 2d the 3rd position of the resulting vector is not > equal to the 4th position, the value changes as a function of the distance > from camera to object and the near crop. > To get the exact point in 3d I now need to be able to reconstruct this 3rd > position in the vector. > Does anyone know how it is calculated? > > Thanks > Patrick > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python _______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python