Obviously @P is a point attribute, not a primitive attribute. However, it still has value when I iterate over primitives. How is this value calculated? And does it always work the same way for any attribute, or @P is a special case?
The value of point attribute when running over primitives?
954 3 0-
- raincole
- Member
- 696 posts
- Joined: 8月 2019
- オフライン
-
- animatrix_
- Member
- 5137 posts
- Joined: 2月 2012
- オフライン
@P is normally a point attribute, but in a Primitive Wrangle, Houdini binds it to the centroid of the primitive — the average of its points’ positions. It's a special case. Other attributes like @Cd or @N won’t behave this way.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- raincole
- Member
- 696 posts
- Joined: 8月 2019
- オフライン
animatrix_
@P is normally a point attribute, but in a Primitive Wrangle, Houdini binds it to the centroid of the primitive — the average of its points’ positions. It's a special case. Other attributes like @Cd or @N won’t behave this way.
@N seems to be a special case as well? I run a Primitive Wrangle and access @N. Surprisingly it has value, even the geometry doesn't have a primitive attribute called N.
-
- animatrix_
- Member
- 5137 posts
- Joined: 2月 2012
- オフライン
Yeah, @N is special in its own way, but in a different way. It gives you the geometric normal of the primitive, not the average of any point normals. So even if there's no N attribute, Houdini still provides it based on the primitive's shape.
That's what I meant by @Cd, @N and other attributes won't give you the same result, i.e. the average of the same attribute for all the points of the primitive.
That's what I meant by @Cd, @N and other attributes won't give you the same result, i.e. the average of the same attribute for all the points of the primitive.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
-
- Quick Links

