Jump to content

Resample curve by width/pscale


Recommended Posts

Anyone know of a simple way to resample a curve by pscale/width attribute - or perhaps another way to space hulls in a sweep or alike by pscale/width so lower numbers will yield higher sampling..?

And the idea is to get more square'ish quads for a setup like this, procedurally... :)



Link to comment
Share on other sites

Man, you are brilliant with VEX. Much appreciated.

Here's the direction I went - no clue how I came up with it, my brain is just auto-piloting most of the time, it's more reaction that action - not even kidding. Now, there is a relation to be set up between the pscale, the resample segment amount and the fit min/max to get this working "right" - though so far I have no clue what that formula is, but I'm pretty sure it's there, somewhere...



  • Like 1
Link to comment
Share on other sites

Yeah, I will put this down on paper and see if I can straighten out the relationship, and it's of course based on circumference divided by segments to get the polywire, but with my current solution, I need to resample the curve to fit the overall divisions first, then delete any other points than the segment ones - it's kinda messy, to say the least.  I have a new idea for doing this using a carve in a for loop to generate the points fed into an add SOP to recreate the curve, much cleaner, but I'll dig into that tomorrow - at the earliest.

And just to be clear, if I was in production and had this issue, I'd go for your setup in a second, but as it's more generic, playing around with problem solving (the kinda stuff in the scene files I usually post on Vimeo), so I really want to find something that's easy for ppl to wrap their head around. :)

Link to comment
Share on other sites

Oh, that's really cool, Dave. That's truly my kinda hacktastic solution. :D

And the Facebook thread on this generated talk about doing this in CHOPs, so hoping for a scene file on that today or tomorrow, then I'm gonna compile the solutions into a list and zip the files for download (or collect them in a single scene file) - always great to be able to look at a different solutions for a problem, see how different people approach it.

Link to comment
Share on other sites

Absolutely. The differential curve growth thread is a great example on that as well.

And there's a lot more on this subject on the Houdini group at Facebook, in a way kinda sad the know how is so fragmented now, with the Facebook group and the Discord chat/community - forums are truly the best way to do this kinda thing, imo, as Wiki's are the best way to organize and present information - Facebook and Discord is more about the moment, not some great solution from 2 years ago, as I find at OD Force all the time.

Link to comment
Share on other sites

  • 4 months later...

These are great, i had to register to download these examples but id already figured it out based on Daves comments.

not very good with VEX so this is done with a relax node and a resample before and after followed by moving the points back to a saved rest point like Dave did. this solution is nice cause i can 'paint' detail in a way... needed it for the below example where i wanted more resolution in a specific area we where the camera would be focusing!

thanks everyone for the tips!



Edited by LorcanOS
Link to comment
Share on other sites

  • 2 months later...

Funny enough, this was again asked in the Houdini Artists Facebook group and I had completely forgot about asking this back in April... Either way, here's two other SOP based solutions to this problem, the second one a bit of a joke, of course - though I have no doubt that method can be useful for some things as well... :D

v1: https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu

v2: https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu

Link to comment
Share on other sites

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.

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