Vex spline(): how to specify bezier curve control points?

   437   2   0
User Avatar
Member
208 posts
Joined: June 2023
Offline
I can't get spline() [www.sidefx.com] to work as a bezier curve no matter what parameters I pass to it:




I get either linear line or completely broken result. How to use it properly?
Edited by kodra - Jan. 9, 2024 06:41:24

Attachments:
Screenshot 2024-01-09 193941.png (477.5 KB)
Screenshot 2024-01-09 193955.png (507.4 KB)

User Avatar
Member
85 posts
Joined: May 2011
Offline
What are you trying to do ???
— dedeks 3000 —
User Avatar
Member
2041 posts
Joined: Sept. 2015
Offline
There's many ways to use the spline function, just need to look at the arguments of the function and see the relationship between the arguments of the function.

In this file the the second argument 'sample_pos' determines the resolution of the curve, the higher the number the smoother it gets with the conversion to polyline.(Houdini doesn't give a direct viewable spline through vex - like what you would get with the curve sop).

The other arguments:
vector SH = chv("start_handle");
vector EH = chv("end_handle");
vector Pt1 = chv("start_pt_position");
vector Pt2 = chv("end_pt_position");

Show the order(within the function) and their effect on the curve.

Attachments:
vex polyspline v1.hiplc (90.0 KB)

  • Quick Links