Point Weight In SHOPs

   3734   7   1
User Avatar
Member
50 posts
Joined: Aug. 2009
Offline
How do I access the point weight attribute from geometry in a SHOP?

P is only a vector(3) and neither ‘Pw’, nor ‘weight’ or any other shorthand I can think of works.
User Avatar
Member
8619 posts
Joined: July 2007
Online
if your float attribute is called weight
then creating Parameter VOP with parameter name weight and type float will automatically bind to that attribute and will completely ignore value from UI
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
50 posts
Joined: Aug. 2009
Offline
Indeed, thanks, tamte. However, for reasons that are too complex to go into right now I'd like to use the built-in P attribute - the fourth component of position - in my SHOP, rather than a custom attribute. Do you know how to accomplish this?

Cheers,

AJB
User Avatar
Member
50 posts
Joined: Aug. 2009
Offline
Any devs care to chime in on this one?
User Avatar
Member
7754 posts
Joined: July 2005
Online
No, because these forums are community supported.

My guess is that Pw is never available because geometry is diced before shading.
User Avatar
Member
1192 posts
Joined: July 2005
Offline
You can access Pw in a VOP SOP and copy it in a custom attribute to read in your shader.
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
7754 posts
Joined: July 2005
Online
digitallysane
You can access Pw in a VOP SOP and copy it in a custom attribute to read in your shader.

If you go with the approach of copying the Pw out, then just use an AttribCreate SOP and put in $WEIGHT for the Value.
User Avatar
Member
50 posts
Joined: Aug. 2009
Offline
Yep, that's what I ended up going with. Can't think why we're not able to access the built-in Pw attribute, but nevermind.
  • Quick Links