shading position in materialX

   1991   7   0
User Avatar
Member
23 posts
Joined: Sept. 2021
Offline
Hi
Is there a way to get the world position of the current shading point into materialX - like there is a node for the normal, but I can't find one for position. The geompropvalue only seems to read primvars.
I could create a primvar from the point positions in sops, but that wouldn't move with animation.

Thanks for your help.
User Avatar
Member
670 posts
Joined: Sept. 2013
Offline
MtlX position-node set to world?
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
23 posts
Joined: Sept. 2021
Offline
Oh boy, how could I have overlooked that! >_< Thanks!
User Avatar
Member
23 posts
Joined: Sept. 2021
Offline
While we're here: Is there a way then to get the ray origin (position of the camera)?
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
Use a Mtlx Dot node with the note set to "ray:P" or "ray:origin".

Don't forget to change the signature to vector 3
User Avatar
Member
23 posts
Joined: Sept. 2021
Offline
Oh wow, amazing. I did a quick search for that, but nothing came up - is that documented somewhere - like is there a list of other "hidden" parameters I can access with a dot?
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
marcosimonrbl
is that documented somewhere - like is there a list of other "hidden" parameters I can access with a dot?

I don't know. I only learned about it from another forum post by one of the devs.

https://www.sidefx.com/forum/topic/81927/#post-353073 [www.sidefx.com]
User Avatar
Staff
469 posts
Joined: May 2019
Offline
Its documented for XPU here
https://www.sidefx.com/docs/houdini/solaris/karma_xpu.html#summary [www.sidefx.com]
  • Quick Links