Download

Wave dynamics and Materials

I saw the “Realistic Water Shader” with buoyancy using math generated waves, which would work well for oceans, however, I’m looking for something a bit, smaller, than an ocean :slight_smile:

Is there a way, or rather, how would I, create a material that functions as a wave, and also satisfies the double slit experiment and its interference patterns, while driving a sphere down a random path? For some reference material:

What’s your goals and use for the waves? Is it going to be a gameplay element or purely visual? What scale are you working at, ponds, rivers, lakes?

It would probably be a purely visual element, though I would prefer if it was done mathematically rather than being a hard “model”. For scale, maybe up to 1.5 meters? Nothing larger than that.

It would be far easier to fake it, and more importantly, cheaper, to fake it with combination of several separate linear and radial wave functions, rather than doing math for that.

I’ve been working on something similar recently. There are several shaders on shadertoy which can do what you’re looking for, and it’s not terribly difficult to translate them into UE4 materials. Here’s the simplest one I’ve found so far (You can find others searching for fluid, wave, ripple, etc and setting the filter to multipass). You can use the output from that as a heightmap to apply world position offset to a plane. You can use a Draw Material to Render Target node and pass a Render Target as a Texture Parameter to a Dynamic Material Instance. Then you can draw the Dynamic Material Instance to another Render Target, etc, etc. I made This project for cellular automata, but it uses the same sort of process.

To get a double slit effect you could apply a mask off a barrier, like the oval inthis shader.

edit: see this shadertoo.

That wave tanks looks like exactly what I was aiming for. Thanks!