Most renderers write Z as orthogonal distance to the (extended) cameraplane, instead of the actual distance between the pixel position and camera center point. Is your perceived difference greater toward the image edges?

eetu.


On 13.5.2013 16:36, Steve Newbold wrote:
Pixel perfect compared to what?  A depth pass from the same render as
the world position pass?

How far off are your values?  Can it be put down to rounding of the
camera position from your 3D package or rounding on the pass values.  Is
your depth pass 32bit float?  Other things to check are premultiplcation
of the position pass from the renderer.

Steve


On 13/05/13 14:26, Simon Björk wrote:
Hi all,

I'm looking for a way to accurately converting a point position pass
(world space) to a depth pass (camera space). I have a camera available.

The following expression gets me close but not pixel perfect:

set cut_paste_input [stack 0]
version 7.0 v4
push $cut_paste_input
Expression {
 temp_name0 cx
 temp_expr0 shot_camera.translate.x-r
 temp_name1 cy
 temp_expr1 shot_camera.translate.y-g
 temp_name2 cz
 temp_expr2 shot_camera.translate.z-b
 temp_name3 dist
 temp_expr3 sqrt(cx*cx+cy*cy+cz*cz)
 channel0 rgba
 expr0 dist
 channel1 none
 name Expression7
 label "convert p world to z-depth"
 selected true
 xpos 266
 ypos -50
}



_______________________________________________
Nuke-users mailing list
[email protected],http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users



_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to