Jump to content
ydyd

Curve from two points and vectors

Recommended Posts

Hi everyone!

I'm new to Houdini and I'm having an issue I can't solve. I thought it would be easy, but after researching, I can't find a solution and would appreciate very much any help!

I have two points, each one with a vector (transferring the normals for a surface in this case) and I want to connect them by a curve the follows those vectors. I guess this should be a Bezier curve.
The idea would be that if the length of the vectors increase or decrease, then the curve would be adjusted.

Hope I can get some help. Thank you!

Curve from points with normals.png

Share this post


Link to post
Share on other sites
Posted (edited)

Polybridge SOP has a similar function but it works for polygon faces/edge groups.

One way you could achieve this effect is to use Add SOP to create a line between the points, resampling the line, and then using an attribute at each endpoint to nudge the intermediate points towards the vector directions. Attribute Blur/Smooth may also be useful here.

curve_from_point_vectors.hiplc

Edited by Fenolis
Attached sample file.
  • Like 2

Share this post


Link to post
Share on other sites

Hi,

there is also a VEX function called "spline", which can evaluate bsplines (equivalent to cubic bezier). Once you have the attributes on the points (surface position/normal), you can build the curve from these attributes. The spline function is quite similar to the resample subdivision result. Another VEX function which is quite helpful here to get the attributes from the surface is xyzdist().

curve_between_surfaces.hipnc

  • Like 2

Share this post


Link to post
Share on other sites

@Aizatulin and @Fenolis. Thank you so much for this, great to see both approaches to the problem. Both are great solutions and solved the issue!!

Really great for learning, and I definitely have to get into VEX

Thank you so much both :):):)

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

×