Decal water spray material on terrain — Agronova, Purdue Capstone 2024
The Problem
Making water marks appear on any surface
Agronova's drone simulation needed water spray effects that would land on and visibly wet arbitrary surfaces — terrain, crops, equipment. Particles alone wouldn't leave a persistent mark. Decals were the right tool, but they came with a hidden trap.
What I Built
What I built — and what went wrong first
- Decal material — wet surface shader using normal map distortion, increased specular, and slight darkening to simulate water absorption on impact
- Spawn system — decal actors spawned at particle impact point, inheriting surface normal for correct surface orientation
- The invisible decal problem — decals were spawning correctly but completely invisible in-game; no error, no warning from the engine
- The fix — UE5 decal size is in world units; a default 1x1x1 decal is 1cm wide — essentially invisible at game scale. Scaling the actor to match the spray radius made them immediately visible
- Lesson — always check decal world-unit scale first; this is an underdocumented UE5 default that catches almost everyone
Reflection
What this taught me
This was a two-hour bug with a ten-second fix — once found. The real skill was the debugging process itself: ruling out material errors, spawn logic, and collision settings before landing on scale. I now check decal scale first, always.
Research Question
What does this kind of silent failure reveal about engine default value design — and how should real-time game engine tools surface unit-scale mismatches before they waste developer time?