Jump to content

How to remove RBD jitter?


LukeLetellier

Recommended Posts

I'm trying to recreate a shot I made in C4D:

 

But I'm having difficulty with the beans. They drop onto my groundplane, but they don't settle down - way too much jitter in the center of the pile. 

With C4D dynamics, I'd adjust the linear damping & angular damping - but I can't seem to find the equivalent in Houdini.

Or, I'd increase the simulation substeps (which should theoretically increase accuracy) - but every time I increase the substeps in Houdini - whether it be for the whole DOP sim or for the rigid body solver, the sim becomes increasingly more chaotic, with pieces flying in all directions.

I've tried tweaking just about every param on the bullet solver, but nothing seems to be fixing it. 

Thoughts?

Thanks!

 

 

 

RBD_Settle.zip

CoffeeJitter.mp4

Edited by LukeLetellier
Link to comment
Share on other sites

I gave this a shot because I have had this issue in the past and was wondering how to take care of it now. I opened up your file and started playing around and found that if you turn the collision padding back to default of .02, your jitter will go away. At first I was using a pop drag to try and calm down the jitter but, it didn't matter what number I made the drag, it would still do the same thing. The drag could be useful for controlling the amount of beans travelling away from the pile since it is based on the length of velocity. I will attach the file I got to work.

 

RBD_Settle_RB.hiplc

  • Like 2
Link to comment
Share on other sites

This is working quite well - thank you!

Two additional questions:

1. When I use this method, the collision geometry is not totally correct - see attached screenshots; one a wireframe of the collision geo inside the original mesh, the other a shot from below the ground plane, with a lot of intersecting geometry. The reason I had removed the "shrink collision geometry" was to get a 1 to 1 representation of the original object to prevent this sort of thing from happening. Is it inevitable? Or is there some sort of middle ground? I'd love to convert it to a volume & use a volume sample method as one might do with a FLIP sim. 

2. If I take this project to the next step, and open up the "Import Dynamics" node that is in the scene file I originally attached (and still in your file), you'll see that we import the dynamics sim as points for an optimized cache, then copy the simulation geometry back onto those points (eventually using a high res geometry model). We have to remove several attributes to get even a close approximation of rotation, but after I do this the coffee beans offset in position - and collide/intersect with each other - no longer lining up with the original sim. Is there a way to get a more copy position?

Thanks!

Luke

CollisionGeometry.tiff

Beneath Groundplane.tiff

Link to comment
Share on other sites

1. The collision geo not being one to one is the unfortunate downfall of using convex hull on this. You could try switching the geometry representation on the rbd packed object to concave but, it will make your simulation slower unfortunately. If you are dead set on using convex hull, a quick suggestion would be to modify the shrink amount. You can break the reference to collision padding if you want but, I would keep it for sanity sake. Essentially what it is doing is the collision padding is expanding the geo for collision and the shrink amount is attempting to shrink the collision back to the original geo so it will be accurate. What I have done is just multiplied the shrink amount by .9. That roughly gives me the same height as the bean but, it still is left to be desired on parts of it.

2. So one of the reasons why you aren't lining up is because of the rotate that I put on the bean going into the dop simulation (did this so they weren't always falling on their belly. Wasn't sure at first if that was the reason for the jitter). Ignoring the rotate though doesn't fix the issue fully, the beans are still not lined up. The problem is that the center of mass on each bean is wrong. I fixed this just by putting $CEX $CEY $CEZ in the translate of a transform node on the incoming high res bean going into the copy. Normally if the bean geo was actually at origin (your incoming bean is below), this wouldn't be an issue. I didn't have your high res bean so I was just testing using the same bean used in the dop simulation. The final result should still be the same with your high res bean though.

 

 

RBD_Settle_RB_v2.hiplc

Link to comment
Share on other sites

So...

1. I changed the scale to be bigger, (transform + changing gravity) bullet doesn't like small scale things and it can induce weird jitter
2. I packed the pieces during the copy process, it's faster
3. Removed the collision padding
4. Added a pop wrangle to multiply the w (angular velocity) 
5. added a pop drag for linear drag, I would avoid using that though
6. Ryan was mentioning using concave, avoid that at all cost, there are ways to convexify concave shapes in the worst scenario :)

RBD_Settle_RB_v3.hiplc.hipnc

  • Like 4
Link to comment
Share on other sites

Good stuff Remi!

Didn't realize it was faster to pack the pieces during the copy process. I had the collision padding at 0 but, the convex hull didn't look right still...I guess I must of had something else checked on when I was trying it.

I am curious about your #6...What techniques do you use to convexify concave shapes in Houdini?

 

Link to comment
Share on other sites

Thank you both Ryan & Remi for all the help!

- Good tip on the $CEX $CEY $CEZ  note. Do you know if SideFx has a listing of all the $ variables that can be used? That would be quite helpful to have. The documentation has a listing for Python, Expressions, Hscript. and VEX - but I don't see any for those. 

- Agh! Scene scale issues strike again! Dynamics sims are supposed me to be real life scale, except in situations X, Y, Z, A, B, C.... reminds me so much of the old "I before E, except after C, and not counting science, species, sufficient..." :D

Link to comment
Share on other sites

All right, let's find my Vancouver Houdini User Group (VHUG :) file for #6...

It was a quick "masterclass" on collisions, there's a RBD section where's I'm convexifying a character in different ways as an example.
It may not be as useful without me explaining what's going on but, well, here it is.

vhug2_v003.hipnc

  • Like 3
Link to comment
Share on other sites

26 minutes ago, Shinjipierre said:

All right, let's find my Vancouver Houdini User Group (VHUG :) file for #6...

It was a quick "masterclass" on collisions, there's a RBD section where's I'm convexifying a character in different ways as an example.
It may not be as useful without me explaining what's going on but, well, here it is.

vhug2_v003.hipnc

Toronto's "THUG" has a better ring to it I think.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...