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!

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.
• 2

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

• 2

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 on other sites

There are also some interesting methods here:

• 1

Share on other sites
Posted (edited)

Well, this was a fun exercise:

Edited by eikonoklastes
• 2

Share on other sites

thank you @eikonoklastes! This is great!

Create an account

Register a new account