Farmfield Posted April 4, 2017 Share Posted April 4, 2017 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... resample.hiplc Quote Link to comment Share on other sites More sharing options...
petz Posted April 4, 2017 Share Posted April 4, 2017 (edited) attached is one way how you can do this ... hth. petz resample1.hiplc Edited April 4, 2017 by petz 6 Quote Link to comment Share on other sites More sharing options...
Farmfield Posted April 4, 2017 Author Share Posted April 4, 2017 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... resample_squares.v1.1.hiplc 1 Quote Link to comment Share on other sites More sharing options...
petz Posted April 4, 2017 Share Posted April 4, 2017 what if you simply calculate the circumference and divide it by the number of polywire´s division? resample2.hiplc 6 Quote Link to comment Share on other sites More sharing options...
Farmfield Posted April 4, 2017 Author Share Posted April 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
Dave Stewart Posted April 5, 2017 Share Posted April 5, 2017 Here's another hacky way to do this, abusing a rest attribute to restore point positions after scaling by inverted pscale/resampling. Minimal code at least... --Dave resample_withRest_DS.hiplc 2 Quote Link to comment Share on other sites More sharing options...
Farmfield Posted April 6, 2017 Author Share Posted April 6, 2017 Oh, that's really cool, Dave. That's truly my kinda hacktastic solution. 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. Quote Link to comment Share on other sites More sharing options...
Dave Stewart Posted April 7, 2017 Share Posted April 7, 2017 Love these explorations! Looking forward to seeing an example of a CHOPs solution, seems ideal for this task. Need to learn more CHOPs, not enough time in the day... Quote Link to comment Share on other sites More sharing options...
Farmfield Posted April 7, 2017 Author Share Posted April 7, 2017 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. Quote Link to comment Share on other sites More sharing options...
LorcanOS Posted September 5, 2017 Share Posted September 5, 2017 (edited) 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 September 5, 2017 by LorcanOS Quote Link to comment Share on other sites More sharing options...
Farmfield Posted November 12, 2017 Author Share Posted November 12, 2017 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... v1: https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu v2: https://drive.google.com/open?id=1mjJd0vd9KUSFW79ksRc5fioeMxXnu6Bu Quote Link to comment Share on other sites More sharing options...
Dave Stewart Posted November 13, 2017 Share Posted November 13, 2017 Cool, clever use of foreach and minpos! Does seem like that could come in handy for other stuff. Looks like both links point to the same file though? --Dave 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.