Point Position P pass Exporting Incorrectly out of Mantra

   12414   7   2
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
For some reason when I import the P (world position pass) into Nuke, it imports directly onto the negative Z axis every time, no matter where in the scene the object is. No matter the scene, no matter the object.

I've tested this with Mental Ray Vray and Arnold and all three renderers put it in the right place in Nuke's 3D scene (lining up with the object in the camera view). \

Why isn't the World Point Position Pass transferring to Nuke while the alembic files export to the right location?

Here's what I get in nuke with Houdini's Mantra.

THANKS!!

Attachments:
Screenshot-11.png (74.2 KB)
Screenshot-12.png (178.8 KB)
Screenshot-13.png (232.7 KB)

http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Mantra is exporting P in camera space. You can use Vops to transform P from space:current to space:world and export that.
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
Thanks for the quick reply. That makes sense. I'm researching on the docs and forums but can't seem to find out how this is done.

How can you export the new P parameter from Vops to the mantra AOV (extra image plane)?

I assume P is being created from the material so each material would then have to transform P from camera space to world space and export that variable (somehow) back to the AOVs through a Parm node or something?)

Do you have to do it on a per object/per material basis or is there a global way for everything in the scene to do it?

THANKS!

Attachments:
Screenshot-14.png (53.9 KB)

http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Member
4189 posts
Joined: June 2012
Offline
All sounds correct. Create an export parameter in each shader. in the example attached the world position Aov is called ‘P_World’

Nuke, Houdini, .abc and exr files in the .Zip file

Attachments:
Nuke PointToPostion and exported geo..png (125.8 KB)
Vop Camera to World space.png (33.4 KB)
Aov Image plane.png (40.4 KB)
P_World.zip (150.7 KB)

User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Also I suggest you to use Deep Compositing , It' so powerful.
Houdini and Nuke have good relationship for Deep Compositing with exr2 format :idea:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
65 posts
Joined: Feb. 2013
Offline
Wow, great help Marty!
Thank you very much!!!
User Avatar
Member
43 posts
Joined: Aug. 2012
Offline
Thanks! Makes perfect sense. Thank you so much for your time and your help. It means a lot.
http://vimeo.com/garretthoyos/demoreel [vimeo.com]

http://animation.byu.edu/ [animation.byu.edu]
User Avatar
Member
1 posts
Joined: Jan. 2019
Offline
I was going crazy with this and I didn't have time to rerender just to do a relight in Nuke, so I just placed the camera at the origin and swapped z in the position channels on the render.

set cut_paste_input
version 11.3 v6
push $cut_paste_input
add_layer {P P.red P.green P.blue P.x P.y P.z}
Expression {
channel0 {P.red -P.green -P.blue none}
expr0 P.x
channel1 {-P.red P.green -P.blue none}
expr1 P.y
channel2 {-P.red -P.green P.blue none}
expr2 -P.z
name Expression1
selected true
xpos -1164
ypos -1370
}

To get back into worldspace, I just did a transformGeo of the entire scene back to the original camera coordinates.
  • Quick Links