A dynamic wetness system for Unreal Engine.
Works at the renderer level — no material edits or per-asset setup required. Rain, puddles, drying, and character wetness apply to the entire scene automatically, including third-party assets.
#UnrealEngine#techart#gamedev
@Snefer@DreamFeedGames I know No Law well actually, been following it for a while now :) Cyberpunk has always been my genre, and honestly that's where this wetness system came from. You can't do a cyberpunk street without wet asphalt and neon reflections
@Snefer@DreamFeedGames and the biggest cost turned out to be hidden outside the capture scope a full capture invalidates the main view's VSM page cache, which cost ~9ms of shadow re-raster per recapture and never showed up under the capture in the profiler.
@Snefer@DreamFeedGames Not per frame, that was too expensive for me too. It only recaptures when the camera moves past a deadband (2m), so ~2Hz while moving, zero when idle, amortizing to ~0.2ms/f on GPU. Two things that helped a lot
@Snefer@DreamFeedGames Btw, didn't expect to see you in my replies, I've been following your games for a while. Hope this cleared it up, and looking forward to what you're making next!
@Snefer@DreamFeedGames I implemented this with PCSS (percentage-closer soft shadows), the technique games use for soft sunlight shadows each pixel checks how high the cover above it is and widens the wet-to-dry fade in proportion.
@Snefer@DreamFeedGames It scales with how high the cover is, same as in real life. Rain doesn't fall perfectly straight, wind pushes drops sideways, so under a high roof the drops sneak in at an angle and you get a wide band that fades from soaked to dry. Under a low table edge there's a sharp dry line
@DreamFeedGames It's actually right after the GBuffer is written
A compute pass reads the material buffer, wets the values, and writes them back in place (runs after decals composite)
Perf: ~0.6ms in heavy rain at 1440p/3080, 0 when dry since nothing gets scheduled
@DreamFeedGames And yep, good eye! those are dry areas from the rain occlusion pass. A top-down depth capture follows the camera, so anything shielded from above stays dry, and the edge softens based on how high the blocker is.
@DreamFeedGames Thanks! RVTs and master materials don't matter to it at all — the pass rewrites the material buffer after the base pass, so by then everything is just pixels. Whatever produced them gets the same wet treatment, no per-material setup.
@sapiecinske Thanks! It needs engine source changes (plugins can't reach that part of the renderer), so Fab won't work. No solid plans yet but if enough people want it I'll find a way to release it