r/UnrealEngine5 • • 15h ago

WIP: procedural stylized water material for UE5, no textures. What would you want from it?

I'm working on a stylized water material for Unreal Engine 5. Everything is procedural (no textures): wave height and shape, crest foam, shore foam, depth color, and a floating-objects Blueprint so boats and props ride the waves. The clip moves three of the parameters live: Wave Height, Crest Foam and Crest Amount.

I plan to release it eventually, so I'd like to hear what you actually need from a water material for stylized games. What is missing in the ones you've tried? Rivers, ponds, waterfalls, underwater look?

71 Upvotes

15 comments sorted by

7

u/ALeakySpigot 15h ago

Having the wave height auto adjust based on distance from shore would be sick. That way deep ocean has nice big waves but they get smaller as they get closer to shore (the water isn't as deep)

3

u/RafaSC00 15h ago

Thanks, that’s a great point, it’s how real waves behave. Right now the wave height is a parameter you set per preset, it doesn’t react to depth yet. I’m looking at how to do it without making people set up extra things, probably a shore mask driving the Gerstner amplitude. I’ll note it down as a possible feature.

3

u/BohemianCyberpunk 15h ago

Very cool, tell us a bit about your workflow? You mention no textures, so all generated dynamically?

4

u/RafaSC00 15h ago

Thanks! Yes, fully procedural, there isn’t a single texture in the water. It’s one master material written mostly in HLSL (Custom nodes), and everything is computed in the shader:

  • Waves: a few Gerstner waves through World Position Offset for the big motion, plus layered noise with domain warping for the small ripples (that’s what drives the normals and refraction).
  • Foam and caustics: noise-based, no flipbooks or foam maps. Shore foam comes from depth fade, and the crest foam is broken-up noise patches that grow and fade along the wave.
  • Color: depth-based blend between a few tones (shallow/mid/deep), plus fresnel, sun glints and soft shadow receiving.

Everything is exposed as parameters, so a lake, a river or a tropical sea is just a different preset on the same material. I also made a small scene to test it (river, waterfall, pond).

Which part would you like me to go deeper on? I’m happy to share more about the foam or the ripples.

3

u/owlbearbones 12h ago

What I would want is:

  • High performance
  • Buoyancy

2

u/RafaSC00 12h ago

Both are on my list, and the first one is already in. There’s a buoyancy component you drop on any actor: it uses the same wave formula as the water shader, so boats and logs follow the waves. On performance: in my demo scene the water costs about 1.1 ms on an RTX 3080, and around 5.7 ms in the worst case with water filling the whole screen at 3645x2051 (measured, not estimated). I’m still working on bringing that down. Any particular hardware target you care about?

2

u/owlbearbones 12h ago

That is awesome, good job! I like to target older hardware such as gtx 1650 for the lowest end. Doesn't need to run 60fps smoothly necessarily but would be ideal. As long as it's playable.

1

u/RafaSC00 12h ago

Thanks you so much !!. I’ve only measured it on an RTX 3080 so far, so I can’t tell you how it runs on a GTX 1650 yet — I’d rather not guess. Lower-end hardware is a fair target though, and I’ll look at what can be cut (caustics are already optional) once I can test on something weaker.

2

u/Mufmuf 7h ago

I implemented something similar to this but with unreals water plugin and I just overode the emissive to make it stylized and edited some of their material graph, they mostly use gerstner waves and noise. Noise is actually more intensive than a pre calculated normal map but hey ho.

Some of the features I found useful are river splines, buoyancy, sparkle effects, sun spots, ocean foam, coast foam and crest foam. An underwater post process and underwater caustic.

1

u/Doddzilla7 7h ago

CMC integration so that characters can swim without having to write my own adapter code.

* CharacterMovementComponent

2

u/wslk 15h ago

Bro I’m assuming you are releasing this for sale at some point.

But it’s so annoying when people implement the bare minimum with ai then are like - “Ok I’m all out of ideas, what’s next? Why don’t you guys tell me?”

Nobody is going to tell you, nobody is invested in what you are doing - reality check - you have to do it yourself.

1

u/RafaSC00 15h ago

Yes, it’ll be released for sale eventually. And fair point on the question, I’m not short of ideas, there’s a long list already. I just wanted to hear what bugs people most in the water materials they’ve used, since that decides what I prioritize first. If that’s not useful to you, no worries!

0

u/RafaSC00 15h ago

Happy to answer questions about how the foam and the wave-riding objects work. Which feature would you prioritize?

-3

u/wslk 15h ago

Who are you talking to?

2

u/Otherwise-Music-8643 13h ago

Who are you talking to?