Jump to content

Collecting Cumulative value of a Parameter


7ofDiamonds

Recommended Posts

- 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!

Link to comment
Share on other sites

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);
  • 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...