While clearing out an old computer I found some tech art work that I did a few years ago for @WildlifeAlba, and I'm still quite fond of this little ocean shader with lapping waves (that will still run on your grandads old iPad) Technical deets in🧵! 1/5
The movement is a pretty basic sine wave wobble, and the stylised foam is a tiling grey scale texture, thresholded to a specific range of that wave. BUT these waves need to know where the water meets land to align themselves with, and crash against, the shore correctly! 2/5
The shape of the island was subject to change at any point, so we needed an automatic solution! First thought was to generate a Distance Field texture that would store the distance to the nearest shoreline at any point. This did not work for concave shorelines! Bad! No good! 3/5
My solution was to add more data. In order of channel: R: The distance to the nearest shore G: Some perlin noise (for added flavour) B: The terrain height (to calculate water depth) and, most importantly, A. A flood filled gradient from the outer edges inwards. 4/5
This gives us an idea of where the wave should start, end and how long it should take for it to get there! This allowed us to have waves that would hit different parts of the shore at different times, and even fill out coves in a believable(ish) manner! 5/5
https://x.com/Maxvandm/status/... 6/5! A little more in-depth explanation of the 'flood fill' step here!
@Maxvandm @WildlifeAlba I like that you only post if it's something of high value. Going for pure quality over quantity.
@Dan_Gray @WildlifeAlba Haha, my halloween resolution is to tweet more! A mixture of changing up my routine with a new job and finding a cache of old dope .movs that I think people might get something out of!
@Maxvandm @WildlifeAlba that looks crazy good, like omg😍
@Maxvandm @WildlifeAlba That’s so unbelievably good looking…
@Maxvandm @WildlifeAlba Sweet!
@Maxvandm @WildlifeAlba Very nice indeed! ^_^
