Jump to content
catchyid

Damping bullet jumping and rotating packed pieces

Recommended Posts

Hi,

When RBD packed pieces hit the ground, they bounce and rotate a lot?! I am not sure how to damp this effect? I've used damp DOP node but it enhanced a little bit, my goal is to have the pieces hit the ground and instantly fall flat without any additional rotation and bouncing (think big concrete pieces)? Now, seems like they have extra energy that makes them "dance" on the floor...Also, is this behavior affected by bullet substeps or substeps in constraint iterations?

Thanks

Share this post


Link to post
Share on other sites

Pretty conman issue. Using a POP Wrangle in your rbd dop is that most straight forward way of handling this.

I've included the file but here's the vex.

Quote

if(@P.y<0.1){
    v@v *= 0.96;
    v@w *= 0.85;
    //v@w is angular velocity so spinning
    //If the RBD piece is lower than 0.2
    //on the Y position then affect
    if(length(@v)<0.004){
        @active = 0;
    }
    //If a piece has a lower v than 0.02;
    //deactivate the piece. Good for stopping jittering
}

I'm no RBD expect but in regards to the pop wrangle i'm pretty sure most nodes activate are in use once per subframe &/ or the sim itself is having a hard time naturally calculating the v for each piece. I'm probably wrong on this one as i don't know RBD in depth. But hopefully i was able to help you. Just trying chancing the values in the wrangle as well if you want to more thoroughly understand whats happening.

damp_rbd_example.hipnc

damp_rbd.gif

dampvel.PNG

damp_rbd1_substep.gif

  • Like 2

Share this post


Link to post
Share on other sites

Big Thanks Jasper :) I also added another control for angular velocity length(@w) and it works like charm, thanks again :) Just if someone is still reading this, I had another problem with my setup, I was setting f@accelmax and f@angaccelmax and from the documentation, they can cause jitter for collision (i.e. if you set them to low values, then solver won't be able to move pieces quickly to compensate for collision)

Cheers,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×