So i was recently replaying Skyrim on its new refurbished 64bit mode and i noticed a recurring technique around its environment: the use of decals. But first things first. I grabed the following two screenshots on my first 5 minutes of gameplay:
#Bethesdagames.
Ok, seriously now. Once i found that the team behind the game used decals, i began a field work while i was playing. Here are the most interesting ocurrences.
Almost looks like a case of vertex paint:
But looking closer, there is an abrupt transition between the moss and the two underlying stone materials, which led me to believe this is a case of a cutout alpha:
Tiny details:
Crevices:
Cracks:
This looks like a clone of the underlying rock mesh with an alpha mapped to it:
More tiny details (the snow flocks were around the whole snow area):
These are certainly geometry decals, since there is a noticeable discontinuity of the alpha:
Sort of a "damage decal":
Can't say for sure about the technical aspect behind this, as if it is usefull ("beautiful" + performance friendly) in front of the current industry standards/production pipeline.
I'm interested in hearing the ideas from the community about it.
Replies
But some of them from the images are probably actually decals, as the ones in the fallout 3 article.
https://simonschreibt.de/gat/fallout-3-edges/
Btw that site has a good collection of tricks used in the games industry:
https://simonschreibt.de/game-art-tricks/
I mentioned that "if" thing, that gives you the fully hard alpha, so its actually very simple. This is what your if would do:
A= height A
B= height B
A>B = 0
A>=B = 0
A<B = 1
The heights can be constant values, or height maps, or alphas. It will compare the heights of the 2 inputs, and give you back only 0 and 1 values. Here, in my example, I used a height map for the first textures, and a combination of a height map and an "alpha" for the second ones. This way it cannot be fully painted over the first texture, at least with this setup. What else I do, is I keep the first height map in range of 0-1. Then I put the second one into 0-10, and its values between these 2 are driven by the vertex color. This setup only scales the height, it doesn't offset... This is bad when you want parallax or displacement. I'll explain the solution in more details later-
Heights with first method
In a node based material editor, you can set it up like this:
So the "If" will compare the heights and it will return only 0 and 1 values that we will use as our mask...
If you want to get the resulting height as well, run the 2 heights through a "max". I didn't do that.
So if you want to keep the height range but you want to offset, so it would correctly work with parallax or displacement too, you could do this:
In this example, when a layer is painted, its in range of 0,1, and the another layer is in range of -1,0. On the diagram image, the red and black dots indicates the vertex colors.
And this is how it would look with an another texture:
Some of them from your references also use pixel normal world space as mask. You can see that on the one with the weird gray mountains, and maybe some others.
...
I hope this helped better understanding blending and vertex paint stuff.
It's like the most of texture blending techniques, I don't think you should worry about performance, this can go expensive only if you layer up like 10 materials... But maybe even then its not so horrible, because this blending is relatively cheap, it uses very simple calculations. You should be completely fine.