bhaveshpandey Posted September 10, 2009 Share Posted September 10, 2009 (edited) I'm trying to write a VEX script which would apply noise to a geometry using a for loop.. basically what I intend to do is to Layer the noise affecting a geometry using its Point numbers as counters in the FOR loop and multiplying it with a Amplitude gain and Frequency gain parameter so that its increasing/decreasing for every iteration (which would thus give me good layer of noise applied on top of each other to a geometry. here's my scrip so far: float amp, freq, again, fgain, sum; int i; for(i=0; i<npts; i++) { float noise; float AMP; float FREQ; float AMP= amp*again; float FREQ=freq*fgain; noise= AMP* noise(FREQ*P); sum+= noise; } Sop Sop1(amp=0.5, freq=2, again=o.5, fgain=0.5) { sum; } I have declared the variables etc..but i'm getting a syntax error in the first line..but I cant see anything wrong with it?? Also I'm not sure of how to execute it in the sop level...so just to check I just called it in the SOP level..but I'm not really sure about it.... could someone help me with this.. Thanks. PS: here's a .vfl file EDIT: ERR...I'm sorry I sort of started 2 new threads by mistake..Please ignore/delete this thread..my bad noiseterrain.vfl Edited September 10, 2009 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.