Home Technical Talk

The Gamedev Cast is answering questions about PBR!

1
polycounter lvl 8
Offline / Send Message
MaVCArt polycounter lvl 8
Post_PolycountPBR2.png
PBR - WHAT DO YOU WANT TO KNOW?

PODCAST DATE: SUNDAY, JUNE 15TH, 8PM GMT +2 ( 12 PM EDT )

Hi everyone,

it's been a while since we last did an episode, and so we wanted to come back with a bang. That's why we've decided to do a PBR-centric episode focusing purely on the topic of physically-based rendering and shading systems, the various systems that are out there, their pros and cons, and the general misconceptions that surround them.

Of course we're not doing this by ourselves: we'll have a panel of experienced developers on as guests, such as Joe ( EarthQuake ) Wilson, Andy ( Metalliandy ) Davies, Mark "marks" Sneddon, and Lee ( Almighty_Gir ) Devonald.

BUT WE NEED YOU TOO!


Throughout the episode, our panel will be answering user-submitted questions, so ask us what you've always wanted to know about PBR, right here in this thread! We'll make sure to go through them all before we start the podcast, and answer the most relevant ones. So if there's anything you're dying to know about PBR, please ask away! ( Also, please make sure before posting that the question you're about to ask hasn't already been asked or answered )

[ame="http://www.youtube.com/watch?v=mO1smN6A93k"]The Gamedev Cast PBR Special - LIVE - YouTube[/ame]

Replies

  • deolol
    Offline / Send Message
    deolol polycounter lvl 6
    Cool! - I got a question... What is the advantage/differences between the Disney brdf workflow and the glossy/specular?

    I've found the UE4 maps way easier to work with but when reviewing quixels helmet demo the specular mask is increadibly detailed - i was under the impression it was a simple flat colors to describe the real world value... so since UE4 workflow lacks this mask how does it determine those values (if its from albedo, im not too sure about this, does albedo color become more important or need accuracy)?

    Thx guys.
  • Crisis
    Offline / Send Message
    Crisis null
    What is the best process to convert a texture to albedo ?
  • EarthQuake
    I have a question for Lee and Andy:

    U WOT M8?
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    So, Metalness or Specular map? Pros and cons etc.

    What to do if can't find a spec value for a material you need?

    How to properly turn a texture found on the web into an albedo for bpr?

    Roughness or Glossiness?

    Photoshop or other third party software for texturing? Which one is the
    best choice?

    Scratches in roughness\spec map. Should their value be lower or higher than that of the material's?

    What is the best lighting setting to preview textures in Marmoset?

    Where to get spec values for human skin? What to do if I want to use photo textures for the skin?

    Tips on the workflow.
  • codyaq2
    Offline / Send Message
    codyaq2 greentooth
    What superfranky said.
  • BagelHero
    Offline / Send Message
    BagelHero interpolator
    Wasn't going to chime in, but since the thread's kinda quiet...

    A comprehensive overview of the basic workflow would be kinda nice. Like, I understand the core concepts of PBR, but I have to say I have no idea of where to begin or what would be involved. I've kind of been eyeing it and that... undermines the process and a lot of it's plusses entirely, haha.

    Additionally, what values can actually be reliably measured? I've heard some conflicting inputs on that. Spec? Albedo colors? Roughness/Gloss? Metalness?
    Of those values, can you measure them yourself from, say, a photo? Or is there something special or universal when it comes to those values? (Again, this is where I get stuck and start to just eye it.)

    I feel kinda dumb asking such basic stuff, but I guess it's new. A bit of art-side perspective would be nice; I see a lot of stuff about the rendering tech and systems but heck if I can actually decipher that. I just draw pretty things, y'know, so the only thing I have understood from the get go somehow is albedo. :poly136:
  • Sean VanGorder
    Who would win a mud wrestling match, Joe or Andy?
  • throttlekitty
    In the absence of self-shadowed characters in a PBR system, what's a good option for faking it? For example, a hooded character, or oversized sunglasses.

    (or is this a non-issue?)
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    Can't wait for this podcast now. When is it coming out?
  • marks
  • MaVCArt
    Offline / Send Message
    MaVCArt polycounter lvl 8
    updated the thread with the podcast date information, thanks, SuperFranky for pointing that out :)

    edit: also, great questions so far, keep em coming!
  • Beddall
    Offline / Send Message
    Beddall polycounter lvl 6
    Hey,

    So, like most game artists out there at the minute I've been looking into the whole PBR thing and Unreal4. There seem to be 2 different methods I've seen so far and I'm wondering which is the best to use and when.

    Firstly, I've seen objects with texture sheets laid out pretty much as they have been for donkeys years. (1 set of t.pages for 1 object - with each map defining certain properties) So no change there.

    Secondly, In the Unreal4 examples, I'm seeing something totally different. They appear to have a library of pre-made materials, which are applied to the object via masks. They seem to use this method on everything from walls to small props.

    So my question is this,... is using masks to lerp between pre-made materials going to be the way things are done now? Even for things that would usually have their own texture pages? or is it just a case of Epic trying to show us what COULD be done... if we so desired?

    If it's a case of either way could work and it's situational... then what factors do you need to think about before deciding which method to use?

    With my little knowledge of the tech side of real time rendering, I assume masking between the materials would come at a higher render overhead than texture pages.
    In the 'cave' showcase in Unreal for example, there is a wooden beam with leather wrapped around it, and that thing must have been using 5 or 6 different materials, all nested in one another. It was Crazy Town!

    Any help with this would be greatly appreciated.
  • deohboeh
    Offline / Send Message
    deohboeh polycounter lvl 5
    In a PBR engine does applying specular maps make it work in legacy manner or does it have some new characteristics? I see in UE4 there is a node for specular and specular power maps.
  • S2Engine
    Offline / Send Message
    S2Engine polycounter lvl 10
    I'd be interested to hear about the pros and cons of switching to PBR from a production side. There are the obvious "consistency among different lighting scenarios" benefits, but are there other tangible points that make it cost-worthy? How do the benefits stack up against the negatives of a switch from a traditional rendering pipeline - such as having to toss out all existing textures and shaders which were previously authored? Any implications on perf that have affected production scopes? How has re-training a studio's worth of artists worked out? How tall of an engineering order was it to switch, especially in terms of developing the lighting engine and adding such features as probes, area lights, etc etc?

    edit: Also, anyone have any thoughts on PBR on previous-gen (X360 / PS3)? I believe Black Ops used it, as well as Remember Me, and I'm curious how difficult (if at all) that was to implement on the older hardware.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 15
    perna wrote: »
    I would like to know how the Asian and Black communities view the recent developments of PBR
    You suck... I spit juice all over my tablet/monitor.
  • EarthQuake
    Thanks for all the questions so far guys, these are great! We've got about 1 more day for taking questions.
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    EarthQuake wrote: »
    I have a question for Lee and Andy:

    U WOT M8?

    I'LL 'AVE U M8! SWARE ON ME MUM!
  • MaVCArt
    Offline / Send Message
    MaVCArt polycounter lvl 8
    *wrings hands* moderating this episode will be fun.
  • MrHobo
    Offline / Send Message
    MrHobo polycounter lvl 13
    Awesome!

    I have some question then.

    PBR values:
    Getting accurate vaules, Ive seen some papers on PBR with some IOR (Incidence of Reflection?) math but to be honest it's over my head. I have no clue how the hell I translate any of what I have been read into rgb/hsv/etc. Right now I really feel like I'm trying to play is by eye. Ive seen the dontnod charts too... but it's not exactly ideal and is a bit unclear.
    Furthermore should we be in Linear or gamma from now on?
    And while Im at it, how the hell do I know if Im texturing in linear or gamma? Is there a button a switch, do I wave my junk at the screen?

    Skin and PBR:
    I feel like a lot of this (in terms of texturing) can sort of be all over the place depending on the character. Are there some hard and fast rules for handling spec and gloss for characters in PBR? What about subdermis maps, how heavily should they be relied on to bring a character to life?
  • Teessider
    Offline / Send Message
    Teessider polycounter lvl 11
    Can't wait for this podcast!! :D

    From a tech art side:
    From someone who getting into shaders (and implementing them myself at work) how easy is it to implement compared to "normal" shaders? (in Unity anyway)

    I understand there are paid and free PBR shaders out there (We are using Unity but we are stuck on Unity 4.2 for now) but I would rather create them myself and incorporate Marmoset Skyshop too (the new update looks great).
  • MaVCArt
    Offline / Send Message
    MaVCArt polycounter lvl 8
    Livestream for our PBR podcast will start in just under 2.5 hours:

    [ame="http://www.youtube.com/watch?v=mO1smN6A93k"]The Gamedev Cast PBR Special - LIVE - YouTube[/ame]
  • marks
    Offline / Send Message
    marks greentooth
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    That was a good podcast, I learned a lot. But too bad you couldn't answer every single question that was submitted :( Still, thanks for this episode :)
  • marks
    Offline / Send Message
    marks greentooth
    If there was anything not answered, please post it in this thread and we'll do our best to get you an answer :)
  • EarthQuake
    Yeah I feel like we got to most of it, though some of the questions probably more indirectly than others, but feel free to ask again if you want more detail about something.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    For example I want to put scratches on a metal surface and use roughness map for it( where black is rough and white is shiny), do I make scratches rough or shiny compared to a base value?

    What is the best lighting setting to preview textures in Marmoset? I find it hard to judge my PBR materials when they look different under different sky settings... Because of colored reflections some materials can appear dimmer or brighter than they really are, have different saturation etc.

    How to turn a texture found on the web into an albedo for bpr? For example, I want to make a leather material using a texture of leather I found on cgtextures.com. Do I even want to do that in the first place?

    These are questions I'm dying to know answers to :)
  • EarthQuake
    For example I want to put scratches on a metal surface and use roughness map for it( where black is rough and white is shiny), do I make scratches rough or shiny compared to a base value?

    It depends, you need to use some logic here. Is the base of the metal sort of rough? Would scratching it reveal a smoother layer underneath? If so, you would want the scratch to be more glossy.

    How about glossy plastic? If you scratch the top glossy coating, you probably reveal a rough undercoat. In that case, more rough.

    Just try to think about the material the scratch or scrap is revealing, and if it would be more or less glossy than the top material, and you'll get your answer.
    What is the best lighting setting to preview textures in Marmoset? I find it hard to judge my PBR materials when they look different under different sky settings... Because of colored reflections some materials can appear dimmer or brighter than they really are, have different saturation etc.

    Well, the best thing to do is preview with multiple lighting environments really. There isn't a specific best one.
    How to turn a texture found on the web into an albedo for bpr? For example, I want to make a leather material using a texture of leather I found on cgtextures.com. Do I even want to do that in the first place?

    These are questions I'm dying to know answers to :)

    This is difficult, there isn't really any easy way to do this. You would probably want to compare it to values for known materials that are similar. Really there is no fool-proof "correct" way to do this, as albedo values can vary significantly. Red bricks are not always the same brightness or color for instance.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    I know there are charts for spec values, but is there something similar for albedo values?
  • S2Engine
    Offline / Send Message
    S2Engine polycounter lvl 10
    Great podcast, lots of good information and experience being shared. There was mention of the shader math behind PBR running a bit more expensive than legacy methods; any idea how much of a hit that was? Alien: Isolation for example is slated for release on PS3, did that require any serious additional wrangling for perf?

    Also it sounded like one engineer and one artist took on the brunt of the conversion work, how much work did that end up being? Months of crunching to put it all together, or was it something more manageable?
  • marks
    Offline / Send Message
    marks greentooth
    S2Engine wrote: »
    There was mention of the shader math behind PBR running a bit more expensive than legacy methods; any idea how much of a hit that was? Alien: Isolation for example is slated for release on PS3, did that require any serious additional wrangling for perf?

    I can't really talk about A:I too specifically, but as Lee mentioned the math isn't *that* much more expensive with PBR shaders. I'd say you probably don't need to worry about it unless you're targetting some kind of mobile platform OR your game is already heavily bound in pixel shading.
    S2Engine wrote: »
    Also it sounded like one engineer and one artist took on the brunt of the conversion work, how much work did that end up being? Months of crunching to put it all together, or was it something more manageable?

    Again, I can't speak specifics but we found the biggest hurdles to be a lack of artist-oriented learning materials at the time (which there is now tons of online!) and learning how to correctly create PBR content.
  • deohboeh
    Offline / Send Message
    deohboeh polycounter lvl 5
    Do spec maps still work the same or does it change. Ue4 has spec maps so this is kinda confusing. Do I still have to account for conservation of energy on the spec and gloss maps?
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    If you read the documentation on the UE4 site, it quite explicitly states that you don't need to worry about using spec maps for 99% of materials.

    As for energy conservation - as long as you use things like the chart below as your baseline for reflective values, then the shader should do all of the energy conservation for you.

    cfZ3YSA.jpg
  • Brygelsmack
    Offline / Send Message
    Brygelsmack polycounter lvl 11
    I just listened to the full thing, great podcast. I'm still curious though (this might have been covered but lost on me in the language barrier, if so I apologize), but to my understanding PBR doesn't necessarily consist of a specific set of textures, right? Or do you always need, say, a metalness map for your content in order for it to follow a correct PBR workflow? Because as far as I know, CryENGINE doesn't make use of metalness maps at all, just albedo, normals, spec and gloss. Am I correct by saying that these textures work with PBR?
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    you're right Brygelsmack, you can use metalness or full spec workflows, they're quite engine dependent.

    the idea behind the metalness workflow is to simplify. if you look at the chart above you can see that the range that non-metals fall into is incredibly small. so when you work with the metalness workflow, it puts all non-metals at the same averaged value. with Cryengine, you'd need to manually set the reflectivity for all of the surfaces you're making, which is great as it gives you more accuracy, but in practice you'll be working within a few very different shades of grey.
  • Brygelsmack
    Offline / Send Message
    Brygelsmack polycounter lvl 11
    Ah, alright! Thanks for the explanation.
  • Will Faucher
    Offline / Send Message
    Will Faucher polycounter lvl 12
    Pardon me if I missed it, but which map do I put the equivalent of "specular color" into with a Metallic/Roughness workflow?
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    Pardon me if I missed it, but which map do I put the equivalent of "specular color" into with a Metallic/Roughness workflow?
    There are two workflows you can choose: Metalness or Specular. Metalness is where you lay what is metal and what isn't and it draws specular value of metal parts from albedo. Specular is where you have to put all your specular values in.
  • EarthQuake
    There are two workflows you can choose: Metalness or Specular. Metalness is where you lay what is metal and what isn't and it draws specular value of metal parts from albedo. Specular is where you have to put all your specular values in.

    Right, if you're using the metalness workflow you do not have an explicit full color specular intensity map.
  • Will Faucher
    Offline / Send Message
    Will Faucher polycounter lvl 12
    Right, that is exactly what I meant. I'm talking about a metalness workflow. I was not aware that it drew the specular value from the metal parts of the albedo. Thanks for the clarification.
  • EarthQuake
    Right, that is exactly what I meant. I'm talking about a metalness workflow. I was not aware that it drew the specular value from the metal parts of the albedo. Thanks for the clarification.

    Yeah, with the metalness workflow, the albedo map is both the diffuse and specular map in a way.

    For metalic surfaces (white in the metalness map) the specular intensity and color comes from the albedo map, and the diffuse color is set to black (because pure metals reflect nearly all the light that hits them and absorb/scatter very little).

    For non metal surfaces (black in the metalness map), the specular intensity is locked to a fixed value (about 0.04) as most non metals reflectivity is in a very narrow range. The albedo sets the diffuse color in this case like traditional shaders do.

    The UE4 "specular" input really shouldn't be used, its a legacy feature they left in and it can result in physically inaccurate materials if used incorrectly.
  • deohboeh
    Offline / Send Message
    deohboeh polycounter lvl 5
    If you read the documentation on the UE4 site, it quite explicitly states that you don't need to worry about using spec maps for 99% of materials.

    Oops! I hadn't read that.. :poly122:
    Thanks for the info Gir! Much appreciated! :)
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    So, if Metalness map draws spec values from Albedo, how do I properly mix color and value in albedo for it? For example, if materials value is 140, and I want a color that is brighter than this value, what do I do to not screw up this material value?
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    you may need to explain a little more in-depth, but going into the math a little it works like this:

    Reflectance = albedo * metalness + 0.04 * (1 - metalness));
    Diffuse = albedo * (1 - metalness);

    so if you take whatever value is in your albedo, you multiply it by the inverse of the metallic map (so anything black, non metal is a multiplier of 1. anything that's white, metal, is a multiplier of 0. anything multiplied by 0 = 0, or black). so you could potentially "fudge" the values by understanding this math, and knowing that if you multiply by mid-grey (0.5) then you'd want a base value of 280, 280 * 0.5 = 140.

    however i don't recommend fudging values if you want to maintain physical accuracy.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    you may need to explain a little more in-depth, but going into the math a little it works like this:

    Reflectance = albedo * metalness + 0.04 * (1 - metalness));
    Diffuse = albedo * (1 - metalness);

    so if you take whatever value is in your albedo, you multiply it by the inverse of the metallic map (so anything black, non metal is a multiplier of 1. anything that's white, metal, is a multiplier of 0. anything multiplied by 0 = 0, or black). so you could potentially "fudge" the values by understanding this math, and knowing that if you multiply by mid-grey (0.5) then you'd want a base value of 280, 280 * 0.5 = 140.

    however i don't recommend fudging values if you want to maintain physical accuracy.
    That was too complex for me, haha. How can I maintain the spec value while painting a color I want my material to be? Providing I want my material to somewhat match my reference. To be exact: how do I turn this http://www.backgroundsforall.com/wp-content/uploads/2013/08/background-texture-metal-green-grate.jpg or http://wallpaperscraft.com/download/keys_multi-colored_metal_25733/1920x1080 this into a material that will look like this? If I already know the spec value of a metal(steel, copper, whatever), but I want to match the color of an object. Since the spec value in photoshop is just a grey color and I want it to be green\red\blue and bright\saturated as I need.

    If that makes any sense
  • EarthQuake
    That was too complex for me, haha. How can I maintain the spec value while painting a color I want my material to be? Providing I want my material to somewhat match my reference. To be exact: how do I turn this http://www.backgroundsforall.com/wp-content/uploads/2013/08/background-texture-metal-green-grate.jpg or http://wallpaperscraft.com/download/keys_multi-colored_metal_25733/1920x1080 this into a material that will look like this? If I already know the spec value of a metal(steel, copper, whatever), but I want to match the color of an object. Since the spec value in photoshop is just a grey color and I want it to be green\red\blue and bright\saturated as I need.

    If that makes any sense

    The first material is not metal, but painted metal. Its important to remember that the metalness value defines the top layer, if you have a layer of paint, dirt, or anything else on top of an otherwise metallic object, the material is not metal.

    It doesn't have colored specular, the spec highlight is white as seen in the ref, so there is no need for you to worry about how to paint the specular color. Just tag it as non metalic, set the albedo color to the green diffuse color, and set up your gloss/roughness map to the appropriate value for a glossy paint.

    For the keys, its a similar situation, the colored ones are painted, so not really metal.

    Now if you're talking about a metallic paint or something, then that's a bit of a gray area, and you may want to use values other than 0 and 1 there for metalness.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    EarthQuake wrote: »
    The first material is not metal, but painted metal. Its important to remember that the metalness value defines the top layer, if you have a layer of paint, dirt, or anything else on top of an otherwise metallic object, the material is not metal.

    It doesn't have colored specular, the spec highlight is white as seen in the ref, so there is no need for you to worry about how to paint the specular color. Just tag it as non metalic, set the albedo color to the green diffuse color, and set up your gloss/roughness map to the appropriate value for a glossy paint.

    For the keys, its a similar situation, the colored ones are painted, so not really metal.

    Now if you're talking about a metallic paint or something, then that's a bit of a gray area, and you may want to use values other than 0 and 1 there for metalness.
    To be clear, if I want my metal to be colored, then I should think about it as a non-metal or partly metal?
  • EarthQuake
    To be clear, if I want my metal to be colored, then I should think about it as a non-metal or partly metal?

    That's a bit vague, what is "colored metal"? What you should think about is what the top layer is.

    Is it raw metal?
    Is it paint?
    Is it rust? (not really metal)
    Is it a rubberized coating?
    etc

    Then the material choices become easier.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    EarthQuake wrote: »
    That's a bit vague, what is "colored metal"? What you should think about is what the top layer is.

    Is it raw metal?
    Is it paint?
    Is it rust? (not really metal)
    Is it a rubberized coating?
    etc

    Then the material choices become easier.
    Thanks. I think that clears my confusion. :thumbup:
  • Beddall
    Offline / Send Message
    Beddall polycounter lvl 6
    hey,

    The whole thing about sRGB and converting to linear sort of flew over my head a bit. Is this something that comes from high-end rendering? also, there was mention of a link with some way to convert the values, but i don't see it.

    after a bit of reading i think it's to un-gamma correct the textures.. .is this correct?

    also, there is a tutorial half way down this page,... http://maddieman.wordpress.com/2009/06/23/gamma-correction-and-linear-colour-space-simplified/ on how to convert your sRGB textures.... does this look correct?

    cheers
  • stevston89
    Offline / Send Message
    stevston89 interpolator
    Great talk guys! Thanks for sharing my dagger :)
1
Sign In or Register to comment.