Im making a game and i want ripple effects when the player walks through the pool. I was on the sample scene for the pools and it was too ,confusing. I want the rings that appear when something lands in the water but i cant find help anywhere. Please help
I’ll try to explain what is done step by step so that hopefully it makes more sense in the case of the Pool scene:
- First we need a way to detect when the beachball crosses the water surface. To do that, there’s script (TriggerSplash) monitoring the position of the beachball. When this vertical position goes from above the surface (>0) to under the surface (<0), we trigger the effect.
- The effect is composed of two main things, first one is the VFX (WaterSplash) which is a prefab that is instantiated when the effect is triggered. You can explore the VFX graph for more details.
- The second thing is the ripple (Deformation Ball), which is also a prefab that is instantiated when the effect is triggered as well. This prefab is initialized with values depending on the velocity of the beachball when it crossed the water surface (because faster ball means bigger ripples)
- This deformation prefab is simply a Water Decal (with deformation input checked) using a donut shaped texture as a height map to generate the ripple shape.
- To make this ripple evolve, the script called DeformationManager simply scale its transform and lower the deformation amplitude with time (so that the ripple extends outwards and dies off slowly).
This is just a way to do it, there can be different (and even better) ways to do it, epecially now that we have the Shader Graph for water decals.
Lastly, for optimization purposes, the prefabs are instantiated at startup in a pool of objects to avoid stuttering. This pool of objects is then used and recycled when needed.
Don’t forget to check the information contained in the sample when selecting the gameObject “Water Sample Description”.
There is also the Island scene, where you can move the Sailor using the directional arrows of your keyboard generating a ripple trail when moving through the water. It’s basically the same system, but without the trigger at the begining.
Is there any way you could give me the donut shape texture or how to make one?
It’s nothing complicated and it’s already available in the samples.
Assets\Samples\High Definition RP\17.2.0\Water Samples\Textures\Pool\Circle.png
You can use it however you like.
I have the circle but how to i apply it to the decal. I put it on a height map on a material and put it in the decal, it siad it had to be a water shader
Materials using the HDRP/Lit shader are mostly used for meshes.
Materials using the HDRP/Decal shader are used for Decal projector components
To create deformation on a water surface, you need to use a Water Decal and use a Water Decal material on it.
I suggest you read the documentation concerning the use of Water Decals here ![]()
