Rookie Awards 2024 - Open for Entries!
Toilet Shatter Sim
Share

Toilet Shatter Sim

Alexandra Cuthbert
by BackgroundWhimsy on 18 Oct 2022

Project 2 of 3 for CSANM 458: 3D Visual Effects, completed in June 2021.

0 268 0
Round of applause for our sponsors

The second project for the Visual Effects class was a rigidbody shatter simulation. We could pick any subject we wanted, so long as it was made of a hard substance that would shatter rather than squish. At the time I was watching a lot of YouTube videos by William Osman, and was inspired for this project by his video of a Tungsten cube falling onto a toilet. The video specified that the cube was exactly four inches wide, so it was super easy to recreate it in Houdini. Once I had a cube at the right dimensions, I just had to look up the density of Tungsten online and let the simulation handle the cube's behavior.

That was where the easy parts ended.

Now, given that the assignment was more about the shatter sim and less about the model being shattered, I probably could have just found a free toilet model online and called it a day. But that wouldn't have given me any practice modeling things and it would've been a lot harder to guarantee that the model was to-scale in the simulation, so I took it upon myself to model my own toilet for this assignment.

Literally.

I based my model off the toilet in my apartment, since it was a real world object I could reference whenever I needed. I went to great lengths to be as accurate as possible, both in my measurements and in my recreation of the toilet in Maya. 

It wasn't enough to just get the outer shape of the toilet right either - since this model was meant to be shattered, the internal geometry had to be accurate as well.

Once the model was done, I imported it into Houdini and got to work on the shatter simulation. Breaking the model into pieces was pretty easy, as was telling Houdini to simulate it as a rigidbody interacting with other objects in the scene. The simulation itself was where things got tricky.

I had hoped that once the model was done Houdini would take care of the rest, but, as evidenced by this render of one of my early simulations, this was not the case.

Physics simulations work best when done with convex objects, but my toilet was a complicated concave object with a lot of cavities. So, I couldn't run the simulation as though it were a convex object, but Houdini's physics engine didn't work very well with concave objects. Despite my best efforts to get it working, the pieces didn't bounce away from each other. They just crumpled into a pile and shivered. 

So - running the simulation as though the toilet were a convex object caused the cube to bounce off the top of the bowl without going inside, but the concave simulation was buggy and broken. I couldn't just hack into Houdini's physics engine and force it to work correctly, so my only option was to find a way to make the convex simulator work with a concave object. 

It took a lot of trial and error and a lot of failed simulations to figure it out. In fact, it took so long and I tried so many things that it wasn't until the night before the final render was due that the solution finally dawned on me.

The convex simulation wasn't right because it treated the empty space between the pieces as though it were part of each piece. The convex shards being used in the simulation weren't an accurate enough model for the shatter to look right, so what if there was a way to make those shards more accurate? To make convex shards behave like concave shards?

I discovered that I could take each of the original 44 pieces of geometry and shatter them again using a Voronoi fracture node and some points scattered across the surface of the geometry, which greatly improved the convex approximation of the toilet in the simulation. Those pieces couldn't stay shattered though, because otherwise the toilet would come apart into about a thousand tiny shards for no good reason. I needed the look and feel of the original 44 pieces with the accuracy of the twice shattered model, so I packed each piece back together into a single unit after the Voronoi fracture.

The physics engine never unpacked the tiny shards during the simulation but it still recognized each of them as a separate convex rigidbody, so I had the best of both versions - a convex shatter simulation of the toilet in 44 pieces, using accurate guide geometry made up of about a thousand tiny pieces.

The final render looks way better compared to the first. I'll be sure to keep my little concave/convex workaround in mind if I run into any more simulation issues like this in the future.


Comments (0)

This project doesn't have any comments yet.