morn66 Posted September 1, 2019 Share Posted September 1, 2019 Hi everyone, I need your help with a simple question in DOP with "rigid body solver" and "rbd packed object". In the sop level, I have set i@active attribute at different time for each packed object. It works well. (each object start to fall at the specific frame I want) The problem is that I have also set at specific @v for each packed object and because the i@active is not set at the first frame, the v@v doesnt work when the packed object is set to active. I have tried to included @v "override attributes from SOP" in "rbd packed object", but the result is a constant movement in velocity (override gravity or any other effect in DOP). Thanks guys Quote Link to comment Share on other sites More sharing options...
catchyid Posted September 1, 2019 Share Posted September 1, 2019 (edited) i "think" I got the answer you don't need to set "v", you need to set "targetv" + "airresist" + "drag" + "dragexp" --> as the name implies, this is "target" velocity, so the solver will compute the force that would produce this velocity. However, when you set "v" you basically skip all physics and say : hey, I want the velocity now to be v. Also, remember to read the above attributes from the sop in each frame, i.e. the same way you set "active". Just a quick note: this works for bullet solver, never tried it on houdini native RBD solver... Edited September 1, 2019 by catchyid Quote Link to comment Share on other sites More sharing options...
morn66 Posted September 1, 2019 Author Share Posted September 1, 2019 Thanks @catchyid The thing I want to do is to have a start @v, only at the frame when the pack object is set to active (dont want to have that constant movement and bypass all the physics). I don't quite understand how to set the targetv, airrest, etc. but I have found something that fix my problem but I'm not sure if it's the right workflow. Basically I store a random time to @active my object. I also store a custom attribute v@storeV. Inside the DOP, I connect a SOP solver to the rigid body solver. Here is the script to activate the v@storeV at the right time. if(@Frame == i@frameAct) v@v = v@storeV; So basically, the Sop solver help me to reach the data at the right time Here is the file, it might be easier to look at it. Let me know if it makes sense Cheers dop_ActiveAndVelocity.hiplc Quote Link to comment Share on other sites More sharing options...
catchyid Posted September 1, 2019 Share Posted September 1, 2019 I looked at your file and it works which is the most important thing To be honest, I never tried your approach and was surprised it's working I have been using targetv for a while... I guess it's meant, i.e. targetv, to introduce a gradual change from the current velocity to the desired one! As per framework, I think you have a simple network which is great Cheers Quote Link to comment Share on other sites More sharing options...
morn66 Posted September 1, 2019 Author Share Posted September 1, 2019 Good to know! Thanks again @catchyid! I appreciate it Quote Link to comment Share on other sites More sharing options...
jamesr Posted September 2, 2019 Share Posted September 2, 2019 I think you're way overthinking it. No need for SOP solver, just turn on "Inherit Velocity from Point Velocity" on the RBD Packed object DOP. Keep it as "v@v" on the points. Is this what you're after? dop_ActiveAndVelocity_jamesr.hiplc 1 Quote Link to comment Share on other sites More sharing options...
morn66 Posted September 2, 2019 Author Share Posted September 2, 2019 Hey @jamesr, It's usually what I do but it didn't work correctly when the active attribute was 0 at the beginning... but looking at your file, I have found the problem in my file. The "initial object type" need to be "create deforming static object", mine was at "create active objects". Now that works and it's way simpler. Thanks man!! 1 Quote Link to comment Share on other sites More sharing options...
anim Posted September 2, 2019 Share Posted September 2, 2019 3 hours ago, morn66 said: The "initial object type" need to be "create deforming static object", mine was at "create active objects". Now that works and it's way simpler. you may rather want to use "create animated static objects", unless the geometry is really deforming inside of the packed primitives 1 2 Quote Link to comment Share on other sites More sharing options...
morn66 Posted September 2, 2019 Author Share Posted September 2, 2019 Hey @anim, yeah that makes more sense to use that! Thanks Quote Link to comment Share on other sites More sharing options...
Mandark1011 Posted March 24, 2021 Share Posted March 24, 2021 On 2019-09-02 at 4:41 AM, morn66 said: Hey @jamesr, It's usually what I do but it didn't work correctly when the active attribute was 0 at the beginning... but looking at your file, I have found the problem in my file. The "initial object type" need to be "create deforming static object", mine was at "create active objects". Now that works and it's way simpler. Thanks man!! this really helped me thankyou Quote Link to comment Share on other sites More sharing options...
ftaswin Posted April 16, 2021 Share Posted April 16, 2021 (edited) When you want to activate your rbd inside DOP you also have to define all initial attributes there and then. For example : if(@Frame>100) { if (i@active==0) { i@active = 1; v@v = {0,1,0}; v@w = {29,0,0}; } } Edited April 20, 2021 by ftaswin 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.