Jump to content

VOPs: get and store frame


Recommended Posts

Hi, 

 

This is giving me headaches for two hours now. I know it would be much easier in vex, however I dont know enaugh vex

 

I have some event that need to be triggerd at some point, and then start to compare the current frame and the frame at which the event has been triggered.

 

But whatever I do the pain is, that all the time values (on Geometry VOP GLobal Parameters) are changing over time!!!

 

This is the example what I need:

 

1) At start the color is (0,0,0)

2) At frame 25 Cd.x = 1, I need to store the value 25 (my_x = 25)

3) then frame after frame I do some calculations, lets say:

    1 - "( (current frame - 10) - my_x)/10

4) and this is how i get my attribute I'm looking for

 

After two hours I finally come with the problem. That don't know how to store the value my_x. I just need to store it's value ones it triggers and then change when it triggers again

Edited by Juzwa
Link to comment
Share on other sites

Take a look at the attached file. I have created two attributes ; "on" and "off".

 

When the "activation" value is less than the "threshold" value , "off" will keep updating.

The moment "activation" crosses "threshold", "off" value will be hold and "on" value will start updating. 

The moment "activation" goes below "threshold", "on" value will be hold and "off" value will start updating.

clamped "on" - "off" should also be helpful.

 

I hope this gives you an idea to do what you want.

Trigger_sopsolver_solution.hipnc

Edited by sadhu
Link to comment
Share on other sites

One more file. It actually stores the frame number in an attribute called trigger. when the activation value crosses the threshold. Visualize values of attributes  on , off and trigger in details view.

But this gives opposite values(on will be off ,off will be on and trigger will store frame number where activation goes below threshold instead going above threshold) when activation value is more than threshold on the beginning frame(for example activation value set to 1 on frame -20)

Trigger_sopsolver_solution_NEW.hipnc

Edited by sadhu
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...