Tuesday, November 18, 2014

Rigid Body Simulation with Houdini

This month I took my first foray into using Side FX's program Houdini FX. Aside from doing some procedural modeling with it, I also did some research on how to to Rigid Body Systems for a marble machine. After creating some geometry inside of Maya to bring into Houdini for the sim, I created a geometry node at scene level, then imported my file with .obj's into the scene. This is where I ran into the first of many challenges to overcome. I didn't stop and think to export all of the pieces individully so that the doors and elevator could be seperate pieces inside Houdini. After re-exporting all of the geometry in pieces, I merge them together. Next it was time to animate the doors and the wheel as seen below which grabs the ball and brings it to the slide.




After all the animation was in, it was time to dive into rigid bodies. First, I created the sphere to work as the ball, and made it an active rigid body. I then selected the geometry and made them static objects. After playing I ran into my first issue. The ball fell but didn't collide with the geometry. After much researching I found that this was due to a bounding box issue with the default solver. To fix this I switched over to the bullet solver, and in the AutoDOPnetwork, I found the sphere node and changed the geometry representation in the collisions>bullet section to concave, which then allowed the collisions on the static geo to actually follow the geometry's actually normals.

The next challenge was getting the ball to roll past the first animated door. It seemed that no matter what was changed it thought the door was in it's starting position throughout the sim. I found that using the same collisions>bullet tab in autoDOP with the option "show guide geometry" on, I could see that indeed, the sim was only taking the static geometry into account. Because the simulation reads the geometry in its inactive state for the entire scene on frame one, you need to have it take into account moving geometry. This was done in the same menu subset, by checking on "use deforming geometry", "use object transform," and "create active object." This solved most of my problems.

Caching Out
Next was tacking the issue of slow and tedious caching. Through some more research, I found that by making a DOPimport inside a new empty geo node, connected to a ROP geometry node, I could create a folder for the cache and then render the cache file. This took about 40 minutes, but I plan on using flip book after, which essentially like Maya's play blast capability, to get a video to post here. Keep an eye out for it soon!


No comments:

Post a Comment