Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
Theme color:
  • 1/3
You are here: Homepage /  Blogs /  Duncan's Blog / Some fun stuff in Maya2011
Some fun stuff in Maya2011
Posted: Mar 11, 2010
Category: Autodesk Maya, nCloth, nParticles, Tips and Tricks, Tutorials
Social Media:
Bookmark and Share
 

Maya 2011 

For scene files look here

 
 
Maya2011 has now been announced. You can find the “what’s new” list here:
what's_new_in_2011

While the focus of this release was the transition to the QT based user interface, there are lots of other nice features and enhancements. Here are some of my favorites of the ones I worked on.


Fluid Auto Resize

I have found that this really changes the way I work with Maya Fluids, especially for flame and explosion simulations. This automatically contracts and expands fluid boundaries to track the contained density. It also takes emitters into account, so one can simply position the emitter anywhere desired and at the start frame the fluid will fit to the emitter location even if the emitter is outside the fluid. For effects like torches it feels like the fluid is no longer confined to a box. As well the simulations tend to run much faster because there are fewer voxels to compute, cache and display. One can also lock down specific boundaries, set the threshold for resizing, set limit bounds, and set overall total voxel limits. Note that autoResize also works with 2d fluids as well as fluid wakes on the ocean. Thus one can have boat wakes that will follow the boat anywhere, instead of being confined to a fixed square area.

Here is a simple playblast of a torch that uses auto resize. Notice how the fluid(green box) jumps and expands/contracts to fit the emitter and smoke. Also the emitter pushes the fluid when it moves as well.

 

Keep Voxels Square

This new attribute is on by default and makes it much easier to edit fluid bounds and resolution. To increase the resolution one simply drags a single slider. Also when one edits the fluid sizeX,Y,Z the resolution automatically adjusts to maintain square voxels. This is a very simple thing but I find it makes fluids much easier to use.


Fluid as Field

We now use interpolated fluid voxels when applied as a field, so particles driven by fluids have much better detail and fidelity of motion. (When applying a fluid as a field make particle conserve zero to best follow the fluid flow)

This playblast shows a simple cloud particle system pushed by a fluid. The fluid display is disabled so only the particles are visible, but the fluid has a density emission that roughly matches the particles. This scene also uses a bit of the new fluid self attraction force which helps to keep the flow together in tendrils. The fluid has auto resize on so at any frame the fluid is not much larger than the particle bounding box.  The collisions with the spiral mesh are accomplished by making it a surface emitter into the fluid. It only emits speed, using the replace method, and has inherit velocity on. Thus where  the mesh intersects the fluid it sets voxel velocities to zero when the mesh is not moving, which mimics the effect of collision, and when it rotates it then pushes on the fluid.


Fluid Texture Rotation


Now that particles compute rotation we can take advantage of that when rendering with the “thick clouds” method, which uses a fluid shader. The rotatePP can drive the rotation of the internal fluid texture on each particle, which can create much more realistic smoke, especially when using fewer, larger particles. One can also potentially use this in effects like tornados.

This animation shows a few very large particles with rotations computed automatically by the particle simulation. The rotatePP is used to drive the texture rotation on the fluid shader.  Without this each particle would look the same. Note that this is just to show the technique and that one can get a more natural effect with more particles and by driving texture time by particle age. In this example each particle is identical except for scale and rotation.


Fluid Emission Improvements


There are numerous improvements to fluid emission this release.
Emit From Particles: One can now emit fluid from particles. This is a very powerful technique and really extends the kinds of effects possible with fluids. With very high dissipation on the fluid one can even think of the fluid as a method of rendering particles. The particle streaks into a fluid are great for blast effects and mixtures of solid chunks and dust. Waterfalls are also easy to do with this method. One can use particle goals to create simulations where it looks like the fluid organizes naturally into shapes. This emission can be from a fix or a per particle radius value and also can motion streak fast moving particles into the fluid. The velocity of the particles can be used to affect the fluid velocity as well. Auto resize will automatically expand the fluid to fit any emitting particles.

This playblast has some particles emitting into a single fluid node( the fluid also uses auto resize). The particles are hidden and only the fluid is displayed. The particles simply die after a few frames, although one could fade out the emission rate or scale down the radius before death for a more gradual effect. However it is nice the way the dissipation on the fluid provides a natural fadeout when the particles die.

 

 

This playblast shows particles both emitting into a fluid and as well having their motions driven by the fluid(fluid as a field). There is also a small bounded field creating an upward push to sustain the spinning of the fluid. Normally density on a fluid will tend to diffuse after rotating around a vortex, however by using particles to carry the density it keeps the simulation from becoming blurry. The higher the dissipation on the fluid the more one just sees particle "balls" moving around so it is a bit of a balance to use just enough dissipation for a natural fluid look while not getting too diffuse.

 

This playblast shows how one can use particle goals to provide a fluid animation that moves to a target shape, in this case the word "Maya". As with the previous example the higher the dissipation on the fluid the more one sees the underlying particle motion. Too high dissipation and it looks simply like the particle simulation, too low and it looks more like one simply uses the Maya text as a fluid emitter. With the right balance it can look like a targeted flow of smoke, which looks quite different from techniques such as emitting from text then reversing the cache. This might also work well for a character made out of smoke.

 

This animation combines several new techniques but relies heavily on particle emission into fluids. The main fluid in this scene uses auto resize, so the "bomber" is not limited where it can go. The particles emit into the fluid just before dying, and this emission creates the primary puff that travels upward(due to temperature buoyancy). Also when they die the particles emit into a second particle system, which is used for the streaming chunks of dirt kicked up by the blast. This second particle system emits into a second auto resize fluid that is used for the dust and dirt from the blast. Note that no particles are rendered except for the bombs. The ground is cratered by using a fluid texture with static grids as a displacement and color map. The bomb particles emit into this fluid texture when they die, forming the craters. In order to get the particles to correctly collide with the displaced craters the new feature displacement to poly with construction history was used.

 
Textured Emission: One can now texture all emission attributes (using 2d textures). The UVs are determined as appropriate for volume, curve and surface fluid emission. Also conversely one can now use 2d fluid texture to texture particle and fluid emission, so one can do things like a dynamic 2d burn propagation across a surface and have it emit particles and fluid smoke.


Emission Speed: Fluid emitters can now affect the velocity of the fluid similar to emission velocity on a particle emitter. This also supports inheriting the motion of the emitter, where this motion includes rotation of volume emitters as well as deformation of surface emitters. One can use a surface as a fluid emitter such that it both blocks fluid motion when stationary and pushes it when deforming.


Motion Streak: Fast moving emitters will smoothly emit across the motion of the emitter rather than creating discreet puffs. This method also provides smoother jitter free emission of the fluid even when not moving.


Emission Method: the “replace” emission method allows one to directly set the fluid to a target value, rather than continually adding into the fluid each step. In the past one had to resort to scripting to accomplish this. For example the wind tunnel examples use an expression to set fluid inflow/outflow values. This sort of thing can now be done directly with an emitter.

In this playblast note how the motion of the emitter is smooth over fast motion, even when scaled and rotated quickly. As well the scaling and rotation affects the velocity of the fluid because inherit velocity is set on the emitter. Note how spinning the emitter acts like a propeller. This simulation also uses the new forward advection method which allows density to compress together forming tendrils. A low solver setting allows the fluid to compress and stretch which allows the 2D fluid simulation to look more like a 3D one. Without forward advection the fluid diffuses heavily with low solver quality settings.
 

  
nParticles

Output Mesh Improvements: UVs, color per vertex, motion blur. With the ability to have particles drive mesh uvs one can then apply maps and displacement to particle surface that track the particle motion. This is great for effects like lava.

In this animation the particles were emitted from a plane with inheritUV. A 2d fractal displacement with matching incandescence and bump maps was applied to the particle to poly mesh. As long as the blobby threshold is not too low the interpolation of uvs from the particles for the mesh works quite well. The flames and smoke are a single 3D fluid with auto resize used, where the partice out mesh is used a surface fluid emitter.


Rotations: nParticles compute a rotation per particle based on collisions(including self collisions). This makes it much easier to use particle instancer for pseudo rigid body effects. The rotation calculation does not any notable extra overhead to the normal particle collisions.

In this playblast some self colliding nParticles with randomized radius are dropped onto some geometry. A simple gem shaped object is instanced to the particle system and its scale and rotate values are driven from the particle system radiusPP and rotatePP. Note that the rotation computations do not affect the translational motion of the particles( unlike rigid bodies ). The slowing down when rolling is due to friction, not the non-spherical shape as would be the case with a rigid body system. There is a separate rotational friction to control the degree to which contact influences the particle rotation.

This is instanced particles with rotation as in the previous example, but the liquid solve method was used, which provides a type of soft collision that is faster than the normal self collisions. With this many particles one can still interact with the simulation while it runs(about 15 fps on my machine).

 

Surface Tension: The particle liquid solve now supports surface tension

In this animation there is no gravity and a sphere was filled with water particles with some surface tension. An addition emitter in the middle is emitting gas particles that collide with the water ones and also self collide, causing a bubble of smoke in the water that then pops.

 

nConstraints now work on emitted particles: This allows one to do things like emitting stringy stuff and glop, among other effects.


This simulation has some emitted particles held together with a max distance nConstraint. The glue strength on the constraint is less than 1 which allows the goop to be cut.

Something else that I’ve not played with much is the new ability to set viscosity per particle. This could allow interesting effects where goop melts and hardens locally… like wax in a lava lamp as it starts to heat up.

 

nCloth Deformable Rigidity: Rigidity now works with deforming input meshes.

In this rather odd test I create a complex paint effects stroke where I animated branch angles and then converted it to poly and made it nCloth. This pfx cloth has rigidity along with a constraint to a simple cloth strip. I then used the cloth output mesh as a surface emitter for an auto resize fluid.

 

Fluid Self Attract and Gradient forces: Fluids now have a variety of new force effects that can create interesting effects

With self attraction effects combined with forward propagation the fluid can develop and maintain detail over the course of the simulation, resulting in interesting effects that are like fluid dynamic fractals. The above animation just emits with some dropoff at the start frame then injects some more density and velocity part way through. The gradient attraction effect was used.

The density on this 2D fluid animation was initialized from a photo and then self attract with forward prop and low solver quality was used for this interesting effect.

One other point worth mentioning because it was not in the what's new document... Some of the nCloth collision routines have been threaded, which can result a performance gain for some scenes. There is still much that is not threaded in the cloth solve, so the performance does not scale with procs very well yet, but this still results in signficant improvements over Maya2010. Collision heavy scenes can run around 50% faster.

Phew! That's it for now. That's the most animations I've ever uploaded for a blog post!

In order to post any comments, you must be logged in!
Newest users comments View All 126 Comments
Posted by Duncan Brinsmead on Jun 22, 2011 at 03:05 PM
You can find the scene file for that smoke here:
area.autodesk.com/blogs/duncan/scene_files_for_fun_stuff_in_maya2011
The scene file is goalSmokeLong4.ma, and there is a brief explanation. The basic steps are
1. create a particle simulation with goals to the text (you can find tutorials on use of particle goals around the web) In this case I used the turbulence on a volume axis field to make the motion less uniform.
2. Create a 3d fluid container and emit into it from the particles.( fluid->emit from object with particles selected) Set the emission type to omni on the fluid emitter and set the emitter max distance to about the size you want the particles to be. Also turn on motion streak on the emitter and make the rate fairly high.
3. On the fluid make density dissipation high... if it is very high then you will simply have particles moving around. There is a butter region where one can get some smooth dynamic fluid behavior, yet still track the particles well.
4. One can also enable speed emission on the fluid emitter and use the inherit attribute to push the fluid with the velocity of the particles. Depending on the simulation you may wish to make density buoyancy zero.
Posted by dyei on Jun 22, 2011 at 01:20 PM
hi duncan, i just wanna know which are the steps for a set up like the nParticle driven fluids and goals,

i mean this one: goalMayaSmokeLong4.flv

which are the steps to perform a set up like that?
Posted by JimBean on Mar 28, 2011 at 11:25 AM
Fun stuff in 2012, would make a great anniversary tradition post.
Posted by jeetvfx on Nov 26, 2010 at 03:28 AM
Thanks for the great advise, it helped .people like u are real resource of maya cummunity. Thanks again.
Posted by Duncan Brinsmead on Nov 24, 2010 at 03:04 PM
The rising heat example( and all the wind tunnel examples ) use an expression to emit into the fluids. This was needed in the rising heat example because we need to set a fixed temperature at the top and bottom of the fluid(hot at bottom cool at top). If we instead used an emitter it would continually add each step, causing the temperature to keep rising. However in Maya2011 one can now set these up without needing a mel expression because emitters now have a "replace" mode that sets fixed values instead of continually adding in( we also can now emit speed with "replace", which works well for creating constant inflows to simulate wind tunnels).

To see the expressions in those scenes just bring up the expression editor, display by name and select them. They use setFluidAttr to set values on the fluid grid. This is very flexible and allows one to do things that are still not possible with fluid emitters. One could even write an expression that was a full fluid solver, although that would be ungodly slow.