Resample: Round point distance to nearest 3?

   1300   4   1
User Avatar
Member
9 posts
Joined: 8月 2019
Offline
Hi, procedural newbie here. I'm trying to take an arbitrary polygonal shape with 90 degree corners and ensure all of it's points are at least 3 units apart.
I thought, from the a tutorial I'm looking at, that something along the lines of this vex would give me what I'm looking for.

The attribute wrangle gets close, but a lot of distances between points are just shy or just past 3.

Included an image. if anyone would mind helping me out with this method, or has another one, I'd appreciate it.

Attachments:
roundto3.jpg (667.6 KB)

User Avatar
Member
2035 posts
Joined: 9月 2015
Offline
Probably better to supply hip to show what you did altogether;

On your wrangle, your simply setting the x and y components of Position to whole values - not distances between points.

On your resample you have it set to Resample by Polygon Edge - Read the tool tip on that and toggle to see the differences.
User Avatar
Member
9 posts
Joined: 8月 2019
Offline
Thanks for the response! Included my HIP file. I followed quite a bit of the Guard Tower tutorial this video, 4 mins in, [www.sidefx.com] and after doing a good portion of it, I was trying to use some of that to create my own HDA.

I was trying to create something split into 3 meters, so I could copy 3 meter long boards to make the perimeter of grid. I noticed that in two of these cases, Grid 1 and 2, the point distance did end up at 3, for every point. Grid 3 did not work, and I wasn't sure why.

I'm sure there are a million better ways to do this, but I'm just starting Houdini and trying what I know so far.

My end goal would be able to create a wood frame of a home based off of the grid. I thought it would be simpler to start if I limited the edges to a certain length. If anyone knows any tutorials I should look into to help, please let me know.
Edited by Kronso - 2019年8月16日 01:57:03

Attachments:
divisibleBy3.hip (104.8 KB)

User Avatar
Member
2035 posts
Joined: 9月 2015
Offline
I put in a switch node to go between your different grid setups.

For me all 3 end up with the perimeter points 3 units apart - so I am not sure what the issue is.

But having said that, just as a tip for a simple workflow.

If your wanting your end result to have a 3 unit separation of points along the perimeter;

Then make sure your grid is setup in multiples of 3 (combination of size and row/col parameters).

The same goes with your polyextrude distances.

By doing so, you won't have to mess around wrangling.

Of course a more ‘procedural’ way could be made, that takes any input(corrects for uneven point divisions) and puts out desired point separation - like 4,5,7, etc. units.

But that would take some more work.
Edited by BabaJ - 2019年8月16日 08:56:28

Attachments:
divisibleBy3_v0.hiplc (134.7 KB)

User Avatar
Member
9 posts
Joined: 8月 2019
Offline
Thanks for the help, man!

In the end I would like to make a fully procedural system, that you could input a grid of any size, and build a house frame up from it. I do realize the amount of work this will require, and that I don't, and won't for a while, know nearly enough to make it. Just figure I'd ask questions as I go.
  • Quick Links