ekan de Posted December 11, 2017 Share Posted December 11, 2017 Im trying to deform a curve with vex. I want to deform it with a sin function. Kinda rookie on vex but i thought this would work. I create a curve with just a start and end point. Resample it to say 50 points. Add a attributeWrangle and add this vex code: @P.y = sin(@P.y * 500) * 0.1; I get no errors in the code but i dont get any result at all either. Anyone got any clue? I tested alot of different numbers just to make sure it wasnt the size of the sin curve but i get nothing. Quote Link to comment Share on other sites More sharing options...
Sepu Posted December 11, 2017 Share Posted December 11, 2017 take a look at this http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Rotate_a_single_point_with_sin_and_cos Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 11, 2017 Share Posted December 11, 2017 (edited) 19 minutes ago, ekan de said: Add a attributeWrangle and add this vex code: @P.y = sin(@P.y * 500) * 0.1; assuming your line is by default in Y direction, straight up...(and why bother with resampling, in Line just say 50 points) then it would make better sense if you perturb the X direction @P.x = sin(@P.y * 2) * 0.1; and 500 in houdini is huge, innit ? ahh, sorry that's freq...doesn't matter.. Still, nothing wrong with you moving in Y direction...now you're just adjusting the point distribution along Y axis that's all.. Edited December 11, 2017 by Noobini Quote Link to comment Share on other sites More sharing options...
ekan de Posted December 11, 2017 Author Share Posted December 11, 2017 Sorry. the curve is in x axis on the grid. i made a typo here on the forum. This is what i write in vex: @P.y = sin(@P.y * 2) * 0.1; 500 was just an example. i have tried everything from 0.1 to much much higher than 500. Im using H16.0.5. So it should work? Took a glance at the link Sepu posted but need a bit more time to dig deeper and read more. curveSine.hipnc Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 11, 2017 Share Posted December 11, 2017 (edited) then use @P.y = sin(@P.x * 2) * 0.1; because your variable, the thing that changes incrementally...is in X.....not Y Edited December 11, 2017 by Noobini Quote Link to comment Share on other sites More sharing options...
Sepu Posted December 11, 2017 Share Posted December 11, 2017 If you read "matt wiki" you will understand why it isn't working. its maybe 10 min. Go ahead and read and understand what is going on. 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.