Jump to content

Recommended Posts

There are several ways of doing it

This one in particular uses the point number to control the width

nmqhH1N.png

 

The polywire is the default one, just put "$WIDTH" in the "wire radius" option. The function "npoints" just returns the amount of points in some geometry, in this case, the first input (designated by the 0 there). The "(float)" part is just because Houdini wasn't being nice with the division without it 

 

 

 

  • Like 3
Link to comment
Share on other sites

This is how I usually do it:

UVtexture in row/column mode to create a uv value (on points for this usecase) along the curve and then a pointwrangle to create a Base_Width value and a Width_Ramp for the tapering. I also put in a colour gradient using the same technique:

TaperCurve.jpg

 

EDIT 2019: Since somebody recently found this useful: These days I use UV-Texture in "Arc Length Spline" mode on points instead of row/column mode. Seems to give more precise positions in some cases.
Also, if you write the code as:

// Thickness along Curve using @uv.x:
f@pscale = f@width = chramp('Width_Curve', @uv.x) * chf('Base_Width');

// Colour along Curve. The "vector" creates a colour ramp automatically!
@Cd = vector(chramp('Gradient', @uv.x));

This way, a.) "pscale" and "width" are both set in one go. For the viewport (Geo Node -> Misc -> "Shade Open Curves in Viewport") Houdini uses "width", while everything else mostly needs "pscale" and b.) if you enclose a chramp() with a "vector()", you will get a colour ramp right away without having to go to the parameter interface editor... :-)

Cheers,

Tom

FIND_POINTS_CURVE_Tom.hiplc

Edited by Thomas Helzle
  • Like 3
Link to comment
Share on other sites

9 hours ago, vtrvtr said:

There are several ways of doing it

This one in particular uses the point number to control the width

nmqhH1N.png

 

The polywire is the default one, just put "$WIDTH" in the "wire radius" option. The function "npoints" just returns the amount of points in some geometry, in this case, the first input (designated by the 0 there). The "(float)" part is just because Houdini wasn't being nice with the division without it 

 

 

 

Thanks for help, really appreciate it :) this is a great option.  nice 1  

Link to comment
Share on other sites

9 hours ago, Thomas Helzle said:

This is how I usually do it:

UVtexture in row/column mode to create a uv value (on points for this usecase) along the curve and then a pointwrangle to create a Base_Width value and a Width_Ramp for the tapering. I also put in a colour gradient using the same technique:

TaperCurve.jpg

Cheers,

Tom

FIND_POINTS_CURVE_Tom.hiplc

Thanks Tom 

This is exactly what i was looking for !  Amazing :)  

Link to comment
Share on other sites

1 hour ago, samvac said:

Thanks Tom 

This is exactly what i was looking for !  Amazing :)  

 

1 hour ago, samvac said:

Thanks for help, really appreciate it :) this is a great option.  nice 1  

 

11 hours ago, Thomas Helzle said:

This is how I usually do it:

UVtexture in row/column mode to create a uv value (on points for this usecase) along the curve and then a pointwrangle to create a Base_Width value and a Width_Ramp for the tapering. I also put in a colour gradient using the same technique:

TaperCurve.jpg

Cheers,

Tom

FIND_POINTS_CURVE_Tom.hiplc

Can i ask you, how you started out learning vex / code  ? I'm really keen to learn but seems quite daunting !

Link to comment
Share on other sites

I only started last September with Houdini but I do 3D for 20+ years, so YMMV.

I found the Entagma videos very helpful to get into VEX, they are clear and to the point and explain what they are doing and why. Start with the old ones though, newer ones assume more.
With learning coding as such I can't help much, since I started so long ago, that my meandering path through Amiga shell scripts, Visual Basic, C.O.F.F.E.E., C, Actionscript, C++, Javascript, Processing etc. isn't really something that would help you. Basically I would say, learn one language halfways well to get into the basic thinking of programming but don't get stuck. From there, learning a new one is more about syntax and structure, the basic thinking is the same.
VEX is okay to start with. It's rather close to the overall syntax standard of many languages with only some smaller things being unusual. So if nothing else tickles your interest, go with it, play around, make a lot of errors, hunt bugs for days on end, get annoyed like hell, then solve it anyway. ;-)

Nodes are awesome, but I really love how Houdini allows to interweave Nodes and Code, since some things are done so much more to the point with some lines of code. You can see that especially well in VOPs, where even the most trivial stuff becomes a huge pile of nodes fast...

And: Don't see it as daunting. Just start somewhere and if you love what you are doing, it will come with time.

Cheers!

Tom

Edited by Thomas Helzle
  • Like 1
Link to comment
Share on other sites

10 hours ago, Thomas Helzle said:

I only started last September with Houdini but I do 3D for 20+ years, so YMMV.

I found the Entagma videos very helpful to get into VEX, they are clear and to the point and explain what they are doing and why. Start with the old ones though, newer ones assume more.
With learning coding as such I can't help much, since I started so long ago, that my meandering path through Amiga shell scripts, Visual Basic, C.O.F.F.E.E., C, Actionscript, C++, Javascript, Processing etc. isn't really something that would help you. Basically I would say, learn one language halfways well to get into the basic thinking of programming but don't get stuck. From there, learning a new one is more about syntax and structure, the basic thinking is the same.
VEX is okay to start with. It's rather close to the overall syntax standard of many languages with only some smaller things being unusual. So if nothing else tickles your interest, go with it, play around, make a lot of errors, hunt bugs for days on end, get annoyed like hell, then solve it anyway. ;-)

Nodes are awesome, but I really love how Houdini allows to interweave Nodes and Code, since some things are done so much more to the point with some lines of code. You can see that especially well in VOPs, where even the most trivial stuff becomes a huge pile of nodes fast...

And: Don't see it as daunting. Just start somewhere and if you love what you are doing, it will come with time.

Cheers!

Tom

Thanks for the info Tom, Im looking forward to digging deeper in vex.  

take is easy 

sam

Link to comment
Share on other sites

Thanks Sam :-)

Yeah, it's a similar setup, but the shader is derived from this thread:

Where MENOZ showed a way to render curves very very fast. I extended his shader in the meantime a bit to also cater to points and I always use it when I want a more "graphic" look without actual 3D shading. It's a great basis for experimentation with very reduced shading.

I work with shortest walk (Grasshopper) and shortest path (Houdini) for quite a while now and really love what it allows me to do. This tutorial by Animatrix recently opened my eyes on how to be able to do even more "directable" paths by simply painting them in: 

 

Although I usually use a convert node instead of resampling, since I prefer using NURBS curves and love their smoother look (and you can render them directly as well in Mantra).

Cheers,

Tom

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

i have to ask on this - i've been away from hou for a while but i seem to remember most people doing this via a vop like a pointvop maybe?  I cant for the life of me find out how to do this and each way i try seems to fall over in H16 - am i doing something wrong here?  Everything just seems to go towards wrangling now and its getting bloody frustrating for me as i'm really struggling to get through the syntax ?

anyone got any links to setting it up via vop method?

Link to comment
Share on other sites

  • 3 months later...

can anyone tell me how to use this same trick with height in the mountain SOP please? I'm bashing my head off a wall here again - i figured i could adjust the wrangle for height instead of width but nope :/

sussed it - needed to plug a uv texture in with rows/columns.. pic for anyone interested!  so with this setup my mountain node width is controlled to the middle part of the curve with falloff.

Capture.thumb.JPG.b8946cd3a45c3809ed93996a41d1ec72.JPG

Edited by anthonymcgrath
Link to comment
Share on other sites

  • 8 months later...

You give the response. It doesn't work because your curves are composed from separate primitive.
In the original setup each curve is a unique primitive, and all the "u calculations" can be done over the complete curves. Not in your setup.

Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...