Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[Official] 5.0 PBR Calibration Charts

Discussion in 'Unity 5 Pre-order Beta' started by peteorstrike, Jan 6, 2015.

  1. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    To help people get to grips with the new Standard Shader, we've been creating a number of assets to ease people into the confusing world of PBR. This started with the first iteration of the Shader Calibration Scene, which you can download from the asset store here.

    We're making our internal PBR calibration charts available, which are cheat-sheets to help show what values each slot of the standard shader expects, in order to create a particular material. There's a chart for both the default metal/smooth mode, as well as the specular/smooth variant. We've been using these to quickly grab colours for setting specular and metal values, and they also gave us a quick reference for what albedo and smoothness values to use.

    Here's a preview of the charts:


    You can download these as part of the Shader Calibration Scene, or as a separate zipped download linked below. This download contains the full hi-resolution .png and .pdf files.

    Download the charts here!

    Please let us know in this thread if you have any feedback or questions!
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    This is very nice and very useful - it's great to see you support PBS not only from the technological perspective but also in terms of "make this usable for as many people as possible". Right on!
     
    peteorstrike likes this.
  3. sluice

    sluice

    Joined:
    Jan 31, 2014
    Posts:
    416
    Awesome! Thanks!
     
    peteorstrike likes this.
  4. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Really thanks but I can't download from asset store for some reason can you please put a direct link for that?
    I really need this.
     
  5. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    Hi @ksam2 , sorry to hear you're having problems. Are you getting any error messages from the asset store? Or is there an issue with the download itself?

    For now, here's the direct link to the charts: Download the charts here!
     
    ksam2 likes this.
  6. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    It's a problem caused by my windows 7.
    Thanks but isn't there any download link for the whole that 160MB files on asset store?
     
  7. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    I'm afraid it's only on the asset store right now. If it helps, I can zip up a package for you when I'm back in the office tomorrow morning and send it over?
     
    ksam2 likes this.
  8. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    It's a lot of favor
    Thanks
     
  9. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    Hey @ksam2, here's a direct link to the package for you. Let me know if you have any problems with it!

    Download package
     
    ksam2 likes this.
  10. Archania

    Archania

    Joined:
    Aug 27, 2010
    Posts:
    1,662
    Thank you very much for this.
     
    peteorstrike likes this.
  11. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Thanks a lot for this! It would be good to get steel on there as well if it's not too late.
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Thanks a lot peteorstrike, btw just curious, seeing from the chart that full 255 white are used is there a plan to improve to bloom,Tonemapping/HDR based effect to fight the glittering/firefly effect caused by high smoothness value?
     
  13. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Thanks! These will be helpful for my team.
    I think some example emissive materials would be a great addition, or perhaps to another scene if emission complicates this chart too much.
     
  14. the_motionblur

    the_motionblur

    Joined:
    Mar 4, 2008
    Posts:
    1,774
    Cool - especially the charts looks very useful.
    Thank you very much :)
     
    peteorstrike likes this.
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    A similiar chart that took all those metallic and non metal examples and actually gave example colors for their smoothness would be a lot more useful. Dont really find these charts all that useful in its current state. Though i suppose they are a little more useful for people who dont know what the difference is between metallic and specular workflow.
     
  16. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    @Zomby138 I might be a little tight on space there now but there's a very simple steel sample in the Shader Calibration Scene if it helps!

    @rea There's been a recent refactor of the image effects but I'd expect the current ones to be the ones that ship with 5.0. I believe the sparkles are mitigated a little by using Standard shader with correctly exposed HDR's, Linear colour space, and photographic tonemapping but it seems as much an AA problem as it is an image effect issue. I'm hopeful we can look at improving visual issues like that further along the 5.x cycle.

    @chrismarch That could be really handy as part of the Shader Calibration Scene, great suggestion. We're tweaking some things with HDR colours/emissives, so this might have to wait for after 5.0 launch!

    @kurylo3d The difficulty with applying specific values to smoothness is that it has no reliably, scientifically measurable attributes, unlike albedo and specular, and it's almost always set artistically.

    There can be a smooth, shiny aluminium, and there can be a dull, rough one. A shiny, wet brick, or a dry, dusty one. Yet brick and aluminium, regardless of how shiny or rough, usually have the same albedo and specular/metal values. And what distinction do we make between a scratched metal and a scuffed metal, in terms of smoothness? The variations are far too numerous to cover, which is why we figured that it's best left as a sliding scale, that is to say - the smoothness is the one value you need to play around with depending on how you want the material to look. By far the most important numerical values for the 'correct look' are the RGB for albedo and specular maps and the greyscale values for metalness.

    There are examples in the Shader Calibration Scene of different smoothing values for certain materials, so you can at least look at some simple, more specific samples there.
     
    twobob likes this.
  17. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Thanks, these are great.

    I don't know too much about these kind of workflows, so I found it interesting just how different they are - I kind of assumed that albedo would remain consistent, with only the spec / metallic parts differing but it seems that each method requires a completely different approach to authoring textures.
     
  18. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Just a note to the moderators: Shouldn't this thread be stickied? It would be very unfortunate if it disappeared from the list after a while. Or, maybe even preferable: Could we have one stickied thread that links to all those "official" threads? I think this would be preferable because to many stickied threads can get a little annoying when browsing the form. Maybe just one with the title "Official Threads" would be enough - and then all those nice official threads could be linked from there.
     
    twobob and the_motionblur like this.
  19. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    yes bit that being said.. giving us diffuse colors of every material doesnt much help either... i mean lets face facts... wood can be colored any number of ways.. your not really giving us much info outside of what our current color texture maps already hold.

    A better thing to do for people is to give common setups. and show what colors belong in those work flows.. shiny floor wood... stones.. glass.. gold.. etc etc.. Think the most help ful thing u did was show the difference between spec and metallic workflow in regaurds to the colors of reflections.
     
  20. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Is there anywhere I can lookup the texture input values for the metallic shader? OK I get from this chart, that R = metallic and A = "smoothness" (though why it's reversed and isn't roughness from 0.0 to 1.0 is...???). I'm looking for guidance on the G channel and B channel though. Through experimentation I've concluded that G = Micro Occulsion...? But can't figure out B... if it's even anything.

    Also is there a general guide for the other shader values such as Height and Detail Mask, and are there recommendations or guidelines for "skin" or thickness/backscatter workflows for Unity 5?
     
  21. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    @chingwa I wasn't super-on-board with it being 0-1 smoothness at first, just because some other packages already picked roughness, but I think for the vast majority of users it will make a lot more sense in the long run. For one, all our legacy shaders (and most other 3d packages) use a specular or reflectance level to determine shininess that goes from black (non-shiny) to white (shiny).

    For non-artists and people new to Standard Shader, I think it would be a lot more confusing that the 'texture map that made things shiny' would suddenly be inverted to how it worked in Unity 4 (or 3ds max, modo, etc). This way, people can at least fudge their old specular maps into the Standard Shader slots and get a usable result and I think it's a lot easier to transition from the old shader to the new when you can see that a material's shininess is still equated with higher values on your textures. It also, from a purely subjective and aesthetic view, and matching years of industry texture convention, makes more sense to me to have white as the clean, unmarked surface of a texture, and painting imperfections and rough marks as black...

    All that said, though, it's still just a way to use a 0-1 value to represent shininess and so a roughness map would simply be the inverse of our smoothness map.

    As for the other questions, G and B on the metallic texture should be ignored in the metallic shader; generally just using an overall greyscale value for the RGB should suffice but it leaves the G and B channels free for any custom shader use or future extensions. Height and detail mask will be covered more in upcoming tutorials, but height is a greyscale value that pushes out white areas of the map and is multiplied by the amount slider. The detail mask is an alpha used to mask off the Secondary Maps contribution. I usually put this in the alpha of the albedo or into the alpha of the emission or normal maps, if it's a material with transparency. Hopefully we can go into more detail on these things soon!
     
  22. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    Yesterday I was working on creating a few non-metalic materials with the metalic shader workflow. I had some pre-existing diffuse, normal, and specular maps. The specular map was greyscale and I was having some issues that maybe Unity could help with.

    With help from the calibration charts, I understand that I need to move the specular greyscale values into the Alpha(A) channel and the Red(R) channel should be all black (0) to be non metallic. With photoshop, this is trivial to do but it seems like a common task that maybe could be automated in the asset importer. I see that there is an "alpha from greyscale" option which, at first, sounds exactly like what I'm asking for. Unfortunately, it doesn't clear the greyscale value out of the Red(R) channel so my metallic values are incorrect.

    Should there be a "alpha from greyscale and clear RGB" option?

    Or a more robust solution I was thinking/dreaming of would be some sort of built-in texture builder that allows creating one RGBA texture from several greyscale textures or values. It would look similar to the standard shader UI but with different slots for R, G, B, and A. when a texture is not applied to a channel, a slider could be available to set the channel value for all pixels.
     
    Last edited: Jan 27, 2015
  23. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @peteorstrike - thanks for the response. Your note about texturing the roughness makes sense, as seeing white as smooth while authoring a texture is actually more intuitive. I think I'm just used to seeing a roughness slider, instead of a smoothness slider and it was giving me weird convulsions. :)

    I had expected the channels of the Standard Shader inputs to be packed a little more efficiently, as having an entire texture for "metal/roughness" is wasting 2 channels for that texture right out of the gate. Sure I get you can use these for special fx down the road, but common PBR function such as occlusion and gloss currently go in a different texture. And sure, I understand that you can put these 2 into the metal map right now... BUT it makes more sense to me to have this as standard behavior.

    So then you'd have diffuse, normal, and mask0 map... with the mask0 map having all 4 channels utilized for common pbr functions. If you need special fx down the road these could be added in a mask1 or mask2 map.

    I dunno, maybe I'm just splitting hairs? Maybe none of this really matters? I'm likely going to scrap the standard shader anyway and write my own custom PBR Shader to use in my own projects instead... because I have control freak tendencies... and because Unity is so awesome and let's me write/use write any shader I want :D

    --- Edit --- I just wanted to add, that the ability to pack the channels into one texture is one of the main benefits of using the metallic workflow over the specular workflow, as it saves 3 rgb specular channels and the addition of a second map. To not have this texture packed in the metal shader is a pretty large oversight.
     
    Last edited: Jan 27, 2015
  24. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @mtalbott - we're both talking about the complete opposite. I want them all packed together and you want the option of them being all separated! :D
     
  25. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    @chingwa actually I think we are saying the same thing, just with opposite approaches. I agree that the textures used by the standard material should be efficiently packed, all channels should be used and your diffuse, normal, and mask0 setup makes sense.. I think the difference between what you're saying and what I'm saying is that the packing of the textures should be something done under the hood in unity, with the artist supplying separate grey scale masks. That would align closer to "years of industry texture convention" and existing texture assets. While most artists can combine and pack the separate masks in photoshop, it makes for unintelligible image file that clouds a clear understanding of what's going on. Also, while most studios have some image editing software, if unity wants to support the free-indie community, they should not assume that everyone has access to software to easily move masks to different channels.
     
  26. peteorstrike

    peteorstrike

    Unity Technologies

    Joined:
    Oct 4, 2013
    Posts:
    116
    We're talking internally about a more optimal arrangement for how the Standard Shader maps could be authored that would help address empty channels for Metallic without creating a ton of work or refactoring. In an ideal world, it would be cool to layer channels any way you pleased and split them out or combine as needed to any texture slot you wish but that's not going to be something we can do for 5.0.

    Either way, though, I think there's no escaping needing to use an image editing software of some kind to author these maps - I can't think of a situation where you could correctly author maps for PBR without using Substance Painter, dDo, Photoshop or Gimp. Maybe I'm missing something, though?
     
  27. tynew

    tynew

    Joined:
    Sep 25, 2013
    Posts:
    122
    Hey peteorstrike, in regards to the arrangement how about:

    -Diffuse/Albedo
    Base (RGB) Alpha (A)

    -Metalness(R) AO (G) gloss/roughness (B)
    or
    -Metalness(R) AO (G) spec(dielectric spec color accuracy)/ (B) gloss/roughness (A)

    As an artist, there doesn't really seem to be a point to have a 0-1 slider for Occlusion logically. Although it could become useful as a multiplier?
     
    chingwa likes this.
  28. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    There's a lot of way to do that, and i believe that everyone behind unity team are aware or already have some idea about it. For example maybe Unity can use some kind of industry standard texture layer arrangement like another engine/realtime renderer (Marmoset Toolbag) that use PBL so people can author the textures and it's still compatible with every engine, Or Unity still use the same setup as the current standard shader (multiple texture) but add a "compile material" button in the material setting for material that using standard shader and it will combine all of those textures into completely packed textures and assign it into the material with a new Optimized material just like how Unity packed the textures for the Old tree creator material.
     
  29. Dweep

    Dweep

    Joined:
    Oct 8, 2014
    Posts:
    28
    I once had a setup that worked something like this:
    R: Metalness
    G: AO
    B: Emissive (color from albedo)
    A: Roughness

    Worked nice at that time.
     
  30. ReJ

    ReJ

    Unity Technologies

    Joined:
    Nov 1, 2008
    Posts:
    378
    Remember that most often people use "Compressed" textures. Packing as many different channels into one texture is generally NOT a good idea. Unless you're fine with horrible compression artifacts of course ;)

    Stuffing 4 different channels into one texture and then turning compression OFF - is not a good idea either. You will loose both in memory footprint and it is usually harder to author content this way.

    Given desktop and DXT5 compression, I would advice to use 2 unrelated channels per texture for good quality (at least one of them should go into Alpha). 3 channels are possible, but most likely will come at the expense of quality.

    On Mobiles I wouldn't go for more than 2 channels per texture, unless you aim for platform specific compression (like ATC or DXT) or have liberty of targeting only ES3.0 platforms with ETC2 or ASTC compression.


    BONUS!
    If you look closer at Standard shader you will notice that Metallic uses (R) channel, but Occlusion uses (G) channel. The fact that Metallic and Occlusion are using different channels is not an accident :)

    You can already today combine 3 channels into one texture:
    R: Metallic
    G: AO
    A: Roughness
    Combing those channels into one texture and plug the same texture into both Metallic and Occlusion slots.

    Choice of particular (R) channel for Metallic and (G) channel for Occlusion is not accidental either. (G) channel gets slightly better precision in DXT5 than (R) or (B) channel, thus it is used for Occlusion which usually stores gradients. Metallic on the other hand is quite often just "binary" and can live with slightly less precision than Occlusion.

    PS
    Combining Occlusion (G) and Smoothness (A) can be especially good idea for materials which are completely dielectric (non-metallic) or completely metallic. In such case (R) channel of the texture is pretty much constant giving you the maximum compression quality.
     
    Tethys, garrett3d, jp1 and 6 others like this.
  31. Breyer

    Breyer

    Joined:
    Nov 10, 2012
    Posts:
    412
    Nice explanation! now we see that u choosed channels carefully, and i think this is worth for blog post? with specular setup explanation?
     
  32. mtalbott

    mtalbott

    Joined:
    Dec 21, 2011
    Posts:
    125
    Thank you @ReJ, that does help clarify. I wasn't thinking of the consequences of compression.

    Although, while the reasons are more clear now, the UX is still a little "muddy". Would it help if, in the shader inspector, after the property name you gave us a hint to what channel(i.e. Albedo(RGB), Metallic(R), Smoothness(A), Normal(RGB)). Also, why is Smoothness a sub-property of Metallic. It seems like it should be it's own thing with it's own texture slot even if we use the same texture for both, metallic and smoothness.

    I second the idea that this would make a good blog post.
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    I always figured the R channel had the best compression fidelity (at least from my experience using the camera depth buffer). But I take it a pre-compressed image has a different profile than the camera buffers. I also take it that the B channel is absolute crap, since you barely mentioned it :D

    In all my research about PBR workflows and texture channel combining, this is the first I've heard about these compression issues. I would have thought it would be better to have fewer texture lookups, but what you're saying about compression makes sense.
     
    twobob likes this.