Pro Question about wind and water

So I have a matrix index of vectors that I’m plugging into 2pi - C + Dshift
and basically, I want the vertexes that are being displaced by the sin to either flatten or increase when in contact with a winds hit box. If I call the materials and set the vectors from the wind on overlap, I will be changing the entire wave. I want to change only the region the wind is hitting.

How would I go about area selecting part of a displacement shader and “nullifying” or “Increasing” ONLY that selected area?

This is being done in blueprints and custom HLSL. Feedback Much appreciated.

I was thinking per vertex collision, amplifying the 2pi or reducing, by the wind direction and amplifying or decreasing Z, but how do I go about per vertex collision in unreal engine?

Build a single-channel (grayscale, or alpha) mutable or render-text texture that expresses how much the wind is hitting various parts of your world.
Use the X/Y world coordinates, divided/offset to map UV 0-1 across your level, as an index into this texture.
Update the texture procedurally to be whiter where the wind is hitting.
Modulate your delta by the read result of this texture.

If you only ever have one (or maybe two) places that are “affected” by wind, you can instead have a texture parameter for “center of wind,” and perhaps another parameter for “radius of wind,” and you’d calculate how close the world point is to the wind point, and scale by that value. This doesn’t scale to multiple places of impact, though, as you’d have to do the distance calculation for each of the possible points, which gets costly pretty quickly.

I literally just wrote out the grayscale method, so i’m trying that next, thanks for reply.

1 Like