Offset points individually, depending on the normal.

   1944   2   0
User Avatar
Member
10 posts
Joined: April 2021
Offline
Hello, I have a question that I solved, but in a rather strange way.
I did this by copying new ones over the old points with offset by position.

Maybe there is an easy way to do this via vex. Or something else.

Attachments:
asdsd.jpg (703.2 KB)

User Avatar
Member
4520 posts
Joined: Feb. 2012
Offline
Hi,

If you already have normals, you can run this using a Point Wrangle (negative for moving inwards):

@P -= @N * ch("distance");

If the normal is not normalized, then normalize it also:

@P -= normalize ( @N ) * ch("distance");
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
User Avatar
Member
10 posts
Joined: April 2021
Offline
Thanks and help!
@P -= normalize ( @N ) * ch("distance");
working.
For one axis.

Added a second axis, and everything works as expected.

vector up = {0,1,0};
@P -= normalize ( @N ) * ch("distanceX");
@N = cross(@N,up);
@P -= normalize ( @N ) * ch("distanceY");
  • Quick Links