Search

NOC Week 5/6: Simulations - Cats Are Liquid

I'm currently learning how to animate in Maya for one of my other classes, and I decided to add some physics simulations to one of my animation projects. During the process of creating snow particles for my fox animation, I spent about a week playing with another idea entirely to create water animations using the Bifrost engine. I struggled and failed to create even a small wave using Bifrost, in a panic I ended up switching my entire animation idea mid-project. After that project I decided that I really wanted to give myself a crash-course in Bifrost. I want to get comfortable incorporating real-world physics into my animations.



A top-down view of the particle array built for the fox animation.


Snow particles hiding in the field until tail/legs (hard body collision objects) interact with them).


So - for this week's assignment, I spent about a week learning as much as I could about the Bifrost system in order to make a simple fluid simulation. While I ended up with a result that I was OK with, it was a pretty grueling process.


Calculating the simulation takes about 5 minutes to cache, so it became really difficult to mess with the parameters and understand how they were effecting the visual output. But I've learned a lot about Bifrost and can confidently produce some fun and interesting fluid simulations. While this week's simulation is quite simple, I hope to produce more complex and dynamic fluids in the future. I also want to experiment with Maya's Bullet physics engine, once I get the fluids down.


Maya's Bifrost system has some very important differences than Maya's default particle system. For one, Bifrost is a dedicated fluid dynamics simulation engine, whereas nParticles were never intended to simulate liquids to begin with, but are great for other things like cloth, and in my case - snow.


Bifrost and nPartcles are built to work in meter units, which makes sense because all of the forces built into the system are calculated in meters (Earth's gravitational acceleration is roughly 9.81 m/s2). This is particularly frustrating in Maya because it reads all objects in centimeters regardless of the units that you set in your preferences. Basically anything you bring into Maya (as long as it was built in centimeters) needs to be scaled to 1/100th of it's size in order to have an accurate simulation. This is something I was unaware of until I started learning more about Bifrost, as I had previously spent several days unable to figure out why I kept crashing Maya - my 3D meshes were physically just too massive to render the particles on my current CPU.



My view waiting for the simulation to cache, you can see all of the options for adjusting the simulation on right. I mostly played with Solver Properties, Viscosity, Erosion and Surface Tension. But there are many more settings to fine-tune.


Because I didn't learn about the scale requirements until after my fox animation was complete, I had to play around with the gravity, air density and drag settings in Maya in order to get the snow to render somewhat believably. I wish I could have added more particles into the sim, but unfortunately the scene was already too dense for my laptop to handle.


Struck by divine inspiration from watching loads of cat videos on YouTube while I was working on this fox animation, I decided I wanted to render a cat in it's most purest and natural state - as a liquid. But when rendering fluids, you need a container to keep it all in - so I built a nice little cat box as my CCD (Cat Containment Device), as well as a home.


I still had scaling issues despite building everything in what I believe what the correct units, so everything had to be converted to about 1/10th scale in order for the simulation to run. But once the particles show up and the sim starts caching relatively quickly, I know I'm in business.


By default, Bifrost renders liquid as water, with the surface tension and all material values of water. Did you know that water has a higher surface tension (72.8 millinewtons/meter) than most other liquids? I wanted my simulation to be somewhere in-between water and molasses, so I played with the viscosity to get the desired effect.


Furthermore, I ended up lowering the gravity in order to produce a slower animation as I didn't want to render anymore frames/second due to the fact that I've been subjecting my computer to overnight rendering sessions for about 6 days straight, but it does produce an interesting effect to the animation. It's not an accurate simulation of a cat on Earth, but visually I like the result.



I originally made a rubber duck that I wanted to have float in the liquid, however Maya doesn't like to dynamically float objects that aren't using their ocean generator system - so that will have to be for another project. But I think I want to make an arcade game simulation next, like a pachinko or a coin-pusher machine - so we'll see.



© 2020 by Dhemerae Ford