how to group just connected pieces?

   11885   10   2
User Avatar
Member
217 posts
Joined: Sept. 2009
Offline
Hi there,

Is there a way to just group connected primitives with the boundingbox methode? So only those primitives will be selected whos connected members are all in the boundning box.
User Avatar
Member
509 posts
Joined: July 2005
Offline
HI
I'd give VOP a try with neighbours VOP and “add to group VOP” maybe .. then convert point group into primitive group in SOP.
JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
Not exactly, but this will work:

- connectivity SOP
- partition SOP - Group A (group_$CLASS )
- group SOP, bounding box - Group B
- group SOP, boolean of Group A and B = Final Group
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
217 posts
Joined: Sept. 2009
Offline
Thanks for your advice sum][one. I will give it a try!


Mr Catfish I tryed to go your way but I dont get it. please show me the problem. enclosed a test hip file.

And big thanks for your nice apple!

Attachments:
grp Test.hipnc (99.8 KB)

User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
Hm, you're right, that doesn't really work. Try this instead.

Attachments:
grp_test_480.hipnc (127.9 KB)

Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Member
509 posts
Joined: July 2005
Offline
nevermind my first post too .. for some reason I thought it was something I've done already in VOP! .. I didn't find a solution by following that route yet but I'm still trying

glad mrCatFish came out with a working one!
JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
User Avatar
Member
217 posts
Joined: Sept. 2009
Offline
Thanks Sean!!!

but the “common group” doesent really ignore prims. It becomes more visible with fewer shattered pieces…the group should just select whole pieces.
User Avatar
Member
8595 posts
Joined: July 2007
Online
here is a working example
primgroupmask() is your friend

scrub the timeline to see the effect

Attachments:
select_pieces_by_boundary_object.hipnc (113.3 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
217 posts
Joined: Sept. 2009
Offline
Thanks Tamte!!!,

Works great!
But I dont' really understand how primgroupmask works.


!* `primgroupmask(”../Whole_Pieces_inside_selection“, chs(”../group_mask“))`



Any comment would be nice!
Thanks!
User Avatar
Member
8595 posts
Joined: July 2007
Online
primgroupmask() will list all primitive groups on the geometry which match the given mask, in this case “piece_*”
and because ../Whole_Pieces_inside_selection node contains only groups that are inside the bounding objects you can just get them all

!* is there to by default select nothing, because if no whole piece is inside the bounding object then by default primgroupmask() will result in empty string and that would select all primitives so !* in front will prevent this

at first I did this without intermediate attribute “__group” directly in combine tab of group sop and it worked correctly, but as soon as i animated bounding object, it was not updating, even though all was time dependent, but it works this way
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
217 posts
Joined: Sept. 2009
Offline
Big thanks!!!
  • Quick Links