Transfer Attributes with Normal Direction
1195 2 1- tinyT
- Member
- 48 posts
- Joined: Aug. 2015
- Offline
How can I transfer attributes from a normal direction. For example, if I draw a line on a grid and have the normals pointing off to one side of the line, then how can I tranfer attributes from the line to the grid on the side that the normals are facing? I hope that makes sense, I've attached an image as an example. I'm thinking maybe a dot product?
- MandarDD
- Member
- 5 posts
- Joined: May 2021
- Offline
- animatrix_
- Member
- 4685 posts
- Joined: Feb. 2012
- Offline
Hi,
You can create a mask using the dot product and then use that mask after attribute transfer to tweak the result:
Mask by Normal (Point Wrangle):
Apply Mask (Point Wrangle):
near pos (Point Wrangle):
You can create a mask using the dot product and then use that mask after attribute transfer to tweak the result:
Mask by Normal (Point Wrangle):
vector n = normalize ( @P - v@pos ); float d = dot ( n, normalize ( v@dir ) ); @mask = fit ( d, ch("min"), ch("max"), 0, 1 );
Apply Mask (Point Wrangle):
@near *= @mask;
near pos (Point Wrangle):
@near = 1; v@pos = @P;
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
-
- Quick Links