Shattering a glass

             Ncloth is a very powerful tool in Maya. It is not only used to do clothing but also doing special kind of effects. Some great rigid body dynamics can be achieved through ncloth dynamics very easily. If you set up things correctly you can do a very big amount of rigid body dynamics with Maya ncloth without compromising the quality. We already did some nice ncloth effects early.

         In this tutorial I am showing the capabilities of ncloth for doing shattering effect of a glass after hit by a cricket ball. The very same technique can be used to create cracking of wall/earth etc... This can be achieved by mapping certain parameters of ncloth via ramp and animating the ramp accordingly. Using your favourite compositing software you can nicely blend these effects with your video.

Topics covered.

glass cracking
  • Creating the shatters using rockit shatter plugin.
  • Doing the dynamics with ncloth.
  • Preparing for the rendering.
  • Final compositing with After Effects.

1. Preparing the scene.

This is the crucial step in doing ncloth rigid body dynamics.
You have to plan about your mesh. The number of pieces must be optimum for your scene i.e. not more or less amount of chunks.  If you create too low amount of pieces the dynamics will look weird. And if you create too much amount of chunks the system will slow down and even crash while doing the dynamics. You have to think about the capabilities/weakness of your system while doing these kinds of effects.
Another thing the created chunk should not overlap each other .Even touching slightly will create problems. So I used the plug in named rockit shatter. It has the built in capabilities of creating the chunk with desired amount of offsets and smoothness.

While creating the shatter chunks please ensure the following for better and faster result.

  • The source plane should have minimum vertices. So I kept 1, 1, 1 divisions.
  • Delete the history.
  • In the rockit shatter plug in box turn of the smoothness option and reduce the offset amount.( keep in mind the optimum policy)
  • Never increase the amount of pieces more than 15 because creating that much amount of shatters at a time will eat a lot of resources. So do step by step.
  • After creating the chunks select them in viewport and do combine and delete the history. Delete the unwanted group nodes in the outliner.
  • We have created three boxes because I need them. One for shatters, other for the original glass and the last one for doing the mate while comping.
  • The ramp texture controls the dynamics as well as matting. (We will do it later).
  • Combining the chunks will reduce the resources needed and ensure clean workflow while doing the ncloth dynamics.

2.Doing the Dynamics

  • You have to increase the solver attributes in nucleus. When you keep it default some mesh trapping may occur.
Sub steps=12
Max collisions= 16
  • You have to set the start frame to desired amount for avoiding unwanted calculations.
  • In the ncloth object (both active and passive) adjust the collision/self-collision width.
  • Increase the stretch/compression resistance accordingly.( Keep the optimum policy). Do trial and error method.
  • Increase the mass to something about 5.( do trial and error).
  • Also increase the input mesh attract to 1.
  • Attach the animated ramp crated early.
  • If you face mesh trapping problem select trapped check. Adjust the parameters.( Not necessary).

3.Preparing the render

    4.Doing the Compositing with After effects


    Ben Luck said...

    Hey buddy, I'm having an issue with the rockit shatter plugin, in the sense that even though I have all the same settings that you have, that I could see anyway, the plugin is unable to divide into more than two. I get one division no matter what I enter into the box. Any ideas why that would be? Cheers! :D

    FermiCG said...

    Try Rockit shatter on simple plane ( with subdivisions 1,1 and with 10,10 respectively). If it fails, re download the plug in and re enable it in Maya.May be there is some bugs.

    Alternatively try restoring Maya's default preference and settings.

    Silvia said...

    Thanks! I really need this tutorial!