samvac Posted January 8, 2017 Share Posted January 8, 2017 Hi Hope all is well, I have matra rendering curves using attribute create width, but i was wondering is there a way to have the lines taper towards the ends ? any help would be amazing. Thanks for your time Sam FIND_POINTS_CURVE.hipnc Quote Link to comment Share on other sites More sharing options...
vtrvtr Posted January 8, 2017 Share Posted January 8, 2017 There are several ways of doing it This one in particular uses the point number to control the width 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 3 Quote Link to comment Share on other sites More sharing options...
Thomas Helzle Posted January 8, 2017 Share Posted January 8, 2017 (edited) 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: 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 May 16, 2019 by Thomas Helzle 3 Quote Link to comment Share on other sites More sharing options...
samvac Posted January 9, 2017 Author Share Posted January 9, 2017 9 hours ago, vtrvtr said: There are several ways of doing it This one in particular uses the point number to control the width 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 Quote Link to comment Share on other sites More sharing options...
samvac Posted January 9, 2017 Author Share Posted January 9, 2017 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: Cheers, Tom FIND_POINTS_CURVE_Tom.hiplc Thanks Tom This is exactly what i was looking for ! Amazing Quote Link to comment Share on other sites More sharing options...
samvac Posted January 9, 2017 Author Share Posted January 9, 2017 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: 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 ! Quote Link to comment Share on other sites More sharing options...
Thomas Helzle Posted January 9, 2017 Share Posted January 9, 2017 (edited) 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 January 9, 2017 by Thomas Helzle 1 Quote Link to comment Share on other sites More sharing options...
samvac Posted January 9, 2017 Author Share Posted January 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
samvac Posted January 11, 2017 Author Share Posted January 11, 2017 Hey Tom, Saw your render on twitter, looks great did you use the setup we have been discussing, its so addictive ! Im producing some nice images I'll up load for you to have a look at Nice 1 sam Quote Link to comment Share on other sites More sharing options...
Thomas Helzle Posted January 11, 2017 Share Posted January 11, 2017 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 2 Quote Link to comment Share on other sites More sharing options...
samvac Posted January 13, 2017 Author Share Posted January 13, 2017 Quality Love that setup ! thanks for the share ! Quote Link to comment Share on other sites More sharing options...
anthonymcgrath Posted April 2, 2018 Share Posted April 2, 2018 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? Quote Link to comment Share on other sites More sharing options...
anthonymcgrath Posted July 11, 2018 Share Posted July 11, 2018 (edited) 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. Edited July 11, 2018 by anthonymcgrath Quote Link to comment Share on other sites More sharing options...
Alexandre Posted April 2, 2019 Share Posted April 2, 2019 Hi everyone ! reopening the topic because I am trying to do exactly the same thing but the gradient is repeating over and over each section, can someone help me to figure out where I make a mistake ? Thanks Alex colonization_growth.hiplc Quote Link to comment Share on other sites More sharing options...
flcc Posted April 2, 2019 Share Posted April 2, 2019 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. Quote Link to comment Share on other sites More sharing options...
Alexandre Posted April 3, 2019 Share Posted April 3, 2019 Ohh I see... thanks Quote Link to comment Share on other sites More sharing options...
TheDude123 Posted May 21, 2019 Share Posted May 21, 2019 Hi, Great info in this thread! So how would one go about tapering BOTH ends of the curve? The result would look something like: thin, thick, thin. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.