Rippling water using bones and physics
Posted: Sat Jun 26, 2010 12:18 pm
Here's a trick to create fairly realistic water ripples. The key is a LOT of bones. The more the better. You can use fewer bones of course.
http://www.lowrestv.com/images/files/water-ripples.anme
http://www.lowrestv.com/images/files/water-ripples.mov
I am including a menu script for creating bone chains very quickly. This script can create "grids" or just rows or columns of bones. Put this script in /scripts/menu/ folder and restart AS.
http://www.lowrestv.com/images/files/hv_bone_chains.zip
The technique uses a long chain of bones and a vector shape with at least 1 point for each bone. This chain is slightly curved so there is some slack for the rippling. The bone layer physics is set to "pivot on origin". The LAST bone in the chain has "lock tip" set with the bone physics tool. This creates a chain of bones locked at both ends.
Underneath the bone layer are some oddly shaped vector layers set to pivot on origin with a motor. These layers will bump and prod the bones keeping them moving and bouncing to simulate rippling. You can look at the file to check the density and gravity settings.
---------------
The Spout
The spout could be done with physics or without. The physics in the spout group is "rotated". I had to put in a lot more spinning motor layers to keep it rippling. Not as good as I would like.
Another "easier" way to do the spout is using two chains of bones that are UNPARENTED. Each bone has a "noise interpolation" on frame 0. You should probably set the keys to be different noise values so that the motion is more random. This will cause a sort of rippling effect and can be used by itself to create a water simulation... but the physics version looks a bit more realistic.
-vern
http://www.lowrestv.com/images/files/water-ripples.anme
http://www.lowrestv.com/images/files/water-ripples.mov
I am including a menu script for creating bone chains very quickly. This script can create "grids" or just rows or columns of bones. Put this script in /scripts/menu/ folder and restart AS.
http://www.lowrestv.com/images/files/hv_bone_chains.zip
The technique uses a long chain of bones and a vector shape with at least 1 point for each bone. This chain is slightly curved so there is some slack for the rippling. The bone layer physics is set to "pivot on origin". The LAST bone in the chain has "lock tip" set with the bone physics tool. This creates a chain of bones locked at both ends.
Underneath the bone layer are some oddly shaped vector layers set to pivot on origin with a motor. These layers will bump and prod the bones keeping them moving and bouncing to simulate rippling. You can look at the file to check the density and gravity settings.
---------------
The Spout
The spout could be done with physics or without. The physics in the spout group is "rotated". I had to put in a lot more spinning motor layers to keep it rippling. Not as good as I would like.
Another "easier" way to do the spout is using two chains of bones that are UNPARENTED. Each bone has a "noise interpolation" on frame 0. You should probably set the keys to be different noise values so that the motion is more random. This will cause a sort of rippling effect and can be used by itself to create a water simulation... but the physics version looks a bit more realistic.
-vern