How would I create the equivalent of a modo falloff in VEX to do the following:
I have a tube oriented vertically (along y axis).
I want to move points outward along normal direction according to a ramp that depends on the @P.y position, and then adjust the ramp.
I know it should be simple, but I must be missing a step in what I've tried. Thanks.
Equivalent of Modo's falloff
2233 5 1- Island
- Member
- 339 posts
- Joined: June 2017
- Offline
- Aizatulin
- Member
- 470 posts
- Joined: July 2005
- Offline
- Island
- Member
- 339 posts
- Joined: June 2017
- Offline
- Island
- Member
- 339 posts
- Joined: June 2017
- Offline
- toadstorm
- Member
- 359 posts
- Joined: April 2017
- Offline
When constructing vectors from variables, you can't use curly braces; you have to use the set() function. Also, you're binding the vector attribute v@outward, but later just referring to it as @outward... it's good practice to always use the v@ prefix for vector attributes. That said, unless you need that value bound as a point attribute, you could just create it as a local variable instead.
Also, you can't multiply a scalar (r) by a vector (outward). You can only multiply vectors by scalars.
Also, you can't multiply a scalar (r) by a vector (outward). You can only multiply vectors by scalars.
float u = relbbox(0, @P).y; float r = chramp("ramp", u); vector outward = set(@P.x, 0, @P.z); @P += outward * r;
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
- Island
- Member
- 339 posts
- Joined: June 2017
- Offline
-
- Quick Links