Jump to content

[Arnold] Point World/Pref in a shader


Recommended Posts

Does anyone know how to get Point World/Pref in a shader (not an AOV) in HtoA? I'm trying to make a worldspace height mask.
Embarrassingly I can get it fine using MayaSamplerInfo3D but it feels dirty (and presumably horribly unoptimised) to do it.
Thanks!
 
Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

For future reference (including for myself :)  ).

In sops (assuming stable point count), create a timeshift node and set the frame to the rest/reference frame.

Then create a rest sop, append an attribute rename and rename 'rest' to 'Pref'.

You can then bring that Pref attribute into the shader with a user_data_rgba - and plug it into the position sampling of your noises.

Also on the rop you can export the Pref aov.

-- In your shader there is also a utility vop that has a 'p' option, but that won't give you a reference/rest position.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...