-
Notifications
You must be signed in to change notification settings - Fork 0
Dynamic Ripples
Dynamic Ripples work via a setup with a ripples particles using a custom shader applied to a ripple particle, which is viewed by a camera only rendering ripple particles. Precise setup of the Dynamic Ripple system that does not adhere to proper setup will result in a broken mess, so read carefully.
Dynamic Ripples begin with enabling the "Dynamic Ripples Logic (DO NOT MODIFY)" object underneath example LitMAS Water Volumes included in the package.
After enabling, make sure to assign a unique render texture (There is already one assigned, however if you plan on having multiple volume with dynamic ripples, then you will need separate render textures for each of them) with a resolution of at least 1024x1024. After this process is complete, that is all you need to do.
If you want water ripples around the area where a waterfall enters the water surface (for example), you can utilize pre-placed ripples. Additionally, if you do not want dynamic ripples for objects that enter the water (Saves performance) then you can also utilize this.
To use pre-placed ripples first disable the Ripple Triggers (PLACEHOLDER) object, and keep the Ripple Camera enabled ONLY. Then navigate to LitMAS Water/Systems/Ripples, where you will find Ripple Emitter - Ring.prefab, drag this onto your water surface, and you will notice it beings to emit ripples that show on the waters surface. This is a pre-placed ripple.
To adjust the individual intensity of a pre-placed ripple, dim the color. To save on performance, the pre-placed ripple emitter should emit as little amount of particles as possible, while still fulfilling your visual desires.
Adjust the Rate over time value under Emission on the ripple emitter to adjust how many particles are emitted. The Simulation Speed value can also be adjusted to reduce the amount of particles over time.
To have custom-shaped ripples, make your own ripple ring, which should have a smooth falloff on all edges, inside and out. The ripple ring included in the package has a falloff of around 15px, this is necessary to create a smooth falloff between the ripple edge and the water.
Then, simply clone the existing ripple material on the ripple particles and assign your new ripple ring, or, create a new material, assign the Ripple shader, located in AtlasShaders/LitMAS Water/Ripple
While largely the same as pre-placed ripple customization, dynamic ripple customization requires an extra step. The dynamic ripple particle that is hooked onto objects that enter the water is found in LitMAS Water/Systems/Ripples/Ripple.prefab. This ripple prefab is what is used for dynamic ripple particles. Customize it the same as pre-placed ripples, and save.
If you want different ripples for different pools, then you will need to clone the Ripple.prefab, customize it, and locate the Ripple Trigger object under Ripples Triggers on your water volume. From there, scroll down the UltEvents list, and find the gameobject.Instantiate event, and drag in your custom ripple prefab.
Enable debug view to view the dynamic ripple render texture directly on the water surface. If you are making a ripple camera from scratch, this can help with alignment.