itriix Posted August 7, 2009 Share Posted August 7, 2009 if i have a grid, and a sphere with a deforming mountain node... and a group node with grid in first input and deforming sphere in the second input. and have it set to group by bounding object. then say that once a point has entered the group, it's permanently in the group... right now, the deforming bounding object sometimes grows abnormally and i don't want the points to have already entered the group to ever leave the group because of it here is what i'm trying to do: i have a 3d city. i'm disintegrating it. but for now, i'm not worried about particles. i am just trying to make a "matte" using a color sop. This will drive an alpha channel in comp. As the deforming geometry grows larger, it will bring in the points, those points will be colored black, whereas the default is of white. so, as it grows, i get the alpha that i need. like i said, the problem is that i can't think of a good expression or anything to get these particles to simply STAY a part of the group! any ideas? thanks Quote Link to comment Share on other sites More sharing options...
stevenong Posted August 7, 2009 Share Posted August 7, 2009 You can't do it directly in SOPs because it won't keep the data. You can either use a Feedback SOP through the proto_install or do it in POPs. Birth a particle per point, use a Group POP and be sure to check the Preserve Group toggle which will keep the group membership for each particle. After the sim is done, you just need to do use a Group Copy SOP to copy the group back to the grid. Hope the above helps! Cheers! steven Quote Link to comment Share on other sites More sharing options...
itriix Posted August 8, 2009 Author Share Posted August 8, 2009 (edited) ah okay cool. thanks a lot steven cheers, Jonathan Edited August 8, 2009 by itriix Quote Link to comment Share on other sites More sharing options...
old school Posted August 8, 2009 Share Posted August 8, 2009 I would use an attribute instead. Try color for starters then customize if you have to handle more options or you need Cd color for, well, erm, color. Groups can be slow in H10 (and previous releases) (me making excuses...). I picked up an uber cool trick at Siggraph. You can easily use an attribute to specify a point or primitive selectoin in any SOPs group field: @Cd.x > 0.5 for example will return all those points (considering that this is used in a SOP that works on points) which have a color in Red (the .x index) of 0.5. If you have your heart set on using groups, then this workable as well. Several ways actually along with the existing methods mentioned previously (particles, feedback sop). You can use the ForEach SOP to make an attribute persistent. Just load in the previous frame's data with a Time Shift SOP (or play with rest position attribute) to do the compare: see if the point is in a group or has an attribute (I prefer attributes = speed) and if the state has changed, you have yourself a trigger to do stuff. Rest SOP: You can add rest attributes to your incoming geometry. Then later in your chain, use a point SOP to fork off a separate leaf and copy the spheres to the rest position of the geometry ($RESTX, $RESTY and $RESTZ with a suitable signature built using Attribute Create SOP). Time Shift SOP: I am more often that not using Time Shift SOPs now to capture the state of a frame instead of using: Lock flags, Cache SOP, saving a frame to disk and referencing that, adding Rest SOP, etc... You can use a Time Shift SOP and in the index just use the frame you want to use, say frame 1. Or $F-1. Then transfer the info on to the post-deformed geometry. Hope this helps... 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.