legomir Posted June 17, 2015 Share Posted June 17, 2015 Pretty simple example what I trying to do. When prim color change to red i want to evealuate once and create attribute for activation frame, but all ways what i trying don't work properly. I try avoid using solver sop. Someone have idea to solve this problem? example_0.hipnc Quote Link to comment Share on other sites More sharing options...
ChristopherC Posted June 18, 2015 Share Posted June 18, 2015 Whenever this VEX code is being evaluated, it is done so as if it was for the first time. It has no knowledge of previous evaluations (frames?)—the variable values are not persisted across the evaluations, and thus you will never end up having `temp` being equal to 0 before evaluating your `if` condition. Evaluating and manipulating the values of an entire frame range is a job well suited for CHOPs. I've modified your scene to do just that. Note that since CHOP evaluates the full frame range before outputting its result, things might get slow if the input graph is slow to evaluate. Maybe there's a better approach? example_0-Edit1.hipnc Quote Link to comment Share on other sites More sharing options...
pbarua Posted June 22, 2015 Share Posted June 22, 2015 Solver SOP is faster than CHOPs. If you have high amount of points then go for solver SOP, there is no side effects of using that. 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.