Search Unity

[Official] Specular vs Metallic workflow

Discussion in 'Unity 5 Pre-order Beta' started by bibbinator, Oct 17, 2014.

?

Do you prefer a Specular or Metallic workflow?

  1. I have no idea what either of these mean

    76 vote(s)
    16.0%
  2. Either one is fine

    62 vote(s)
    13.1%
  3. Specular

    95 vote(s)
    20.0%
  4. Metallic

    242 vote(s)
    50.9%
  1. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    Do we want to convert metalness to specular?

    If spec/gloss workflow needs RBG spec, this means it carries more information than the grayscale roughness map. So if you convert the metalness/roughness model to spec model, wouldn´t that mean that you create RGB information out of grayscale information? Which doesn´t make much sense to me.

    Don´t want to annoy you, just asking :)
     
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    No, the roughness map is grayscale in both. You're creating the RGB specular color information based on both the diffuse color and the metalness map.
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,824
    If there is any metallicness at all, it takes color information from the diffuse and puts it into the specular map. So there is color.
     
  4. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    I don't think that there is any metallic at all for 5.0, as I see nearly %56 of the poll answers are for metallic. may unity feel like they made the wrong move? can they act quickly enough?
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,824
    It's not tha big of a deal?

    Metallic is a bit more foolproof and potentially uses one less channel and Specular/Gloss is more flexible, but they are not *THAT* different.

    It's more of a workflow issue than anything else.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,824
    I'm just trying to dispell that metallic is inherently "better".

    It's somwhat different, and some people prefer it, it has advantages/disadvantages, but it's in no way a superior method of doing things.
     
    Devil_Inside likes this.
  7. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112

    Thanks for your reply and info on that matter @Joachim_Ante . However, I would like to know your thoughts on why Specular was chosen over Metallic as initial method/workflow when current poll numbers show that the metallic workflow is the preferred workflow for most artist as Poll numbers indicate.
     
    shkar-noori likes this.
  8. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    804
    That may not be the reason, but there was a thread several month ago where they stated that they will use spec/gloss. There were questions asked, but I think nobody really said "bah, thats bad".
     
  9. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    905
    So I was thinking about this a bit, and I had an idea that I'll just throw out there (here). Wouldn't it be cool if you could specify in the shader inputs in shaderlab when you set up a texture sampler, that a given texture is a collection of grayscale maps instead of a single color texture? Then the material inspector could give you the option to input several grayscale images, and then Unity would magically convert this to a single texture before it reaches the shader.

    You'd still need an option to be able to set it as a single color image as well, maybe display it as a single image in the inspector, with a foldout that lets you input individual channels. It'd be nice if it supported a single texture as 1-4 grayscale maps, or one RGB + one grayscale as well.
     
    shkar-noori likes this.
  10. reptilebeats

    reptilebeats

    Joined:
    Apr 28, 2012
    Posts:
    270
    hey i would love to see a vertex color blend, i suppose component of the shader in there, and maybe a second value of the spec map to increase the brightness, when there's a map attached to it, to create a wetter/shiny look during run time.

    that being said i like the spec gloss workflow, its closer to the legacy, but metallic rough just makes more sense to me. not a shader expert myself however.
     
    shkar-noori likes this.
  11. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    226
    Looking at poll, looks like metallic workflow is a must in 5.x. Glad to see this :)
     
    shkar-noori likes this.
  12. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Actually, all this said... is there any chance we're going to see Surface Shaders get updated to support the new PBR system? The "Standard" shader admittedly does a pretty good job, but it's just about impenetrable. It looks like it's just specialized vertex/fragment shaders for different scenarios and render paths, which feels like a massive step backwards from Unity 3(? I think that's when Surface Shaders were introduced).
    I'd love to be able to just write a Surface Shader where the SurfaceOutput has Albedo, Specular, and Roughness outputs and have it just work (tm) (for both forward and deferred). Particularly because often I still need to write shader variants for specific cases (for example, a shader which allows for customizable outfit or team colors, a refractive glass shader, water, etc)
     
    Waz and steego like this.
  13. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    An interesting extract from this Quixel feature article: http://quixel.se/issue01
     
    AcidArrow likes this.
  14. Marcellus_Wilson

    Marcellus_Wilson

    Joined:
    Jul 19, 2013
    Posts:
    12
    I would greatly prefer a metallic workflow, or the option for both. It would make it a lot easier for me to produce the results I want. It seems like a metallic workflow would be similar to using the hard surface shaders where it takes the color from my diffuse map and makes it look like metal via settings. The spec workflow of re hand painting my textures not just adding spec and emission spots, I have to change the albedo and make sure I look on charts to make sure every portion of a texture has correct spec colors. I have also found it hard to find said charts and harder still to transfer the information exactly. I really don't want to have to buy another separate tool to make it work. While substance painter starts at 100$, 100$ is a lot of money to me and as an indie I can't spend a dime I don't have too. Not to mention I really don't want to spend the time right now to spend weeks or a month learning a new tool.

    I am making a tower defense game crossed with a FPS in 3d.

    I am using zBrush, Blender, and gimp. I hand paint all my textures, mostly using zBrush but I also use gimp and blender.

    First pic is of my an early Unity 5 test, which actually worked :( Second pic is in Unity 4.
    image1.PNG image3.PNG
     
  15. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    905
    Just in case someone didn't read the new release notes for b12:

    Shaders: Surface shaders can use physically based shading now; the same as Standard shader uses.
    • Use "Standard" lighting function, and "SurfaceOutputStandard" output structure.
    • Do an #include "UnityPBSLighting.cginc" in your shader to get it.
    • Default options require shader model 3.0, so add a "#pragma target 3.0" too.
     
  16. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Nice! The Standard Shader is cool and all, but Surface Shaders are goddamn awesome.
     
  17. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,536
    Update on current plans: we'll try to have both specular & metallic Standard shaders (hopefully in beta13 or 14):
    • "Standard" (default one used when creating new materials / importing objects) will be for metallic setup. "Albedo" texture (determines diffuse or specular color based on metalness), and a Metalness+Smoothness texture.
    • "Standard (specular setup)" shader will be for specular setup (what the current standard shader is). Diffuse color texture, specular color texture, smoothness in alpha channel of specular color.
     
    twobob, Charkes, rwetzold and 8 others like this.
  18. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    It's great that you're adding support for both workflows, but, if possible, can you please add an option to choose the default shader for newly created materials?
     
  19. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    298
    insatiable :rolleyes:
     
    shkar-noori likes this.
  20. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    I voted for the spec/gloss shader, which now won't be the default.
    I think it'll overall be a good idea to be able to set any shader as your default shader, per project.
     
  21. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,471
    Ultimately, Unity's spec based shader is superior in visuals. It's just harder to work with. Metalness will do fine for people who just need it to work as they'd expect from other tools. Having both is very smart of Unity.
     
  22. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    Smart move, Now I'm sure that the polls really meant something, SSR would be another smart move for the later betas
     
    hippocoder likes this.
  23. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,471
    Yes, I want to see SSR. But ultimately, I need faster shadows. Upgrading to 5 has made things slower for my project. I am making a repro. Although I kind of wish Unity would make an option for dir shadows which had no cascading and used fixed precision, ie very, very quick and very dirty. That's fine for a heck of a lot of games.
     
    shkar-noori likes this.
  24. reptilebeats

    reptilebeats

    Joined:
    Apr 28, 2012
    Posts:
    270
    nice cant wait because i use algorithmic tools which are set up for metallic rough, good job i have been saving both types though, probably do that from now on anyway.
     
  25. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,736
    Cool. If it's in Beta 13 or 14 then that's much faster than expected.
    Thanks a lot for letting us know and fast implementation :)
     
    shkar-noori likes this.
  26. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    298
    Agreed - big thanks to the guys at unity for fast-tracking the metal/rough implementation.
     
    shkar-noori likes this.
  27. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    Another Quixel feature article, from a different artist: http://quixel.se/issue03
     
  28. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    Wow, I wouldn´t have expected this move. Respect!

    And also thanks for bringing up this discussion in such an accessible, open minded way. There was a lot to learn from both sides!
     
  29. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    Good to hear/see the change of plans here. Much appreciated!
     
  30. wesm

    wesm

    Allegorithmic Community Manager

    Joined:
    Feb 24, 2014
    Posts:
    298
    Hi,

    The transitions areas in the metal map mean that if an area is not denoted as pure metal, then it needs to have the metal reflectance value lowered in the base color map. For example, if you have a dirt layer that is covering some of the metal this creates a mix of metal and dielectric. The transitional grey values indicate that parts of this are not full metal, so the metal reflectance value needs to be lowered in the base color map accordingly.

    This would only cause rendering issue if you denote areas as not pure metal, but leave the metal reflectance value in the base color with a high value (value for metal) when it should be lower. How much to darken the metal reflectance depends on the dirt layer and how much transition you have. This is actually the same for the specular workflow as well. With either workflow, not changing the reflectance value for metal variation will yield incorrect results.

    We handle this with Substance very easily and works with either metal or specular workflows. The effects are always blended across multiple channels. If you have a dirt generator which is applied on top of a metal surface, you can simple go to the metal channel and pull the reflectance slider down to accommodate for the change in reflectance value.

    Cheers,

    Wes
     
    twobob, artzfx, ArthurT and 2 others like this.
  31. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    5.13 beta with metallic/roughness is out! that was quick!
     
  32. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
  33. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,471
    Internal beta. Won't be long, and that's not the only change! this is a very..... VERY sexy update! Sure to excite anyone who dropped cash on this bad boy.
     
  34. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    and it finally does support Reflection probe blending, gonna test it out
     
  35. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    Seems like everyone got access except me. That's not fair! :mad:
     
  36. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    it's a huge update in my opinion, a lot of stuff has been fixed and/or improved.
     
    Devil_Inside likes this.
  37. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,736
    Should I pretend to have access to it just to be a dick or make you feel better by telling you that I also don't have acces yet...? Decissions, decissions. :D

    Seriously, though: Beta13 with new cool features coming up very soon? Awesome. Thanks Unity.
    You guys are fast. :)
     
    Devil_Inside and shkar-noori like this.
  38. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    Would be cool to have two greyscale map inputs for m/r instead of metallicity = RedChannel, roughness = AlphaChannel
     
  39. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Very smart move with adding metallic setup without waiting for later release. I prefer specular setup as default though - the best option would be have one standard shader with simply dropdown on top with spec/smooth and met/rough options if possible. If not then optional manual pointing default shader in editor would be cool too for saving time
     
    Devil_Inside likes this.
  40. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    There's less texture sampling if there's just one texture.
    If you need it for quick iterations during development, you can modify the standard shader to add a separate map input.

    Yeah, a drop down right in the shader interface together with an option to set the default shader would be really really cool!
     
    philwinkel, shkar-noori and Breyer like this.
  41. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    oh and as I heard (not sure) converting textures spec/smooth->met/rough is relatively easy task if it is true then would be super awesome have seamless change between setup in editor (thanks to dropdown and builtin editor converter like builtin texture->grayscale converter) i guess this is good idea but for later release... ;)
     
  42. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Nope. Spec/smooth -> met/rough is really difficult. The reverse, met/rough -> spec/smooth, is very easy however.
     
    shkar-noori likes this.
  43. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    oh i didnt know that there is async difficulty in converting when i wrote spec/smooth->met/rough i had in mind converting in both dir's and though difficulty is same (no matter of level difficulty). Then, that seems my idea is not so realistic... ;/
     
  44. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Well, let's see if I can't rearrange this equation.... algebra skills, don't fail me now.

    Code (csharp):
    1.  
    2. spec.rgb = lerp( float3( 0.04 ), diffuse.rgb, metalness );
    3.  
    4. // let's expand the equation
    5. spec.rgb = float3( 0.04 ) + metalness * ( diffuse.rgb - float3( 0.04 ) );
    6.  
    7. // now we want to see if we can isolate metalness on one side of the equation...
    8. spec.rgb - float3( 0.04 ) = metalness * ( diffuse.rgb - float3( 0.04 ) );
    9. ( spec.rgb - float3( 0.04 ) ) / ( diffuse.rgb - float3( 0.04 ) ) = metalness;
    10.  
    Theoretically that would work to convert metalness to specular and then back, BUT it will almost certainly fail in any case where diffuse+specular do not add up to exactly 1.0 (which, at least on GameTextures.com, seems to be a lot of cases)
     
    twobob likes this.
  45. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    571

    Sadly the beta 13 sexy I was expecting, has turned out to be an 80 year old in drag :(

    The Specular/Glossiness PBR shader is broken now with my previously working substances and my exposed parameters like color pickers and dropdown are now non responsive in the Unity Inspector. Sliders do still work.

    Differences between Beta 11 and 13 shown in attached images. Also some other weirdness on plain paint material.

    Back to the bug reporter I go.
    beta_11.jpg beta13_1.jpg beta13_2.jpg
     
  46. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    Afaik the metallic roughness shader has some glitches too; at least it looks weird in my viewport.
     
  47. DFT-Games

    DFT-Games

    Joined:
    Jun 24, 2010
    Posts:
    434
    Just testing the metallic workflow in b13. I guess something is missing... the roughness isn't there, and if I put the metallic map in the metallic slot everything becomes real dark. If I put the roughness map in the metallic slot the result is not dark any longer but there is no metallic information passed on.

    BTW, I'm using Substance Painter 1.0.2.
     
  48. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    947
    I'm not sure, but I believe metallic goes into red channel and roughness goes into green channel of the metallic input.
     
  49. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    264
    Just hovering the curser over the Metallic texture-slot says: Metallic (R) and Smoothness (A).
    So Red and Alpha as it seems.
     
    shkar-noori likes this.
  50. Thousand

    Thousand

    Joined:
    May 8, 2011
    Posts:
    95
    and the roughness map needs to be inverted... I wonder why this new standard shader does not take care of those conversions. It would be much easier to provide two greyscale maps and let unity combine and invert and whatever.

    but as mentioned earlier, the shader doesn´t work yet as it should