Juzwa Posted March 6, 2015 Share Posted March 6, 2015 (edited) 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 March 6, 2015 by Juzwa Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted March 6, 2015 Share Posted March 6, 2015 This is what the Solver SOP is for. Put your VOP inside of that. http://www.sidefx.com/docs/houdini14.0/nodes/sop/solver Quote Link to comment Share on other sites More sharing options...
Juzwa Posted March 6, 2015 Author Share Posted March 6, 2015 Solver SOP is a complete mystery and magic for me. This is how I set the setup (attachment). It's pretty close, but still frames are beeing evaluated. temp.hip 1 Quote Link to comment Share on other sites More sharing options...
sadhu Posted March 7, 2015 Share Posted March 7, 2015 (edited) 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 March 7, 2015 by sadhu Quote Link to comment Share on other sites More sharing options...
Juzwa Posted March 7, 2015 Author Share Posted March 7, 2015 Thanks sadhu, this is very helpful! Quote Link to comment Share on other sites More sharing options...
sadhu Posted March 7, 2015 Share Posted March 7, 2015 (edited) 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 March 7, 2015 by sadhu 1 Quote Link to comment Share on other sites More sharing options...
Juzwa Posted March 7, 2015 Author Share Posted March 7, 2015 wow, this is even better. Thanks a lot sadhu!!! 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.