setting up parametric groups

   3234   11   1
User Avatar
Member
24 posts
Joined: 3月 2014
Offline
I have a grid set up as a cloth object. I want to constrain the points on each side to a box to hold it in place. So for example in this case it's a 30x30 grid meaning that the points on the right side go from 0,30,60,90… and on the left are 29,59,89,119,… I was hoping to feed the grid into a group node and set up some type of expression to create the group but am having trouble with it. Here's where I'm at for the first group which should give me 0,30,60,90…

0-(`chs(“../grid1/rows”)`*`chs(“../grid1/cols”)`):`chs(“../grid1/rows”)`

I get the following error:

Bad pattern specified 0-(30*30):30.
Possible problems: Number out of range or a syntax error.
Valid Syntax: start
examples: !1-10:2,3 1-10:2 * 0-5 1

So under the bad pattern specified message it is getting the count correctly from the rows and cols but not doing the multiplication to give me the result. Is my syntax incorrect or is this not possible to do? Thanks.
User Avatar
Member
24 posts
Joined: 3月 2014
Offline
I'm also wondering if this might be better to do in an attribute wrangle node with vex… but I'm pretty new to Houdini so I'm not quite sure where to start if that were the better way to do this. Ideally I'd like to expose this group from the grid node as a parameter that I can feed into the autodop network to the cloth constraint nodes.
User Avatar
Member
555 posts
Joined: 2月 2017
Offline
so you just want the borders of some geometry right ? (just use Group, untick Base group, enable Include by edges,tick unshared edges, change group type to points, might as well rename Group Name to borders for ease of reading)
Edited by vusta - 2017年6月12日 21:21:42

Attachments:
borders.jpg (324.5 KB)

User Avatar
Member
24 posts
Joined: 3月 2014
Offline
vusta
so you just want the borders of some geometry right ? (just use Group, untick Base group, enable Include by edges,tick unshared edges, change group type to points, might as well rename Group Name to borders for ease of reading)

Actually I don't want all edges. I want a group for the right side only edges and another group for the left side edges.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
Group Expression, set to Points

left group:
relbbox(@P).x<0.001
right group:
relbbox(@P).x>0.999
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
555 posts
Joined: 2月 2017
Offline
another extremely simple way is with Group by Range…since you know it's every Nth…(in a grid with no holes). For the ‘other’ column, that doesn't at 0, well just offset the start of it…
Edited by vusta - 2017年6月13日 07:07:38
User Avatar
Member
24 posts
Joined: 3月 2014
Offline
Group by Range sounds right but I can't get it to work… or at least when set it up and click the Display/Render icon on the node no points are highlighted. File is attached and the Group by Range node is in the cloth node. What am I doing incorrectly? Thanks.

Attachments:
cloth-test-1.hipnc (324.5 KB)

User Avatar
Member
555 posts
Joined: 2月 2017
Offline
your End is set to 900, this is the cause why it didn't work (tho you could reasonable still expected it to work) anyway, leave it at 0 which I think is equivalent to ‘unlimited’.

I've set up the Group By Range to do both left/right sides in one go…I've also referenced the Columns (from the Grid) so that you can change the Grid resolution and it will auto update.

If you want to see the effect one by one, then tick/untick the appropriate ‘tick’, by default, it's showing the result of the bottom one (left side selection)

Attachments:
cloth-sidegroups.hipnc (330.5 KB)

User Avatar
Member
24 posts
Joined: 3月 2014
Offline
vusta
your End is set to 900, this is the cause why it didn't work (tho you could reasonable still expected it to work) anyway, leave it at 0 which I think is equivalent to ‘unlimited’.

I've set up the Group By Range to do both left/right sides in one go…I've also referenced the Columns (from the Grid) so that you can change the Grid resolution and it will auto update.

If you want to see the effect one by one, then tick/untick the appropriate ‘tick’, by default, it's showing the result of the bottom one (left side selection)

Thank you!
User Avatar
Member
24 posts
Joined: 3月 2014
Offline
So I am trying to set up these groups as the constrained points. I thought I had the right expression in the cloth attach constraints but I'm getting this warning and error. Any idea what's wrong with my expression or setup?

constraint1:
Warning: cloth - /obj/AutoDopNetwork/clothattachconstraint1/constraint1: Constraint could not be processed by solver.

Attachments:
cloth-sidegroups.hipnc (324.7 KB)

User Avatar
Member
555 posts
Joined: 2月 2017
Offline
In your cloth flag, I've wired the l/r groups as part of the chain instead of leaving it off to the side. Then in autodop, you simply type in the group names that you've defined instead of the full path (you could manually define these too, try simply type in say 0-9 press Enter and you'll see red spheres, constraints, created at those points)

Attachments:
cloth_constraints.hipnc (325.4 KB)

User Avatar
Member
24 posts
Joined: 3月 2014
Offline
vusta
In your cloth flag, I've wired the l/r groups as part of the chain instead of leaving it off to the side. Then in autodop, you simply type in the group names that you've defined instead of the full path (you could manually define these too, try simply type in say 0-9 press Enter and you'll see red spheres, constraints, created at those points)

Ah yes, ok that makes sense. Thank you for your help!
  • Quick Links