NURBS or polygonal surfaces that are converted to unyielding shapes are called rigid bodies. They collide instead of passing through each other during animation, which is unlike conventional surfaces. Fields, keys, expressions, rigid body constraints or collisions with particles are all used to animate rigid body motion. In Maya, there are two kinds of rigid bodies – active and passive. Active ones react to dynamics such as fields, collisions and springs, but not to keys. Passive rigid bodies on the other hand have active rigid bodies collide with them. You can key the translate and rotate attributes but dynamics have no effect on it.
To me, in simpler terms, this means that active bodies are dynamically stimulated, while passive bodies remain static.
Our lesson was clearly going to involve the use and application of rigid and passive bodies in Maya, and we were soon shown what simulation we would be creating to see their functionality.
Our task this time was to create a bowling alley with pins and a bowling ball, in order to make them collide and see how the bodies affect each object. As stated above, the first step was to create the scene, which meant making three different models, all of which were very simple. For the alley, I simply stretched out a poly plane to an appropriate size and added some edge loops, which I extruded for the elevated sides. The ball was the easiest to make since it was just a sphere, and for the pins, I used a cylinder as the base, which I then extruded roughly in the bowling pin shape and applied smooth mesh preview afterwards to make it more realistic. After some tweaks to the size of the objects, to make sure that they were all realistically scaled to each other, I duplicated the pin and moved them into the triangle setup.
Only after duplicating it did I realise that I had yet to move the pivot point to the bottom, in order to snap them to the ground. Here, I made my first mistake, since I had to select all of the pivot points of the pins at once and then move them to the bottom. This little action would mess up the entire simulation later on (honestly, why is Maya so finicky?) and would be the reason for my starting again. For now, though, I was happy with my scene and ready to create the bowling simulation.
As usual, I had to first select ‘FX’ in the drop-down menu at the top right before doing anything. I then selected the bowling ball and went to ‘Fields/Solvers’ at the top of the page. There, I selected the tick box for the ‘Create Active Rigid Body’ option for the more in-depth settings. I was instructed to give the ball more weight, which made sense since it needed to knock the pins over and bowling balls are quite heavy anyway. I changed the mass to 10, made sure that the ‘active’ box was ticked, and then clicked ‘create’.
There wasn’t really any visible change, and it was one of those times where you wouldn’t truly know if it worked until you played the sim through. I had to repeat that procedure for the other items as well since they wouldn’t respond to one another otherwise. I selected all of the pins and pulled up the Rigid Options box again, this time changing the mass to 0.8, making them significantly lighter than the ball. I clicked on the plane next, but this time when I went into the ‘Field/Solvers’ menu, I selected ‘Create Passive Rigid Body’ instead, without clicking the box this time.
Now, it was time to apply the final few steps and add the next levels of realism to the scene for everything to work. I selected all 10 pins and the ball, went to the same dropdown menu at the top of the page again and this time chose the gravity option. As the name suggests, this added gravity to the simulation to ensure that the ball and pins didn’t fly away. However, it still needed to move and there was no force spurring it onwards as of yet. So I clicked it and hopped into the channel box editor on the far right of the screen. I needed to set the velocity on whichever axis the ball was going to travel on to 20, which could be changed as needed. I glanced at the nifty axis indicator at the bottom left of the screen and saw that my ball was travelling along the X-axis. So, I changed the number to 20 and also changed the frame number. At the bottom right, underneath the timeline, there are two boxes that house the number of animation frames I had. I changed the value in the first box to 300 and the second box automatically changed after this. The moment of truth had arrived. I skipped back to the start of the simulation and clicked ‘play’.
I didn’t playblast at this point sadly (I was probably too distracted and distraught with the failure of my animation) but I did get a screenshot of the main issue I was having. When I played, the first thing I noticed was that the ball moved in the wrong direction, and didn’t collide with the pins at all. That was the first problem to fix, but it wouldn’t matter much anyway since the pins sank through the plane! I couldn’t understand why this was happening, since all of the pivot points were at the bottom, and the pins were snapped. Before I could get to that, however, I figured out that my ball was moving in the wrong direction because I had made the entire sim in the underside of the grid. Instead of faffing around with rotating it, however, I simply made the value negative (-20) and after playing it through that time, the ball was shot towards my pins.
I still had the mystery of the sinking pins to solve, however. The tutor and I mulled over why it could be happening, but after trying to remove the rigid bodes, delete all the pins but one and re-duplicate and various other things and not succeeding, we came to the conclusion that I had to start again and re-model my pins. I sorely regretted not moving the pivot point before duplicating the first time, and after re-creating the pin I made sure to do that first. Remembering the early lessons, I clicked ‘D’ and went into ‘edit pivot mode’ after which I held down ‘V’ to snap it accurately to the bottom. Now that my pivot point was in place for sure, I snapped it to the plane, copied my pin and re-positioned them all for the second time. I re-applied rigid bodies and gravity and played again, with my fingers crossed.
It worked! I will know for next time that the object should ideally be fully prepped before duplicating, although I do still wonder why things always have to be done in a specific order or a specific way with Maya. Once we had created a successful bowling simulation, we were told to try something new and come up with an idea of our own. The main goal was to use active and passive rigid bodies in a different, but still interesting, scenario. The very first thing that popped into my mind was dominos, and I was very excited to try it out. I have since realised that the idea wasn’t very unique, after minimal research and some Maya-image scrolling, but it was still cool to see the rigid bodies in action again.
In a new scene, I scaled up and extruded a poly plane like last time, moving the top face of the walls outwards slightly to add some interest. I then generated a cube and shaped it into a domino, which as you can imagine, is very easy to do. Then, it was just a matter of creating the ball, duplicating and positioning the dominoes and applying the rigid bodies + gravity + velocity combination. I was aware that a square plane wasn’t a very versatile interesting shape for a domino topple, but there were ways it could have been made more fun later on. For example, I could have elevated the middle and added more dominoes there, leading onto the ground.
I stuck with a simple set up though, since I actually wanted the simulation to succeed first and foremost before trying anything fancy. I think I made the bend too sharp however since only the dominoes at the beginning were toppled. It was still nice to see everything working correctly, however, which means that I managed to create a realistic simulation from the first try.
The ball’s mass was 5 and the dominos were 1, if I remember correctly, which was my guess at the ratio between a small metal ball and wooden blocks. If I made the turns more smooth and curved, the domino topple would have continued, but it wasn’t the best idea to set everything up in a square shape, which I see now.
Despite it all, it was fun to experiment. I changed the velocity of the ball a couple of times, but after trying to make it under 4, the sim crashed and I had to go back to 5 and above. I think I should have tried making the ball faster instead of slower, and moved the dominoes around more, but I left it at that, happy that I had managed to get it to work anyhow.
Learning about and using rigid bodies has been interesting, and I can see their usefulness in a lot of different scenes, such as a marble toy kit, where the ball goes through different loops and slides, or perhaps a city if we’re thinking in more grand scales. A wrecking ball or avalanche of rocks could benefit from rigid bodies in order to collide with the buildings and cars.