Grow selection procedurally?

   15243   8   2
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Hi, I was wondering if there was a way to grow a point or a primitive selection procedurally, like with a special node, let's say by selecting an initial group and than make it grow from there.

The only way talked about in the manual is totally non-procedural and consist of alternatively selecting points and faces to make the selection grow…

I'm guessing this could be done using a foreach sop or something like that, but I have no clue how use this node…

Can someone help me? Pleeeaaase!

Cheers!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
I found a way…I actually modified an old exemple I got on this forum…here it is…

Now, next challenge would be to shrink a selection, is that possible? anybody?

Attachments:
foreach_growselection.rar (7.3 KB)

JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
7725 posts
Joined: July 2005
Offline
The easiest way is to use a VOP network that looks at the neighbors of the selected points and only keep the ones that only have selected neighbors.
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
sounds pretty easy(and very interesting) but I have no clue how to do this…can you elaborate a bit please?
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
2199 posts
Joined: July 2005
Online
The simplest way to grow a selection is to use the option in the group sop that expands a point group by a number of edges. Its on the edges tab.
Shrinking is more tricky but can be done in VOPS/VEX
The trick is finding just the right hammer for every screw
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
oooh nice, did not know how to use this properly(the edge depth)…it's perfect!

I guess now for shriniking it's a simple matter of inversing the selection, make it grow, and than inverse it again…it works, I tryed it!

Would it be possible to explain a bit more how do the shrink selection using vops sop? I would love to know how to do it! That thing could be really handy in a procedural world!

thanks!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
2199 posts
Joined: July 2005
Online
Actually you are right that is the best way to do it.

I think in vops you would loop through the connected points and add them to a new group if all the connected ones are in the existing group already, if one of them isn't the point must be on the edge of a group so you wouldn't add it. The resulting group would then be one edge smaller and you would have to repeat that process to gradually shrink the selection.
I think the method with the group sop is going to be quicker and you can shrink by a large number of edges in one shot.

Being able to expand an existing group rather than just a single point is a relatively new feature and I just confused myself…
The trick is finding just the right hammer for every screw
User Avatar
Staff
1182 posts
Joined: July 2005
Offline
I have a couple of examples here that use the sort sop to control where the “growth” begins by sorting the point numbers then use the group node to grow this selection over time.

This makes it possible to go forwards or backwards based on point number. Not as elegant as the other solutions but an option that might work for someone.

In my file I use null objects to represent the “origin” of the growth/shrink and these can be moved around or even animated to affect the results. I think this technique was used in the old breaking ice tutorial from many moons ago.

Attachments:
grow_shrink.hip (208.3 KB)

Robert Magee
Senior Product Marketing Manager
SideFX
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Cool Rmagee I like that too!
Can be really handy as well to propagate from a Null, thanks for the exemple!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
  • Quick Links