questions about decals

Polycount Sponsor
Offline / Send Message
rohMizuno Polycount Sponsor
hey guys,

I was taking a look at some overwatch textures around and noticed how they like to use a lot of decals on the characters. (tanks Agilethief, for the awesome study (http://polycount.com/discussion/170394/technical-study-overwatch-image-heavy)

Anyway, my question is, when following such work flow, are those decals usually applied trough a different UV set on the same mesh? or is a extra floating mesh with a alpha cut floating on top of the original mesh? What is your opinion?
Personally I would rather go for extra UV sets in order to make the model lighter, but I dont see this work flow being used too much on games, is that right?

here is a example of what I am talking about:



Thanks!

Replies

  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 4
    You can do this in multiple ways.
    One way is basically the one you are describing: having a secondary UV set for the decals - We did that for the cars in a mobile racing game I worked on a few years ago. It's a relatively cheap method as the texture "merging" is done inside the shader, but this demands extra UV work from the artists which can be annoying (especially if you work in Max which has horrible UV tools, haha).

    You can also do it with using planes as floaters, hovering above the main geometry. This is an oldskool(?) method that I dislike though as it has a tendency to generate overdraw - unless ofc you model the floaters to the shape of the decal, reducing the amount of 100% transparent pixels. Additionally, that method has a tendency to give artists problems with lighting/shadows - like when baking lightmaps (as you have to go through every single decal and make sure it recieves - but doesn't cast - shadows).

    A third way is texture projections. There are several ways of doing them - google "game dev decal projection". All major game engines today (Unity, Unreal, CryEngine) have support for this.
  • rohMizuno
    Offline / Send Message
    rohMizuno Polycount Sponsor
    thank you! the decal projection does seems to be a awesome technique, I will definitely try it out, my question now is, how heavy it is? it seems like something that can be used to achieve so much, but it also feels too good to be truth, haha.
    It is hard to know some times what would be the most optimal way of doing something when we have so many good options to chose from.
    for example: I see a lot of people using the decal projection to add variation to terrain, and for what I could read, decal projections performance depends on the amount of pixels they are taking on the screen (plus shader complexion, of course), witch seems fine when you are doing some smalls posters on the wall or details on guns, but for a terrain wouldn't the best approach be something like vertex painting? 
    I am asking that because I am wondering how far should a use the decals, and when would be time go for different resources.

  • cptSwing
    Online / Send Message
    cptSwing polycounter lvl 5

    One way is basically the one you are describing: having a secondary UV set for the decals - We did that for the cars in a mobile racing game I worked on a few years ago. It's a relatively cheap method as the texture "merging" is done inside the shader, but this demands extra UV work from the artists which can be annoying (especially if you work in Max which has horrible UV tools, haha).
    Is that really so, your answer makes it seem like adding a decalsheet and mapping it to UV2 in the shader does not add a drawcall? I might be confusing things though, ie it would have to load another texture into memory, but might still be just one drawcall after the fact.
  • Eric Chadwick
    It still has to be lerped with the base texture, using an alpha channel. Unless you're doing only Add or Multiply or Subtract. But even then it's less expensive than a typical alpha blended or alpha tested floater.

    We have some info here. Check out the deferred rendering link.
    http://wiki.polycount.com/wiki/Decal
  • cptSwing
    Online / Send Message
    cptSwing polycounter lvl 5
    Good to know, always thought it'd be the other way around!
Sign In or Register to comment.