Table of Contents

Cover Volumes

A Cover Volume (CoverVolume) is a box that says how loud the rain sounds inside it, anywhere from muffled (fully indoors) to as loud as out in the open.

The rain only ever sounds muffled inside volumes. That's a bit more work up front, but it means an interior sounds indoors exactly where you say it does, and nowhere else. A volume can also keep the rain off what's under it, if you want. The rain sound itself comes from Puddlecraft Audio.

Placing one

  • In the Puddlecraft tools, pick Place Cover Volume and drag out a footprint on the ground (a single click places a 4 m box). The height comes from the overlay. Place one inside an existing volume and the new one nests inside it.
  • Or use Tools > Puddlecraft > Create > Cover Volume, or add the component to any object.

Size it with its handles, like a Box Collider. It follows its object's position, rotation and scale, so the usual Move, Rotate and Scale tools work too. Covering a whole building? Fit to Child Renderers in the inspector wraps the box around it.

Settings

Setting What it does
Center, Size The box, in the object's local space.
Rain Sound How loud the rain sounds inside, from muffled as fully indoors (left) to as loud as out in the open (right).
Falloff (m) How far in from its faces the volume blends in, in metres, so the sound changes gradually as you walk in.
Priority Breaks ties between volumes at the same nesting depth: the higher priority wins.
Blocks Rain The box's top keeps rain off everything under it: rain, splashes, raindrop ripples and wet ground. In Baked mode, rebake the rain cover after changing it.

That's all most volumes need. For a door or window that a script or animation opens, expand Opens and Closes (Scripted). Rain Sound When Open is how loud it is wide open, and Openness (0 closed, 1 open) slides between the two.

In scripts the same values are coverClosed and coverOpen, but expressed as cover: 0 is as loud as out in the open and 1 is as muffled as fully indoors. The inspector's slider shows 1 minus this, which is why it reads from quiet to loud.

Nesting

Volumes nest through the Hierarchy. A volume parented under another overrides it inside its own box, blending in over its own falloff.

A nested volume also only counts inside the volumes it's parented under. That sounds like a technicality, but it's what makes doorways work: a doorway's box can reach out through the door to start its falloff outside, without muffling the street.

The usual setup for a building with a door:

  1. The building gets one volume with Rain Sound all the way down.
  2. Its doorway gets a child volume just inside the door, also muffled, with Rain Sound When Open around two thirds of the way up.
  3. A door script sets the doorway's Openness.

Open the door and the rain gets louder near it, while the back of the room stays muffled. The demo scene's sliding door does exactly this.

Previewing

Turn on Show Cover Probes in the Puddlecraft overlay to fill the selected volumes (or all of them) with a 3D grid of probes. Each probe shows how loud the rain will sound at that spot at the current intensity: large and blue where it's loud, about a third the size and white where it's muffled. The scale above the toggle shows how many decibels full cover takes off.

Walls hide the probes behind them, so from inside a room you only see that room's probes.

From scripts

Sampling only looks at the volumes that exist. Nothing is baked or stored per point, so it's cheap enough to call every frame.