Rikrok Posted June 19, 2012 Share Posted June 19, 2012 I'm trying to get points put into a group based on whether they have been contained by another shape. The first part is fine, but once the shape has moved on they're no longer in that group- I need them to stay in it (remembering if they have been touched or not.) I tried creating an attribute with the idea to set a value for anything in the group, but of course once they leave the group that attribute reverts to the default value... Quote Link to comment Share on other sites More sharing options...
Annon Posted June 19, 2012 Share Posted June 19, 2012 Have a look into the SOP solver, either in DOPs or I think in H12 it's called something like Geometry Solver at SOP level... So what you'll do is create an attribute called $INGROUP or something. Do a max between current frame and last (in SOP solver) so, max($INGROUP, $INGROUP1)... That way if it's 0, it'll take 1, if it has ever been 1, it'll stay like that. Then group off that attribute. *just looking at my dropbox, I have a file that looks like it'll do the right thing. Haven't checked it, but by the name it is probably what you want. Hope that helps Christian preserveGroup_sopSolver.hip Quote Link to comment Share on other sites More sharing options...
oslo Posted June 20, 2012 Share Posted June 20, 2012 (edited) my solution for save attr or group, based on the chop save_attr.hipnc Edited June 20, 2012 by oslo Quote Link to comment Share on other sites More sharing options...
Rikrok Posted June 20, 2012 Author Share Posted June 20, 2012 Hope that helps Christian Thanks very much, your example is doing exactly what I described. At the risk of sounding ungrateful/stupid, I'm just starting out with Houdini coming from Maya, and I must say I'm having trouble getting my head round some things (I've failed even with your scene to recreate it from scratch). Does it really have to be this complicated? In Maya I'd simply say, if (x==otherobject.x) $samex = 1; and bang, I've got a variable that tells me whether something was at the same coordinate as another. 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.