Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Where do you put your specular/roughness maps in the standard shader?

Discussion in 'Editor & General Support' started by TwiiK, Mar 7, 2015.

  1. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Looking at the viking village it seems like Unity uses the standard shader (specular setup) for everything, but you should be able to use the other shader as well, right? I mean it's the default one. :p I like the metal/smoothness sliders, but I was expecting the smoothness value to also take a map or something.

    I'm not having any luck finding examples of how to use it and there's no obvious place for me to put these maps from what I can tell.

    I have no prior experience with physically based shading so I have no preconceived notion of how it should be I was just expecting it to be a bit more intuitive than this.
     
  2. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Also, am I the only one who really hate the 2 textures per file thingy? Do you really gain that much performance by doing it this way? It's such a pain to work with. I have to open a file, look in the channels in photoshop, disable the color channels, ahh, there's another texture which is impossible to see in Windows Explorer when browsing my textures. I want all my textures as separate files. :p

    Is it easy for me to create my own version of the standard shader with all the maps as their own textures? With Unity 4 this was easy, but I've tried opening the standard shader and I don't really understand it. It seems to span multiple files.
     
  3. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Also, what format do you save textures in? I've always used PNG, but it doesn't support an alpha channel so I have to use something else if I'm going to stick with the default standard shader. PSD-files get absolutely massive (100mb+ for a 4k texture) so I would prefer not to have those for space saving reasons (dropbox, git etc.). Compressed TIF seems like the only option? It's "tiny" compared to the other alternatives. And LZW compresion is lossless anyway, right?

    But it can't be previewed in Windows Explorer... come on. I have to make my own shader. It's the only way no to lose my sanity. :p And if the performance difference is that big I'll just switch to the default shader when it's time to release my game I guess.
     
  4. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Anyone who has played around with the new shaders has to feel the same way? In many of the materials in the Viking Village demo Unity only uses the RGB part of the specular map as specular color, ie. it's just a flat color with the roughness map in the alpha channel. So you make your texture, go into Unity and realize that it should be a bit more shiny. Now you have to go back into Photoshop and resave the entire texture just to change 1 color. If the maps were separate we could just tweak a specular color value in the inspector rather than having to go back to your image editing application every single time.
     
  5. Ryan-Gatts

    Ryan-Gatts

    Joined:
    Sep 27, 2012
    Posts:
    54
    I really do feel the same way. I wish at least that smoothness took precedence over metallic. I much more often want a material with various different levels of smoothness than I want a material with different levels of metallicity.
     
  6. smbv

    smbv

    Joined:
    Apr 3, 2015
    Posts:
    1
    I fell the same, I've start to play in Unity and watched dozen tutorials for few weeks, I already modelling and building objects for Unity, but when I start touching texturing in Substance Designer or Painter, I start to draw textures and it outputs Roughness channel and when I open Unity with Standard shader, I do not see any Roughness channel and it ruing entire look of the model, I have been textruing. Neither of the tutorials showing the process of creating maps and exporting them properly to Unity. I only know separate ways, how to texture, how to work in Unity, but how to apply correct textures in Unity from Substance, did not see. No one covered it, especially when I type: Roughness in Unity - only this topic has appeared.
     
    phobos2077 and damir94 like this.
  7. Kajan

    Kajan

    Joined:
    Jun 18, 2015
    Posts:
    2
    I use the metalness approach, and it seems like you put the roughness/gloss texture in the alpha channel of the metalness texture. I run some tests and it seems to work.


    And about this: ”Also, am I the only one who really hate the 2 textures per file thingy? Do you really gain that much performance by doing it this way?”

    The answear is yes... you defenitly save tons of preformance with this approach. The more textures and channels you save, the better. After all textures are one of the most expensive thing to run in realtime, so this is something that you do want to optimize.


    "Also, what format do you save textures in? I've always used PNG, but it doesn't support an alpha channel so I have to use something else if I'm going to stick with the default standard shader. PSD-files get absolutely massive (100mb+ for a 4k texture) so I would prefer not to have those for space saving reasons (dropbox, git etc.). Compressed TIF seems like the only option? It's "tiny" compared to the other alternatives. And LZW compresion is lossless anyway, right?"

    I have only been using .targa so far, but if .dds files works in unity, I guess thats one way you can go. https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop
     
  8. MattMurch

    MattMurch

    Joined:
    Jul 29, 2012
    Posts:
    14

    I also am having these difficulties, luckily PNG does have alpha channel, you just need to copy your rough map into it in photoshop or gimp, still a lot of work for a prototype.
    For a format I always go PNG for my textures, though I know a lot of people use TARGA.
     
    phobos2077 likes this.
  9. MattMurch

    MattMurch

    Joined:
    Jul 29, 2012
    Posts:
    14
    I had the same issue with substance painter a few months ago, turns out there is an export setting for Unity 5 that will pack the roughness map into the alpha channel for you, works like a charm! (and saved my project)
     
  10. Ar7ific1al

    Ar7ific1al

    Joined:
    Jan 21, 2014
    Posts:
    54