Jump to content
thatlookskool

Manipulating points with noise (vex)

Recommended Posts

Hey y'all, very new to Houdini here and I feel like i'm missing something obvious. So i'm trying to create a line of points to be later turned into a polyline. I'm not having to much trouble making a straight line, but i'm trying to manipulate the points with noise but it seems to only be changing the position of the points in a linear way. ie, they're only growing farther up, not really 'wandering' in other directions. Any help would be appreciated, thanks!

VEX

vector pos;
//vector rand;
vector growthpos = normalize(chv("growthposition"));
int numsteps= chi("numsteps");
vector wander = (noise(pos+1));
float wandermag = chf("wandermag");


    for(int i; i < numsteps; i++){
   
   pos = growthpos * i;
   pos = pos * (wander * wandermag) ;
   addpoint(geoself(), pos);
   }
 

Share this post


Link to post
Share on other sites

I figured out that for some reason noise just does not work as expected in a detail wrangle, as soon as I changed to an actual point wrangle it began to work. Anyone else experience this?

Share this post


Link to post
Share on other sites

the reason is that you are not updating the pos for your noise function, you simply generate one vector using noise and use for every iteration in the loop, which will always be linear

make sure you sample the noise every iteration using updated pos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×