Record Time Point Enters Group?

   3353   2   0
User Avatar
Member
5 posts
Joined: Nov. 2016
Offline
Hey all,

I've been trying for hours to figure this one out & was hoping to get some input from your good selves.

I have a large number of points that enter a group at different times. I'm trying to use a Point Wrangle to create a parameter that records the frame that the point enters the group. My code looks something like this:

if (@group_release == 1)
{
@time_enter_release = @Frame;
@group_release = 0;
};

Unfortunately this doesn't hold the frame time that the point entered the group, it sets the parameter as the current frame for the entire timeline. Make sense?

I've attached a very simplified version of my scene below.

Any help would be greatly appreciated!

Attachments:
time_point_enters_group.hiplc (75.9 KB)

User Avatar
Member
5 posts
Joined: Nov. 2016
Offline
I think I have this figured by following this thread: http://forums.odforce.net/topic/20231-using-the-shift-sop-to-shift-chop-curves/ [forums.odforce.net]

It seems a little convoluted but it works. If anyone has any better solutions I'd love to hear.

Project file posted below.

Attachments:
Record Trigger Time.hip (342.2 KB)

User Avatar
Member
373 posts
Joined: March 2009
Offline
I usually do it in a sop solver. First I create an attribute… @startFrame=10000 (large number)
then in the sop solver do what you need to evaluate whether it has entered that group or not. Often times I'll use color from an attrib transfer, then do:

if(@Cd.x>0 && @startFrame>99999){
@startFrame=min(@Frame,@startFrame);
}

If the point is ever not black or in your case is ever in that group it stores the frame and can only ever be the smaller of the values. Sops don't have a history dependence, which is why a sop solver is needed.
Ian Farnsworth
  • Quick Links