GeordieM Posted December 3, 2018 Share Posted December 3, 2018 Hi all, I'm create SOP HDAs that internally use Solver SOPs for calculations. The end result is not time dependent, the Solvers are part of a generative system and the user can set number of iterations in the HDA UI. I use Solvers instead of For loops since they're easier to visually debug while developing the system. I've been using the Timeshift SOP and exposing the Frame parm to the HDA to set number of iterations. I then disable caching on the Solver SOP and put the Timeshift directly after it. This kind of works, but if you say set the Frame parm to 500 it will process the solver to that frame, but then if you set it back to 400 it won't refresh the graph downstream. I'd like to avoid scripted calls to force node cooking etc. What's the definitive way of locking the output of a solver to a specific frame and not have the output cached in any way? Quote Link to comment Share on other sites More sharing options...
FlorianEggers Posted December 3, 2018 Share Posted December 3, 2018 Not sure I understand correctly: You want the Solvers to automatically re-cook to the desired frame (specified in the Timeshift SOP)? Quote Link to comment Share on other sites More sharing options...
GeordieM Posted December 3, 2018 Author Share Posted December 3, 2018 Exaclty! Here's a quick demo scene Solver_Time_Lock_Test.hipnc On the Solver_Test obj there's a "Solver Iterations" int slider. If you push that up you'll see the number of points increase, if you pull it back down they won't decrease till you hit 0 then it force the cache to clear as per the "Enable Automatic Resimulation" option on the DOP sop inside the solver SOP. I want a way to completely invalidate the entire cache whenever the local time of the solver is changed without forcing any node cooking via scripts. I'm working on my own custom solution as well but thought there might be an easier solution. Quote Link to comment Share on other sites More sharing options...
FlorianEggers Posted December 3, 2018 Share Posted December 3, 2018 AFAIK there's no way to make this work without scripting. (If there is, I'd be curious to know aswell). As a sloppy workaround, you could expose the "reset Simulation" button of the SOP Solver to your HDA. Using for-loops would solve this issue, I think. You said it's easier to work on the system using a solver, but maybe you could port the logic to for-loops for the final HDA? That would be my approach. Quote Link to comment Share on other sites More sharing options...
GeordieM Posted December 4, 2018 Author Share Posted December 4, 2018 (edited) Yup that's exactly what I'm doing now re For loops. If you set the Iterations parm of a For loop to $F and Gather Method to Feedback you basically turn a For loop into a Solver (obviously some nuances to this). I then have a toggle in the HDA to use a specific iteration as output or override with current time to simulation a Solver SOP for development. Thanks for the validation Florian! Edited December 4, 2018 by GeordieM 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.