7ofDiamonds Posted February 10, 2015 Share Posted February 10, 2015 I'm trying to extract the cumulative value of a parameter over frames and plug that value into a different channel. How can I do this? Can I use for loops for this?If so, how would I write it? Thanks! Quote Link to comment Share on other sites More sharing options...
rayman Posted February 10, 2015 Share Posted February 10, 2015 I'm almost sure you can do it using CHOPs. Quote Link to comment Share on other sites More sharing options...
7ofDiamonds Posted February 10, 2015 Author Share Posted February 10, 2015 Could you explain how this is done? I'm a little unsure of how to start. I'm almost sure you can do it using CHOPs. Quote Link to comment Share on other sites More sharing options...
ayidi Posted February 10, 2015 Share Posted February 10, 2015 Could you explain how this is done? I'm a little unsure of how to start. - Create a CHOP network - Reference the channel - Connect an Area CHOP - Toggle the export flag 1 Quote Link to comment Share on other sites More sharing options...
eetu Posted February 10, 2015 Share Posted February 10, 2015 Here's a quick hip, both in OBJland with chops and in SOPland with accumulating a detail attribute inside a Solver. ee_cumulative_parameter.hip 1 Quote Link to comment Share on other sites More sharing options...
7ofDiamonds Posted February 10, 2015 Author Share Posted February 10, 2015 - Create a CHOP network - Reference the channel - Connect an Area CHOP - Toggle the export flag Thanks, that was helpful! Here's a quick hip, both in OBJland with chops and in SOPland with accumulating a detail attribute inside a Solver. This example is great! Thanks for including the example with the Solver. I saw that example somewhere else but wasn't sure about how that worked. Your hip file cleared that up. Thanks! Quote Link to comment Share on other sites More sharing options...
rayman Posted February 11, 2015 Share Posted February 11, 2015 Keep in mind that the solver wont compute the first frame, as by default Solve on creation frame is off. You can also compute it with wrangles at once: string param = "/obj/sphere/xform1/ty"; float startframe = 1; float endframe = 240; float step = 1; float fps = 24; float timestep = 1/fps; float result = 0; for(float i=startframe;i<=endframe;i+=step){ float sample = ch(param,i*timestep); result += sample; } @result = result; To emulate the behaviour of Solver SOP use : float sample = ch(param,(i-1)*timestep); 1 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.