Sunday, December 23, 2012

Gradually 'freezing' particles


Sometimes I needed to gradually decrease the SPH-based particles velocity until they're completely stopped. A bounded Drag daemon is an effective way to apply a 'braking' force to your particles, but if you want to apply such forces in a smooth & progressive way, you may find interesting the following script that I made as an Event script. 

See a sample video here:



So, let's do it. First of all, press Ctrl + F2 to open up Simulation Events window and right clic over Frames Post.

In the pop up window add the following code (replacing the "Circle01" string with your emitter's name): Download
  • increment is the reduction factor of the velocity. Higher values means less reduction, for instance 0.99 will barely reduce the velocity frame by frame all along the timeline, while 0.10 will drasticly reduce the velocity of your particles in a short time.
  • threshold stands for the minimum velocity of the particle prior to get completely frozen.
  • minlife is the minimum life (in seconds) of the particle prior to apply the braking force.
Once your values are set up you just need to clic OK and Simulate.

You'll have noticed that the particles are frozen by setting up their velocity to 0,0,0 (what is described in the script as 'zero_velocity'). Once these particles are completely stopped they can still react and move if other particles collide with them. However you may want that once the particles are stopped in a first term, they keep completely frozen even though other particles / forces collide with them. In that case you just need to uncomment the particle.freeze() line by removing the ## symbols and add them to the previous line in order to comment the 'set velocity to zero_velocity' instruction.

IMPORTANT: Make sure your tabbing is OK if you copy/paste code. Your leading indents should appear pretty much like these ones (click on the image to enlarge):

Friday, February 10, 2012

RealFlow 2012. Breaking a glass


Not an usual straighforwad step-by-step tutorial, but a wider review about how to deal with dynamics inside RealFlow, even integrated with fluids when they're cached, and how to work with animation curves, joints, collisions and how to inherit the motion, speed of one object to another as well.

I hope you enjoy this one, find the simulation video right here.


Saturday, January 14, 2012

Maxwell camera quick set up in Maya

Depending on specific needs or different scenarios, there are different ways to rig a Camera if we want to automatically upgrade the Focus everytime we move the camera, the target or both of them. Find in this video a quick way to connect your Maxwell Camera focus to the Mx Use Manual Focus value in Maya. Easy breezy.

Feel free to explore different riggings matching your needs, every single scene is a challenge.