Puddle VFX system [HDRP, URP] Documentation for Unity

INTRODUCTION

Puddle VFX System is a customizable puddle solution for Unity using a custom depth-based volume projection method.

The shader reconstructs visible scene surfaces from the camera depth buffer and projects the puddle onto geometry inside the projector volume. This allows puddles to conform to uneven surfaces without requiring custom UVs or modifications to the materials underneath.

The system includes controls for puddle shape blending, edge breakup, erosion, animated water waves, rain ripples, slope exclusion, distance fading, reflections, and randomized variation.

The package supports both URP and HDRP and includes ready-to-use presets for different puddle styles and sizes.

The shaders were created using Amplify Shader Editor. 
Amplify Shader Editor is only required if you want to edit the original shader graphs.

Package Requirements

  1. Unity version 6+
  2. Project created using either High Definition Render Pipeline (HDRP) or Universal Render Pipeline (URP)
  3. Camera depth texture / depth information enabled as required by the selected render pipeline
  4. Amplify Shader Editor is not required to use the included shaders

How to install

  • Import the package into your Unity project.
  • Open the folder corresponding to your render pipeline:
    • HDRP
    • URP

INCLUDED PREFABS

Includes 10 puddle presets. 

7 appearance presets and 3 size presets:

  • Urban Shallow
  • Heavy Rain
  • Rocks
  • Indoor
  • Mud
  • Grass
  • Oil
  • Small
  • Medium
  • Large

How to use

Basic puddle setup
  1. Drag a puddle preset prefab into the scene.
  2. Position the projector volume so that it intersects with the target surface.
  3. Scale the projector in X and Z to control the overall projection area.
  4. Adjust Puddle Size, Scale X/Y and Rotation to customize the puddle shape.
  5. Assign one of the included materials or duplicate a preset and customize it.
  6. Optional: Add the Puddle Randomizer component to quickly generate variations
Shape blending

The puddle shape can be created using one or two independent shapes.

Shape A controls the primary puddle shape. Enable Second Puddle to add Shape B and combine both shapes into a single puddle silhouette.

Each shape has independent controls for shape index, rotation, size, and X/Y scale. Combining two shapes allows a large variety of puddle silhouettes without requiring additional textures.

 

Edge and erosion

The edge controls can be used to make the puddle outline cleaner or more irregular.

Edge Breakup Strength controls how strongly noise affects the puddle edge, while Edge Breakup Size controls the scale of that variation. Edge Softness adjusts the transition between the puddle and the surrounding surface.

Puddle Erosion gradually reduces the puddle shape and introduces more irregular breakup as the value increases. This can be used to create anything from smooth water spills to fragmented natural puddles.

 

Water waves

Water Waves add subtle animated surface movement to the puddle using normal-map distortion.

Wave Strength controls how visible the surface movement is. Wave Rotation changes the direction of the wave pattern. Wave Size controls the apparent scale of the waves, while Wave Speed controls how quickly they move.

Lower values work well for calm indoor spills, while stronger or faster settings can be used for outdoor puddles and rainy environments.

 

Ripple animations

Rain Ripples add animated circular disturbances to the puddle surface.

Ripple Amount controls how much ripple activity is visible. Ripple Size changes the size of the individual ripples, Ripple Speed controls how quickly they animate, and Ripple Strength controls how strongly the ripples affect the surface normal.

Ripples can be disabled completely for calm puddles or enabled for rain and other active water surfaces.

 

Slope exclusion

Slope Exclusion prevents puddles from appearing on surfaces that are too steep.

Slope Threshold controls which surface angles are allowed to receive the puddle. Slope Fade controls how gradually the puddle fades as the surface approaches the excluded angle.

This allows puddles to remain visible on horizontal and gently sloped surfaces while fading or disappearing on steep and vertical geometry.

 

Depth projection

The puddle uses depth-based volume projection to conform to visible scene geometry inside the projector.

This allows the effect to follow uneven surfaces and objects without requiring additional UVs or changes to the underlying material.

The projector volume defines the area in which the puddle can appear. For best results, keep the projector only as large and as tall as necessary for the receiving geometry.

 

Puddle Randomizer

The Puddle Randomizer component can be added to any puddle setup you want to vary.

  1. Select the puddle GameObject you want to randomize.
  2. Add the Puddle Randomizer component.
  3. Make sure the puddle renderer is assigned in the component.
  4. Adjust the randomization ranges if needed.
  5. Use Randomize Shape or Randomize Everything to generate a new variation.

The randomizer uses Material Property Blocks, allowing multiple puddles to share the same material while using different randomized values.

Randomize Shape changes the puddle silhouette by varying Shape A and Shape B index, rotation, size, and X/Y scale.

Randomize Everything also varies selected edge, surface, water wave, and ripple parameters.

The randomization ranges can be adjusted directly in the component Inspector to create either subtle variation or more dramatic differences.

Tip: Add the randomizer only to the puddle setups you want to vary. Puddles without the component continue to use their normal material values.

EXCLUDING CHARACTERS AND DYNAMIC OBJECTS

Because the puddle uses depth-based projection, it can also project onto characters, vehicles, enemies, or other dynamic objects that enter the projector volume.

 

URP Setup

In URP, these objects can be excluded using a Render Objects Renderer Feature together with the Stencil Buffer.

  1. Create a new layer called PuddleExclude.
  2. Assign this layer to any characters or dynamic objects that should not receive the puddle projection.
  3. Open the Universal Renderer Data used by your URP Asset.
  4. Add a Render Objects Renderer Feature.
  5. Set the Layer Mask to PuddleExclude.
  6. Enable the Stencil override and use:
    • Reference: 1
    • Compare: Always
    • Pass: Replace
    • Fail: Keep
    • ZFail: Keep
  7. The puddle shader is configured to render only where the stencil value is Not Equal to 1.

This means excluded objects write a stencil value of 1 and the puddle is prevented from rendering on those pixels.

This setup can be used for:

  • Player characters
  • Enemies
  • Vehicles
  • Movable props
  • Other dynamic objects

For best results, apply the PuddleExclude layer to the renderer objects or renderer children that should be excluded.

Note: This setup requires a small URP Renderer configuration change and is optional. The puddle system works without it, but dynamic objects inside the projector volume may otherwise receive the projection.

 
HDRP Setup

Automatic dynamic-object exclusion is not included. For best results, keep projector volumes only as tall as necessary and avoid unnecessary intersection with characters or movable objects.

Reflections

Puddles use the lighting and reflection systems provided by the active render pipeline.

Reflection Probes can be used to improve environment reflections, especially on smooth puddle surfaces. Place probes near the area where puddles are used and adjust their influence volume to match the surrounding environment.

Higher Smoothness values produce sharper and more noticeable reflections, while lower values create softer reflections.

URP and HDRP handle reflections and lighting differently, so the final appearance may vary slightly between render pipelines.

For best results:

  • Use appropriately placed Reflection Probes.
  • Keep probe influence volumes and blend distances suitable for the environment.
  • Avoid extremely high Smoothness if reflections appear overly sharp or unstable.
  • Use neutral or appropriate environment lighting to avoid unwanted color tinting in the puddles.

Note: Reflection Probes are an approximation of the surrounding environment and do not provide true planar or mirror-like reflections of dynamic scene objects.

TROUBLESHOOTING

PUDDLE IS NOT VISIBLE

  • Verify that the correct URP or HDRP material is assigned.
  • Make sure the puddle projector volume intersects the target surface.
  • Check that Opacity and Puddle Size are not set too low.
  • Verify that camera depth information is available in the active render pipeline.
  • Make sure the projector is positioned and scaled correctly.

PUDDLE PROJECTS ONTO UNWANTED OBJECTS

The puddle uses depth-based projection and can project onto geometry inside the projector volume.

  • Keep the projector volume only as tall as necessary.
  • In URP, use the optional PuddleExclude layer + Render Objects + Stencil setup to exclude characters and dynamic objects.
  • Avoid unnecessary intersection with movable geometry.

PUDDLE APPEARS ON STEEP OR VERTICAL SURFACES

  • Adjust Slope Threshold to control which surface angles can receive the puddle.
  • Increase Slope Fade for a softer transition between visible and excluded surfaces.
  • Make sure the receiving geometry has sufficient depth information.

OVERLAPPING PUDDLES BECOME DARKER OR MORE OPAQUE

Separate transparent puddle projectors accumulate opacity where they overlap.

  • Avoid excessive projector overlap where possible.
  • Use Shape A + Shape B inside a single projector to create more complex puddle shapes.
  • Keep projector volumes tightly fitted to the required area.

OVERLAPPING PROJECTORS SHOW SORTING ARTIFACTS

Transparent projector volumes may show sorting artifacts when heavily intersecting, particularly when placed at different heights.

  • Keep overlapping projectors similarly aligned.
  • Avoid unnecessary volume intersection.
  • Use Sort Priority where appropriate.
  • Prefer a single projector with Shape A + Shape B when possible.

REFLECTIONS LOOK INCORRECT OR TOO STRONG

  • Check the placement and influence volume of nearby Reflection Probes.
  • Adjust the probe intensity and blend distance if required.
  • Reduce Smoothness if reflections appear excessively sharp.
  • Check the environment or sky lighting for unwanted color tinting.
  • URP and HDRP may produce slightly different reflection results.

WATER WAVES OR RIPPLES LOOK TOO STRONG

  • Reduce Wave Strength or Ripple Strength.
  • Adjust Wave Size or Ripple Size if the surface detail appears too dense.
  • Reduce Wave Speed or Ripple Speed if the animation feels too aggressive.
  • Very high smoothness can make strong normal distortion more noticeable.

RIPPLES ARE NOT VISIBLE

  • Make sure Enable Ripples is enabled.
  • Increase Ripple Amount and Ripple Strength.
  • Check that Ripple Size is suitable for the current puddle scale.
  • Make sure the puddle surface is visible enough for the normal animation to affect the lighting.

PUDDLE DISAPPEARS TOO CLOSE TO THE CAMERA

Check the projector placement and volume size. Very close intersections with transparent projector geometry may produce undesirable results.

For best results, keep the projector tightly fitted around the receiving surface and avoid placing the camera inside or extremely close to unnecessary parts of the projector volume.

 

RANDOMIZER DOES NOT CHANGE THE PUDDLE

  • Make sure the Puddle Randomizer component is attached to the puddle renderer.
  • Verify that a valid puddle material is assigned.
  • Use Randomize Shape to vary the silhouette or Randomize Everything for broader variation.
  • The randomizer intentionally does not modify textures, render-pipeline settings, or projection settings.

SUPPORT

If you have questions or encounter any issues, feel free to contact me

info@paulinavfx.com

PUDDLE Parameters

Parameter name Explanation
Wave Normal Texture Normal texture used to create subtle animated water surface movement.
Noise Texture Noise texture used to create irregular variation along the puddle edges.
Ripple Texture Texture used by the animated rain ripple system.
Puddle Mask Texture Packed mask texture containing the puddle shapes used by Shape A and Shape B.
Puddle Index A Selects the puddle shape used for Shape A.
Puddle Rotation A Controls the rotation of Shape A in degrees.
Puddle Size A Controls the overall size of Shape A inside the projector.
Puddle A Scale X Controls the horizontal scale and proportions of Shape A.
Puddle A Scale Y Controls the vertical scale and proportions of Shape A.
Enable Second Puddle Enables Shape B, allowing two puddle shapes to be blended into a single silhouette.
Puddle Index B Selects the puddle shape used for Shape B.
Puddle Rotation B Controls the rotation of Shape B in degrees.
Puddle Size B Controls the overall size of Shape B inside the projector.
Puddle B Scale X Controls the horizontal scale and proportions of Shape B.
Puddle B Scale Y Controls the vertical scale and proportions of Shape B.
Puddle Edge Breakup Strength Controls the strength of the irregular noise applied along the puddle edge.
Puddle Edge Breakup Size Controls the size of the irregular edge breakup pattern.
Puddle Edge Softness Controls the softness of the transition between the puddle and the surrounding surface.
Puddle Erosion Gradually reduces and breaks up the puddle shape to create more irregular silhouettes.
Puddle Color Controls the color tint applied to the puddle surface.
Smoothness Controls the smoothness of the puddle surface and the sharpness of its reflections.
Metallic Controls the metallic response of the puddle surface.
Opacity Controls the overall transparency of the puddle.
Normal Controls the overall strength of the final puddle surface normal.
Wave Strength Controls the strength of the animated water wave normals.
Wave Rotation Controls the orientation of the animated water wave pattern.
Wave Size Controls the apparent size of the animated water waves.
Wave Speed Controls how quickly the water wave animation moves.
Enable Ripples Enables or disables the animated rain ripple system.
Ripple Amount Controls the amount of visible ripple activity across the puddle surface.
Ripple Size Controls the apparent size of the individual rain ripples.
Ripple Speed Controls how quickly the ripple animation plays.
Ripple Strength Controls how strongly the ripples affect the puddle surface normal.
Slope Threshold Controls which surface angles are allowed to receive the puddle projection.
Slope Fade Controls how gradually the puddle fades as the receiving surface approaches the excluded slope angle.
Distance Fade Start Controls the distance from the camera at which the puddle begins to fade out.
Distance Fade End Controls the distance from the camera at which the puddle becomes fully faded.