View Full Version : RBD: how to set the scene size for simulation correctly?
11 November 2011, 08:26 AM
Hey there CG-talkers!
I'm exploring Houdini at the moment, been through some of the basics and right now I'm messing around with RBD (going through a Digital Tutors Tutorial "Fundamentals of Rigid Body Dynamics in Houdini").
While doing so, I'm wondering how to correctly set the scale for my scene and objects in order to get a physically correct simulation result?
I found HIP File Options within the Preferences saying 1m = 1 Unit, 1kg = 1 Unit. So far so good. But scaling for example an Apple (model provided by Digital Tutors) and a Groundplane to 0.1=10cm units (SOP-Level using a Transform Node) gives me very odd results. The apple is falling unrealistically fast. For the math part, it makes somehow sense, because Gravity is set to -9,8m/s^2) but it doesnt look real...I'm no physicist by all means, but it looks strange. The false scale values (the apple being about 2 units in size which would be 1m radius(!!) looks natural though. I'm confused http://forums.odforce.net/public/style_emoticons/default/wink.gif
So how do you approach this scale issue correctly?
Thx in advance for your help, and again cheers!! http://forums.odforce.net/public/style_emoticons/default/smile.gif
11 November 2011, 06:14 PM
Definitely change the main preferences units to what you want. It defaults to 1 Houdini unit equalling to 1 metre.
This preference only works before you build your simulation. It will adjust any Gravity Forces and Density/Mass parameters on new Simulation objects.
Changing the above preference does not adjust any of the parameters in the simulation which is what I presume you are doing. You have to go in to your simulation object nodes (RBD Object DOP, RBD Glue Object DOP, etc) and adjust the density parameter. Just multiply it by your scale factor. Same goes for gravity.
Actually, here's a tip. You can create a global variable in Houdini and call it say "UNIT_SCALE". You can set this in the "Aliases and Variables..." Dialog from the main Edit menu.
You can then multiply your Density values and Gravity (and anywhere else you need to adjust the scale for) and just change the global variable and done.
Density: 1000 * $UNIT_SCALE
Hope this gets you going.
11 November 2011, 01:17 AM
You need to think about the physics. If you think about what dropping an apple looks like, over a range of 50-100cm, say from desk height to the floor, it happens very fast, so you need to setup the simulation in such a way that the units give you the result you are looking for.
Drop an apple from a couple of floors up, how long would it take to reach the ground and what would it look like?
11 November 2011, 11:55 PM
Thx for the tips folks! It seems to work now! I just tried out everything you said. The global variable ist great, one location to set the value, and then simply use the variable. Nice one! That's indeed helpfull (also for other things, not just RBD's).
I also took penboack's tip seriouse and searched my attic for my good old physics teaching books and did some math right away. According to the book (and a friend of mine wich actually is physicist) it takes an apple about 0,4something seconds (10 frames), to fall from 30cm to hit the ground plane. So it was perfectly correct what I saw at the first time. What made it look odd I guess was that I had to less substeps calculated for my simulation to make the apple perform correctly. I raised the number up and it looked nice! And I guess I had become so used to look at too slow running simulations (which is default in Houdini due to the large values for one unit being 1m) that I interpreted the correct solution being "to fast".
Thx to both of you for helping me out with this one! :)
11 November 2011, 11:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.