Calculating a derivative in a feedback loop

Hello,

I am still on Alpha3 version of POPs. I am trying to calculate the derivative of a position by accessing the previous position using a POP Cache in a Feedback loop. Except that the Feedback POP node gives me an error saying that the “speed” attribute I created already exists. I am not yet an expert in POPs but it seems complicated to me to perform this operation.

Have a nice day!

I’ve found so far that when working with POP feedback and manipulating attributes that you want to use again in the loop, you will want to have created the attribute before the feedback loop starts, so that you are adjusting it, not creating it within the loop. You can still create new “temp” attrs in the feedback and remove them with mathmix’s output page before you loop back to the feedback. Does that help? Maybe others have other thoughts, but that is what I’ve come up with.

As well, I haven’t messed with it, but introducing a cache within a feedback sounds like something you may have to do very carefully… but i’d have to play with it to know for sure. If you’re just comparing last frame’s speed to a new calculated speed you should be able to do that before updating your speed attr ( by storing a prevSpeed attr first or something?) in the loop though, but maybe you need more than just the last frame’s speed?

I’ve had exactly the same experience. I think perhaps the feedback could be similar in style to the particle POP where you pass parameters in and then modify from there.

The particle POP still doesn’t deal with things very gracefully when messing around within it either but with the passing in of attributes there’s a bit of a mental acknowledgement on the user side that there’s a reason you’re doing that and you somehow feel less inclined to break this workflow.

Hi !

Thanks for your answers ! I think I succeed with this network :

derivative_fb_loop.toe (152.1 KB)

I don’t think that it’s optimal. For example, if you put the FPS at 30 something weird happens.