Home Technical Talk

Bethesda decal techniques - The Skyrim case

hero character
Offline / Send Message
Pinned
Macebo hero character
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.

There is this interesting article, related to this subject, about the damage decal technique used in fallout 3: https://simonschreibt.de/gat/fallout-3-edges/

I'm interested in hearing the ideas from the community about it.

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    This is probably an "if" blend. Yes - no, fully sharp... You would check if the values of the alpha texture is higher than a threshold value. This also works with vertex painting, or any kind of texture blending technique.

    But some of them from the images are probably actually decals, as the ones in the fallout 3 article.
  • Macebo
    Options
    Offline / Send Message
    Macebo hero character
    I thought a cutout threshold worked only with decals. That's nice to know, since what i most see people doing is making soft transition between materials through vertex painting.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Here's how they used decals in Fallout 3, which should explain some of it. 
    https://simonschreibt.de/gat/fallout-3-edges/
  • Macebo
    Options
    Offline / Send Message
    Macebo hero character
    ZacD said:
    Here's how they used decals in Fallout 3, which should explain some of it. 
    https://simonschreibt.de/gat/fallout-3-edges/
    I mentioned it in my original post  :)
    Btw that site has a good collection of tricks used in the games industry:
    https://simonschreibt.de/game-art-tricks/
  • jRocket
    Options
    Offline / Send Message
    jRocket polycounter lvl 18
    Decals are nothing new. I remember using them in old Worldcraft/Hammer for Half-Life 1 in the late 90's. It is sad that many of today's game engines don't have that functionality out of the box(Unity).
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Here is a bit of an explanation about how you would do the hard blend with the vertex colors. There are other techniques as well, but their one is likely this.

    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.
  • Macebo
    Options
    Offline / Send Message
    Macebo hero character
    You are boss, Obscura! Thanks for your very thorough explanation. :)

    This technique is an excelent alternative in some cases, like when there is a wall, and there is a transition between a damaged plaster and the bricks revealed underneath, and where a soft transition is not the most adequate. That's not the case of a corner though (in which case i believe a damaged alpha on a plane is better). Just a quick thought!

    On the performance side of things, is this techinque less expensive than using planes with alphas or not?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Logically this should be slightly cheaper than the alpha one, since it only needs to blend the necessary attributes, and don't need to draw over the scene - doesn't use transparency. Also, its one mesh, one material. And last but not least, this is much more flexible than alpha planes, cause you could put it anywhere, without preparing specific meshes. 

    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.
Sign In or Register to comment.