Resample a Curve with a Ramp
7581 11 4-
- gekkonier
- Member
- 10 posts
- Joined: Dec. 2010
- Offline
Hi,
this is my very first post here in the forums. I've installed Houdini Apprentice and started playing around (finally, after a few years) and I must say I'm really, really impressed with the possibilities it offers and now I've only scratched on the surface. I'm playing with Blender and MODO as a hobby and would like to dive into procedural modeling. Its amazing!
Now I'm trying to resample a curve.
What I got:
A Polycurve -> Convert(to nurbs) -> Resample
Here I would like to use a float ramp to drive the “Length” parameter of the Resample node. I bet it's possible, but I don't know how.
Thank you all for your kind help, Gregor
this is my very first post here in the forums. I've installed Houdini Apprentice and started playing around (finally, after a few years) and I must say I'm really, really impressed with the possibilities it offers and now I've only scratched on the surface. I'm playing with Blender and MODO as a hobby and would like to dive into procedural modeling. Its amazing!
Now I'm trying to resample a curve.
What I got:
A Polycurve -> Convert(to nurbs) -> Resample
Here I would like to use a float ramp to drive the “Length” parameter of the Resample node. I bet it's possible, but I don't know how.
Thank you all for your kind help, Gregor
-
- goldfarb
- Staff
- 3458 posts
- Joined: July 2005
- Offline
-
- gekkonier
- Member
- 10 posts
- Joined: Dec. 2010
- Offline
Thank you for your hint, you are right, the length parameter seems not be useable for that. I will take a look at the suggested scatter SOP.
Maybe I can try to “travel” along the curve and generate after a distance points. Something like that.
Fascinating software. Thank you for provide an apprentice version. I think after getting something done I will switch to indie.
Maybe I can try to “travel” along the curve and generate after a distance points. Something like that.
Fascinating software. Thank you for provide an apprentice version. I think after getting something done I will switch to indie.
-
- animatrix_
- Member
- 4609 posts
- Joined: Feb. 2012
- Online
I think ndickson had a tool that adaptively resamples a curve, so it could be adapted to use a ramp too.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
![](http://imgur.com/fY0VxdV.png)
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
![](http://imgur.com/fY0VxdV.png)
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
-
- Dennis Weil
- Member
- 150 posts
- Joined: May 2011
- Offline
I have an otl which does not do exactly what you want but might still be sufficient for your usecase. It does not generate the points based on a length, but it uses existing points and shifts them along the path according to a ramp or a channel (for additional control).
It's a little bit weird to use, but it is just remapping the old position to the new position. When using the channel mode the horizontal range is 0-1 while vertically you can use as much as you need as it is remapped automatically.
Unfortunately it only works well with polylines for now so you have to convert to NURBS -> Resample -> Pointshifter
Cheers,
Dennis
It's a little bit weird to use, but it is just remapping the old position to the new position. When using the channel mode the horizontal range is 0-1 while vertically you can use as much as you need as it is remapped automatically.
Unfortunately it only works well with polylines for now so you have to convert to NURBS -> Resample -> Pointshifter
Cheers,
Dennis
-
- gekkonier
- Member
- 10 posts
- Joined: Dec. 2010
- Offline
-
- Farmfield
- Member
- 65 posts
- Joined: Sept. 2014
- Offline
Someone posted a question about this in the Houdini ARtists group on Facebook and I found this thread looking for a better solution - but here's one way…
https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu [drive.google.com]
But there's gotta be something even more simple, like really simple - there almost always is.
https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu [drive.google.com]
But there's gotta be something even more simple, like really simple - there almost always is.
![](/static/djangobb_forum/img/smilies/smile.png)
-
- anon_user_40689665
- Member
- 648 posts
- Joined: July 2005
- Offline
-
- anon_user_00157425
- Member
- 45 posts
- Joined: Feb. 2014
- Offline
-
- Aizatulin
- Member
- 486 posts
- Joined: July 2005
- Offline
Hi,
I've tried to create a very minimalistic ramp based resample wrangle.
First you apply the normal resample operator on the curve. After this you have uniform distributed points along the curve (point distances to neighbours on the curve are equal - which is the same for the u-coordinates).
Now if you want to have another distribution (which is non-deacreasing function to (0,1)), if its inverse exists, this will be the function you have to apply to make the points distributed this way.
In short words: make sure that the ramp is non-decreasing function (from (0,1) to (0,1) default).
My example is similar to to example from cpd, but without doing coloring stuff or something.
@Bishop
I haven't understand, how your example works, because your function seems to be a density function.
I have no idea to use a density function efficiently, since u have to integrate it and calculate its inverse, but perhaps there is nice solution to do that.
I've tried to create a very minimalistic ramp based resample wrangle.
First you apply the normal resample operator on the curve. After this you have uniform distributed points along the curve (point distances to neighbours on the curve are equal - which is the same for the u-coordinates).
Now if you want to have another distribution (which is non-deacreasing function to (0,1)), if its inverse exists, this will be the function you have to apply to make the points distributed this way.
In short words: make sure that the ramp is non-decreasing function (from (0,1) to (0,1) default).
My example is similar to to example from cpd, but without doing coloring stuff or something.
@Bishop
I haven't understand, how your example works, because your function seems to be a density function.
I have no idea to use a density function efficiently, since u have to integrate it and calculate its inverse, but perhaps there is nice solution to do that.
Edited by Aizatulin - Nov. 12, 2017 03:35:00
-
- anon_user_00157425
- Member
- 45 posts
- Joined: Feb. 2014
- Offline
-
- Aizatulin
- Member
- 486 posts
- Joined: July 2005
- Offline
-
- Quick Links