Here's my latest iteration of the boat deterioration sequence I've been working on refining, with most elements added -- including the sand rippling over the rock, the shoreline being swallowed up by the sand, and the painted style implemented into the assets. Although it may not look much different than the video I recorded last week, I've made a lot of tweaks here.
Sand rippling over rocks - material blending based on height
Here's a close up of the material blending of the sand rippling over top of the rocks based on their respective height maps. This was something I focused in on this week. It was a bit of a challenge because I wanted to add displacement from the sand ripples, but only add it in areas where there weren't large rocks - to make it look as if the sand were moving over top of the rocks rather than displacing them with it. This gives the sense that the ground is still solid underneath the sand.
Procedural boat rusting
This past week I've improved my technique for the boat's shader-based rusting and deterioration sequence. My initial approach was to hand paint mask keyframes that designated where the rust formed, and blend between them. This worked out fine, and accomplished what I needed it to for the most part. If you notice in my previous work in progress videos of the boat rusting, most things are working, but when the boat starts to deteriorate away, the transition gets a bit choppy and it disappears in pretty large chunks. This is my own error, due to me jumping too much between these keyframes -- kind of like a choppy animation with not enough in-betweens. I was going to go in and repaint some of these keyframes again, when I realized this was about the fourth time I've repainted these keyframes and it can be a pretty painstaking process. I finally decided to pursue a procedural method that involved blending different masks in the material.
Each method has definitely presented its share of pros and cons, but ultimately this new method of blending together different masks in the shader has proven more versatile. The keyframed mask animation offers a lot of customized artistic control in deciding where the boat will rust, but this procedural method offers enough variety in its parameters to provide for a similar amount of control to achieve the desired effect. This method takes a bit more trial and error and tooling around with parameters to get the look I want out of it, but its ability to be tweaked based on in-engine results wins out.
There are three components to the sequence that happen at different times and are controlled by slightly modified masks, which in the end are used as masks for the blending between three different materials. The default boat hull has a painted metal material applied. When the boat begins to rust, the paint chips away revealing the rusted metal underneath. I call this deep red rust material "rust flakes." The secondary effect of this rusting is the "rust drips" material layer, where you see streaks of rust leak down the boat from these areas where rusted metal is exposed. Finally, the boat deteriorates, the metal being eroded through in layers. This deterioration mask is fed into the opacity mask for the material. The deterioration mask deteriorates in areas where the structure of the boat is weakest - starting with the areas that rusted first. The structure is the strongest following the skeleton/framework of the hull - so holes appear in areas where the skeleton is not first. This is why the skeleton of the boat is one of the last parts of the hull that remains.
Essentially, the entire transition is controlled by a linear gradient mask from black to white, projected onto the boat. The boat starts out masked by black, and the gradient is moved down until the boat is white. So the transition variable that controls the progression of the sequence is controlling the downward offset of the projected linear gradient in world space. The reason that the main mask is a linear gradient sliding down is because I do want this deterioration to generally happen from top to bottom. I feel like downward is a believable pattern for rusting, and deteriorating from top to bottom makes for a nice reveal of the skeleton underneath. Lastly, it helps to make sure that when parts of the boat start deteriorating away, there aren't any "floating" and unsupported pieces left in the air.
The linear gradient mask is just the base, though. This mask needs to be broken up for a little bit more serendipity in the rusting pattern. To do this, I warp the projected UVs of the linear gradient by multiplying them by a general perlin noise pattern - just to get some broad wavy variation instead of a straight horizontal line moving downwards. Warping this enough can allow for rust to emerge in areas lower down on the boat but still follow an overall trend of top to bottom rusting. The rust drips use the same warped noise as the areas where the rust flakes appear, but the noise is offset downwards a bit more, to give the directional appearance of rust dripping.
Getting into even more specific, small scale variation to break up this warped linear gradient mask, I overlay another noise into the grayscale values of the gradient. I generate a curvature map from the normal of the boat hull using Substance Designer. This highlights just the peaks of the normal map - the areas with ribbing. I use this mask to give these areas of the boat rusting priority. In real life, the most exposed features and areas that water could collect would rust first, so this adds a bit to the believability of where the rust starts to form first.
On the deterioration mask, however, I use a mask I hand painted that designates the underlying skeleton structure of the boat. The skeleton of the boat would be the most durable areas of the hull, and probably deteriorate away last. So I overlay this mask to make sure that it rusts away last.
Finally, I blend in the most specific detail - the edge pattern of each mask. Rust flakes follow a "flakey" cell-like pattern, rust drips follow a directional, streaky noise pattern, and the deterioration mask is a blend of both just to get some ragged edge variation.
I relate the deterioration mask back to the "mesh shell" technique I use to achieve a painted look by layering the mesh with the same material applied on top of itself, save for being pushed outwards several times using world position offset. These layered meshes help to achieve a look of thickness to the thin-walled base mesh of the boat hull. The layers help also with adding randomness to the deteriorated edge- the noises used to break up the deterioration mask are offset slightly on each layer, so each layer of the boat is rusted away in a slightly different pattern, but generally follows the same broad pattern. The broken up edges per layer, paired with dithering in the opacity mask, also contribute to a slightly softer, painted edge look.
Rocks and painted style
In addition to re-engineering the boat's rusting transition, I've been working through all of my materials to standardize the overall painted look I want to be consistent across assets. This is characterized in the material mostly by the stepped normals and dithered pattern that breaks up smooth gradients. Here are some screenshots showcasing the rocks with this look applied. Sphere reflection captures contribute a lot to the rim lit look that relates to the dramatic lighting of many paintings I enjoy.