Question about NURBS and Curve.

   1195   9   0
User Avatar
Member
102 posts
Joined: June 2023
Offline
Can someone clarify the curves in Houdini for me?
1. If you draw a closed NURBS or convert a closed polygon to NURBS, the resulting NURBS will have an acute angle, as in the screenshot. But how to make a solid smooth curve like circle nurbs, for example? I read everything I could, but did not find the answer.
2. The help states that you can increase the weight of the control point of NURBS in the parameters, but I do not see this categorically in the Curve node. Where is this setting located?

Attachments:
nurbs.png (473.1 KB)

User Avatar
Member
273 posts
Joined: Nov. 2013
Offline
The curve node has a button "Close Selected Curves" but I couldn't get it to work. Whether or not a nurbs curve is closed however is controlled by a prim intrinsic attribute called 'closed', so you can always set it with a primitive wrangle afterwards:

setprimintrinsic(0, 'closed', @primnum, 1);

Note that if you're looking for a smooth shape you don't want to create overlapping start/end points.

The weights are controlled by an optional 'Pw' point attribute. Try something like this in a point wrangle:

f@Pw = random(@ptnum);

It doesn't look like the curve node currently has a mechanism for adjusting Pw though.
Edited by antc - Dec. 22, 2023 12:01:33
User Avatar
Member
102 posts
Joined: June 2023
Offline
The curve is closed using the button if you select all the points or at least the extreme points. The screenshot shows just a closed curve.
I need a smooth closed NURBS. If we have such NURBS in the form of a circle, then it is possible, right? But how, Holmes? I tried to find the difference in attributes in the nurbs circle and my curve and I don’t see it. But the circle is closed and smooth, but my curves are not.
The help says verbatim:
"Change the weight of a selected CV via the Curve > Parameters dialog in the Model Editor to something high like 10,000."

Where is it, SideFx?
By the way, does anyone know how to call the scale handle in the curve node? It's funny that in the settings there is a step adjustment for the scale handle, but there is no handle itself.
SideFx, did you forget to do it? Or is this a bug? Or do we not understand your logic?
User Avatar
Member
8567 posts
Joined: July 2007
Online
There ase some previous threads for this issue, see if it's helpful

https://www.sidefx.com/forum/topic/61602/ [www.sidefx.com]
https://www.sidefx.com/forum/topic/90769/ [www.sidefx.com]
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
102 posts
Joined: June 2023
Offline
Oh my God, Thomas, thank you! I would never have guessed! It’s so Houdini style to create an incredible and unnecessary puzzle out of the blue.
So, to help others, you need to add 2 nodes after the Curve node - 1) “Ends” and specify “Unclamp” in U. The curve will be smoothed out, but will be incorrect. 2) Spline Basis and specify the Uniform parameterization. Now it's right.
The person who solved this riddle is clearly a genius.
A great unanswered question is why this isn't built into Curve right away.

All that remains is to find “weight of a selected CV via the Curve > Parameters dialog in the Model Editor” so as not to write a wrangle.
User Avatar
Member
212 posts
Joined: June 2023
Online
Could someone elaborate it a bit on why it works?

It seems like Spline Basis changes intrinsic:knots... which is, uh...

https://en.wikipedia.org/wiki/Non-uniform_rational_B-spline#Knot_vector [en.wikipedia.org]
Edited by kodra - Dec. 22, 2023 17:03:41
User Avatar
Member
181 posts
Joined: Aug. 2018
Online
The Jedi master reminds us: the price of power is complexity : )

Fraser Shiers from Hipflask has a series of videos on NURBS parameterisation on his paid courses, but here are a few freee videos from him talking about NURBS curve parameterization that might be helpful:

https://youtu.be/laSOxJlEIJI?si=i29PEPov6Kjwa79s [youtu.be]

https://youtu.be/urqK40niSWE?si=LITtXzU3035mAUEu [youtu.be]
Edited by Mike_A - Dec. 22, 2023 18:24:08
User Avatar
Member
212 posts
Joined: June 2023
Online
Mike_A
The Jedi master reminds us: the price of power is complexity : )

Fraser Shiers from Hipflask has a series of videos on NURBS parameterisation on his paid courses, but here are a few freee videos from him talking about NURBS curve parameterization that might be helpful:

https://youtu.be/laSOxJlEIJI?si=i29PEPov6Kjwa79s [youtu.be]

https://youtu.be/urqK40niSWE?si=LITtXzU3035mAUEu [youtu.be]

I actually purchased and watched his course before. As far as I remember he didn't even mention the idea of "knots", which is what Spline Basis affects.

It's not his fault tho, cause in most cases knots are automatically handled, and you can pretend they don't exist... it's quite surprising that the pipes come out the floor for such a simple use case (smoothing a closed curve).

A more intuitive solution is Ends SOP (Open U) then Ends SOP again (Close Rounded). But to my surprise, this doesn't produce the identical result with Spline Basis (uniform).
Edited by kodra - Dec. 22, 2023 18:49:53

Attachments:
Screenshot 2023-12-23 074849.png (23.5 KB)

User Avatar
Member
85 posts
Joined: May 2011
Offline
Circle SOP ???
— dedeks 3000 —
User Avatar
Member
273 posts
Joined: Nov. 2013
Offline
kodra
Could someone elaborate it a bit on why it works?

It seems like Spline Basis changes intrinsic:knots... which is, uh...

Under the hood nurbs curves are constructed from a series of overlapping smoothly changing basis functions. The knot values define where these functions start and stop relative to each other. There's lots of info out there on nurbs curves but it's usually pretty technical. This [computergraphics.stackexchange.com] stack exchange post and also this [computergraphics.stackexchange.com] one at least have some nice images of the basis functions.

Knots aren't particularly intuitive or fun to manipulate manually so most tools try to take care of them behind the scenes. I think the bug here is that the curve tool doesn't adjust the knots when closing a nurbs curve. Right now it looks like it's intended for poly lines only maybe.
  • Quick Links