mottosso Posted April 4, 2020 Share Posted April 4, 2020 Hi all, I've explored the various options for wedging, but they all come down to writing results to disk, and I'd like to avoid that if I can as I'd like to run hundreds to thousands of iterations per timestep. The Wedge ROP for example writes multiple versions to disk. Wedge TOP does the same, but in parallel, from a Hython instance each nonetheless. Useful in their own right, but what I'd really like is this. Where I can vary some parameter of my simulation per wedge interactively, without writing anything out. I've got something which "almost" works, like this. But I can't tell whether it's anywhere near success. What ends up happening makes sense I think, but isn't what I want. That dopnet is singular and I suspect the loop tries increment it multiple times per time step which confuses its internal state somehow. I was hoping I could manually step the simulation, such that I could step it relative the current iteration. But I bet there needs to be unique instances of a DOP network per iteration, such that each can carry its own state. But here I'm at a loss. :S It's a bit of an XY problem, what I've really like to do is run a number of frames - say 10 - per iteration, measure the result and use it to determine what to change for the next iteration. To make a PD controller, somewhat like you do for machine learning and genetic algorithms, like this one. Hip file attached if it helps. Any ideas? procedural_wedge.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted April 4, 2020 Share Posted April 4, 2020 Not sure what exactly you are doing, but why don't you include your forech inside of the dopnet rather than other way around? Quote Link to comment Share on other sites More sharing options...
polvy Posted April 5, 2020 Share Posted April 5, 2020 Hi, What you are asking for is exactly what TOP's do. I suggest you to give it a try Quote Link to comment Share on other sites More sharing options...
mottosso Posted April 5, 2020 Author Share Posted April 5, 2020 10 hours ago, anim said: Not sure what exactly you are doing, but why don't you include your forech inside of the dopnet rather than other way around? I hadn't considered that, I will experiment with that, but it sounds problematic. At frame 0.. Simulate 10 frames ahead, adding a value of e.g. 0.1 to `max_impulse` Simulate 10 frames ahead again (ideally in parallel), this time with a value of 0.2 ..then a value of 0.3 ..and so forth Then determine which of the variations got closer to some goal, of e.g. having the lower body reach a given angle, say 45 degrees Whichever was closest, continue from that value, e.g. 0.2 At frame 1.. Repeat For that, I think I need individual DOP networks such that when I get for frame 5000 I could continue from that frame, rather than resimulate it. But you're right, it's not clear what I want, I don't know yet myself. :S 22 minutes ago, polvy said: What you are asking for is exactly what TOP's do. I suggest you to give it a try It is, you're right! A "Wedge TOP" along with a "ROP Fetch TOP" is exactly what I'm looking to do, except in SOP/DOP. The hurdle with TOPs is the launch of Hython (adding 5-10 seconds to each work item) and roundtrip to disk (adding 200-500 ms to each frame). I need this to run quicker, as each iteration of my Bullet simulation runs at ~30 ms per frame and I need hundreds of variations for every frame of my animation to determine the next frame. Quote Link to comment Share on other sites More sharing options...
mottosso Posted April 5, 2020 Author Share Posted April 5, 2020 Oh, and I just realised, there isn't a For-Each construct in DOPs. Maybe that's not what you meant, @anim? Quote Link to comment Share on other sites More sharing options...
anim Posted April 5, 2020 Share Posted April 5, 2020 (edited) 14 minutes ago, mottosso said: Oh, and I just realised, there isn't a For-Each construct in DOPs. Maybe that's not what you meant, @anim? I mean in DOPs in Sop Solver, or for short Foreach Loop inside of Solver SOP if you only care about processing the geo over several timesteps if you don't care about the actual time evolving then you can just do foreach loop and inside For Feedback loop that will loop over certain number of iterations if it's bullet however then maybe just merge all your setups together, make them separate collision groups so that they don't interact and run them as one sim, since as you noticed you can't run parallel sims without TOPs EDIT: or if you are adventurous you can have a look at Edit LOP Viewport State where the whole Bullet sim is constructed and run within Python, so maybe you can use something like that Edited April 5, 2020 by anim Quote Link to comment Share on other sites More sharing options...
mottosso Posted April 5, 2020 Author Share Posted April 5, 2020 Thanks, I'll experiment with this and see what comes up. 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.