The dynamic ripple modifiers uses a custom physics system to simulate ripples moving over a water surface. The modifier allows for rain type drops as well as basic interaction from a mouse drag. Some helper scripts are also provided to allow you to add floating objects to the scene that interact with the ripple modifier and to provide a starting point for your own scripts to interact with the system.
Dynamic Ripple Param Description
The Axis that is up in the local space of the mesh, if the mesh is a flat plane then the system will automatically pick this value for you, but if you use something other than a flat plane then you will need to set this.
How many columns to use in the physics representation of the water surface, the higher the value the better the simulation but there is no point in using a higher value than the number of vertices across the plane, ie if the plane mesh is 64 by 64 vertices then 64 is a good value to use. Use lower values for less cpu usage.
How many rows to use in the physics representation of the water surface, the higher the value the better the simulation but there is no point in using a higher value than the number of vertices down the plane, ie if the plane mesh is 64 by 92 vertices then 92 is a good value to use. Use lower values for less cpu usage.
How quickly ripples dissipate, a value of 1 will mean the ripples go on forever, a low value of say 0.5 will cause the ripples to almost instantly fade away.
How quickly ripples from mouse input dissipate, a value of 1 will mean the inputs will remain deforming the surface, a lower value will cause the inputs to die away, use this value to change how much of a wake is left.
This allows you to increase the size of the ripples without changing the physics, or make very small ripples that last a long time.
Not used currently leave at 0.5
How much force a drop will add to the system, increase this to get larger splashes.
How much force the mouse input adds to the system, increase this to get deeper wakes.
Not used currently.
Drops Per Sec
In play mode this says how many rain drops will fall each second, use 0 to have none.
The physics will automatically update if any changes to say row, columns or axis are detected, but you can force a rebuild by clicking this button.
Dynamic Ripple Class
public MegaAxis axis;
public int cols;
public int rows;
public float buffer1;
public float buffer2;
public int vertexIndices;
public float damping;
public float WaveHeight;
public float Force;
public float DropsPerSec;
public float speed;
public float input;
public float inputdamp;
public float InputForce;
public bool Obstructions;
Dynamic Ripple Tutorial
Video of Features
First test of a floating rigid body system linked to the Dynamic Water modifier in MegaFiers for Unity. Works quite nicely but I think I can improve things, but the Dynamic water modifier has a method to get the water height for a given point and methods for adding forces to the water, so anyone can code their own interaction scripts for the system.
Click the image below to see the video.
You must be logged in to post a comment.