creating a additive group

   5024   4   1
User Avatar
Member
12 posts
Joined: 7月 2005
Offline
Hi,
I have a moving object being used to select the points for my group, and that object is moving and thus the group is moving. My question is what is a method to record ( a new group) all the points that have been in the group at a previous time, ie a trail of points showing the current goup and where it has been.

Thanks
User Avatar
Member
49 posts
Joined: 7月 2005
Offline
I just dealt with something similar to this recently. You need to be able to access the data from the previous frame. There are several ways to do this, each with their own set of disadvantages:
  1. CHOPS:
  2. Based on your group, set an attribute to 1 (if not in group value should be 0).
  3. Use a Geometry CHOP to import your data.
  4. Use a Hold CHOP and wire your Geometry CHOP into both inputs.
  5. You should now have a channel that turns on when the point enters the group and never turns off… I think.
  6. You can use a Channel SOP to import the data back onto your geometry.
  7. Use a Group SOP based on expression, myattrib > 0.
  8. Disadvantage: If your geometry is dense, this can take a long time and possibly crash.
  9. VEX: This is a tough one and I'm not going to go into much detail
  10. Assign an attribute based on the group, same as the CHOP method.
  11. This is where it gets tricky, you have to write a VEX function that has two inputs, the first input is your “Live” data, the second input is a File SOP that is reading the output of this node at the previous frame. ( So after this node you would have a ROP that is writing the data for the current frame ).
  12. The vex function compares the data from the current frame to the data of the prevous frame (if attribPrevousFrame == 1 then attribCurrentFrame = 1)
  13. Disadvantages: Must save data to disk… can take a long time but won't crash.
  14. Martian Tools : Feedback SOP
  15. Haven't used it, but it supposidly gives you the data from the previous frame so you don't have to save geometry to disk.
  16. Disadvantages: Costs Money.
    I personally used the VEX route because I was dealing with 100,000+ points and CHOPS just couldn't handle it, bless it's little heart.
Jeff Willette
Freelance TD
User Avatar
Member
7725 posts
Joined: 7月 2005
Offline
I just tried a simple POPs set up and it seemed to work. Perhaps I'm missing something.

- Source POP to bring in your points. Impulse birth exactly the same point count. Turn off constant birthing.
- Append Group POP. Turn on Preserve Group and use the bounding option.
User Avatar
Member
49 posts
Joined: 7月 2005
Offline
I thought he was doing this in SOPs… perhaps if you used a Soft Body in POPs, where every point was a Fixed Point following the Source Position this may work. Looks like you could “Copy Groups from Source” and then preserve the points within a certain group with a Group SOP.

Just to defend my earlier methods I was doing a lot more than just holding the group once it entered it… but a POP solution may have worked… Not sure how it would perform with large datasets, but POPs is usually pretty good with that.
Jeff Willette
Freelance TD
User Avatar
Member
49 posts
Joined: 7月 2005
Offline
Ah, here is the kicker with the POP method… When you Copy Groups from Source it only gets the info from the first frame, so you would have to use the Group SOP with Bounding… Bounding Box and Sphere wouldn't work so well if you need them to rotate. Bounding Object or Metaball should work fine though.

So you could import a simple shape (a box, sphere, or lowres version of your object) or Meta Balls attached to your moving object and use that as your Bounding Object in a Group POP with Preserve Group on.
Jeff Willette
Freelance TD
  • Quick Links