Krion Posted November 15, 2022 Share Posted November 15, 2022 (edited) Hi guys! Is it possible to have imitate the Resample SOP in VEX? I basically want to do the last step of this tutorial (see 07:20) entirely in VEX, so that it generates the array of proper vector positions from the 5 'control point' vectors. (so I could potentially make a polyline from there as well with addpoint and addprim then if I wanted to) Thanks in advance Edited November 15, 2022 by Krion Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 15, 2022 Share Posted November 15, 2022 Hi @Krion, the spline()-function can do this: https://www.sidefx.com/docs/houdini/vex/functions/spline.html 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted November 18, 2022 Author Share Posted November 18, 2022 On 15/11/2022 at 4:01 PM, konstantin magnus said: Hi @Krion, the spline()-function can do this: https://www.sidefx.com/docs/houdini/vex/functions/spline.html Great, tested and worked. Any idea maybe on how to get an uniform distribution? Resample VEX.v1.hiplc Quote Link to comment Share on other sites More sharing options...
Librarian Posted November 18, 2022 Share Posted November 18, 2022 (edited) v[]@pos; vector posStart = point(1,"P",0); append(v[]@pos,posStart); for(int i = 16; i < npoints(1)-16; i++){ vector tempP = point(1,"P",i); append(v[]@pos,tempP); } vector posEnd = point(1,"P",npoints(1)-1); append(v[]@pos,posEnd); //create spline int its = chi("iterations"); for(int i = 0; i <= its; i++){ vector tempP = spline("linear",(float)i/(float)its,v[]@pos); int newPt = addpoint(0,tempP); } int val = 20; for (int i = 0; i<= val; i++){ vector temP = spline('linear',(float)i/(float)val,{0,0,0},{0,0,5},{0,0,10}); int newPt = addpoint(0,temP); } + you have here FeELib-for-Houdini just search on Google (something Like Q-lib for Houdini endless ex and Files Edited November 18, 2022 by Librarian 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.