[PBR] Physically Based Rendering Bible

134
polycounter lvl 4
Offline / Send Message
3py0n polycounter lvl 4
Hey all,

Here's a little snippet of myself. I've been a long time lerker of polycount and only recently started posting work. An aspiring 3D artist :)

I've started to learn about PBR/PBT as it is the new way of rendering/texturing true-to-life materials. I've seen a lot of different sources for this new method but haven't seen (or maybe I've overlooked) an all encompassing location with everything you need to know, etc.

So since I was learning anyway and since I have a habit of creating docs to organize my thoughts/what I've learnt for later use/study, I've created my own encyclopedia of sorts.

I present - The Physically Based Rendering Encyclopedia.

Please note that it is very much in its infancy and as I learn and update the doc, somethings will be removed or reworked.

As with more things, take a slight grain of salt with what you read, since there is never only 1 way of do things :)

Hope some find it useful. If not it is a good way for me to learn and keep track of information!

I've received some great feedback and requests/what people would like to see on the doc, which will inevitably be added onto the wiki at some point. So here is a list of requests that I will be working on.

CHANGE LOG
v0.95
  1. Included more information on how UE4 handles maps, values, etc
  2. Fixed some layout issues
  3. Updated and organized Additional Readings & References section

v0.9
  1. Added Marmoset PBR articles where appropriate
  2. Update FAQ section
  3. Re-organized some sections and information
  4. Added more examples, references, material reference values, and tools & programs

v0.8
  1. More or less completed the theory behind PBR section.
  2. Added more to the Guidelines & Basics section.
  3. FAQ is more filled out now.
  4. Made some corrections and alterations to some wording and layout.


UPCOMING UPDATES
  1. More information from my 10+ tabs.
  2. Additional tips/techniques from the pros
  3. A few more examples of texture sheets


FEATURES WISHLIST
  1. Q&A with pros
  2. Written with images tutorials

Sections to-be Added
A workflow/guide/some information on the actual texturing process. Ex. less theory, more examples/hands on material.
Tutorial/brief on how Stevston89 created his PBR stylized dagger.

Replies

  • Optinium
    Offline / Send Message
    Optinium polycounter lvl 5
    I approve, nice one, very useful to have it all in one place. Get it put on the polycount Wiki imo :3
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    Hey Optinium,

    Thank you for your support :) And yea I will when it gains more traction and I get more information in it.

    Also a shout out to your work :) I'm a big fan!!
  • Eric Chadwick
    Right on. This kind of research & condensation is one of the ways I learned game art, still do in fact. Keep it going!

    Would you be interested in editing our wiki to add this kind of info?
    http://wiki.polycount.net/PBR

    I can set you up with an account if you're interested.
    http://wiki.polycount.net/HowToContribute
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    Hey Eric,

    Yea I'd definitely be interested in doing that!

    However I'd like to have a more solid grasp/stock of information for my doc first. It would eliminate the need to redo/re-edit things if some information was repeated or unnecessary, or even incorrect.

    Also I feel having 2 locations with information is better than 1. Wiki is more easily accessible but requires internet connection whilst a Google doc can be downloaded and used even when offline :) So I'll be doing essentially 2x the work haha but it's all for the greater good!
  • Mr Whippy
    Offline / Send Message
    Mr Whippy polycounter lvl 5
    That is a great little collection of info so far.

    A colour picker Wiki page for PBR values (with a gamma and linear rgb readout would be nice :) ) would also be cool so people can just put up values and we can get a big library perhaps?

    Maybe even a little calculator in the page also to take various inputs and give outputs.

    Ie, IOR in, and perp reflectance out, as a 0...1 range float, or rgb linear, or rgb gamma.
    Or any other combination of the above and it fills in the missing fields. That way you can quickly double check values etc.




    I won't go too far into my confusion here, but gamma/linear still really needs a good explanation and it'd go really well in a wiki page too.
    Understanding what reality is actually like in a pure physical sense, and not our multiply tainted interpretation of it (via eye gamma, screen gammas, encoding gammas etc), is really helpful to understanding what are good values to use in PBR too.





    OK then, I'll go into my confusion here ;)

    So gamma, reality is actually more contrasty and our eyes boost the darks to make it look flatter?
    Or is it vice versa. It's never really made entirely clear.


    Cheers

    Dave
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    thanks for posting Mr Whippy :)

    Yea that would be neat!! But I currently don't have enough of an understanding of the math behind the conversions to do so. But if someone else does it'd be a great addition to the wiki!

    For the gamma/linear, I haven't come across a detailed explanation yet and currently my doc only covers the very basics of how materials are...well materials. Once I come across it or have more time I'll include a section of that for people who like to fully understand what it is they're looking at, etc :)

    Thanks for the input!
  • almighty_gir
    Offline / Send Message
    almighty_gir greentooth
    i found an innacuracy (while reading through).
    Metal absorbs all light that enters underneath the surface, hence metal has no diffuse reflection. This means that metal should have a black diffuse color. All visible light is reflected directly from the surface (specular reflectance). The different types of metal have characteristic specular colors.

    Metal actually neither refracts nor absorbs ANY light, metals are so dense that light can't actually enter the surface, which is why all of the light is reflected.

    i'm in the documents chat-channel if you want to ask any questions btw.
  • Eric Chadwick
  • almighty_gir
    Offline / Send Message
    almighty_gir greentooth
    I'd hesitate to use the Cerberus textures as a real guide for PBR. the reasons being:
    1. He's using the metalness workflow, and defined a painted surface as metallic when it should be non-metallic.
    2. He's baked lighting information into his albedo map, this is a big no-no

    also:
    Gloss/Roughness maps should generally be linear space off, but its not a big deal if you use sRGB/Gamma space.

    this is incorrect. Gloss/Roughness should ALWAYS be in linear space.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @Eric - Thanks!! That's neat and will be a good read :) I'll reference those if that's okay.

    @almighty_gir - Thanks for reading it so in-depthly! I knew the metal absorbing light sounded a little funny but it looked like it was from a reliable source haha. Grain of salt. I altered it to reflect the true nature of metal. Thanks! Also for the Cerberus texture, I couldn't find (at the time) a better reference. But it did seem a little weird and unconventional in the albedo. But thought it was just another method. Regardless thanks for pointing that out :)

    Also your comment on the gloss/roughness needing to always be in the linear space. Could your reasoning be due to the engine you typically use? I don't want to step on any toes or point fingers to who should know more but it was my assumption that a developer of Marmoset Toolbag would know his way around PBR lol This was in NO way a shot at anyone's reputation/knowledge. Was just pointing out a fact and I hope no one misconstrues my intention.

    @all - Sorry for all those who were confused with some of the content. It is still a work in progress and getting constructive feedback helps make the guide better!
  • d1ver
    Offline / Send Message
    d1ver polycounter lvl 9
    I'd hesitate to use the Cerberus textures as a real guide for PBR. the reasons being:
    1. He's using the metalness workflow, and defined a painted surface as metallic when it should be non-metallic.
    2. He's baked lighting information into his albedo map, this is a big no-no

    1)There are no painted surfaces on the gun. If you're referring to the darker parts it's a typical case of blued steel only heavily worn:
    orig.jpg

    Nominally, dark metals don't exist in nature. However, especially if you were looking into gun metals, the amount of treatment humanity has found for guns creates a whole plethora of optical properties. Bluing for one ends up covering steel with a thin layer of magnetite which is technically a mineral, but it's mineral luster specification is "metallic" so the metallic texture still applies.

    Once again in gun metals especially, I would strongly advise to forgo the binary notion of metal/non-metal 'cause it's still just an optimization. If you need high facing angle reflectivity then make it metallic 'cause that is what more "physically correct" is in this case.

    2)There is no lighting information in any sampled albedo provided with cerberus. What you are referring to is the metallic specular contained in the "albedo" texture.
    Putting AO in there is an optimization over providing AO as a separate texture as UE4 or TB2 would require you to do for the best result. In my book that was an excessive waste of a texture sampler that can be avoided in this case.

    I would also strongly advise against using "a big no-no" as a guideline. Lighting information does and probably still will for a while get baked in in some shape or form depending on the project and the tech. Not all shading is still possible or feasible in screen space. And the worst thing you can do to your game is make it look worse 'because you're trying to be physically correct.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @d1ver - Thanks for shading some light and sharing some of your knowledge on this subject matter. As you can imagine it's hard to get a definitive answer/solution to texturing, and things in general.

    For future reference if any content is up for debate and not entirely wrong, I will put it in review, denoted by an *. This indicates that the accuracy of said information is in question until confirmed/denied.
  • almighty_gir
    Offline / Send Message
    almighty_gir greentooth
    d1ver - Steel bluing is a form of oxidation. oxidation = non-metal.

    as for baking in lighting, you're absolutely fundamentally wrong. baking in lighting information defeats the purpose of PBR (which is, to make things consistent in all lighting conditions), it also removes control from both you as the artist, and from the rendering tech as to how much lighting is occluded.

    that is to say - it's fine to have an occlusion mask, but use it separately from your main colour/reflectance maps.

    as for texture space:
    R = gloss
    G = metalness
    B = occlusion/cavity

    done.

    And finally, the reason your gloss/roughness maps should always be in linear space, is because almost all of the PBR shaders out there are computed in linear space, roughness inputs are taken from a 0-1 range in all cases. (note: this is a simplification, i want to avoid people getting overly confused on the issue).
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @almighty_gir - Thanks for the correction and input :) I shall look further into this matter and apply it to the doc.
  • d1ver
    Offline / Send Message
    d1ver polycounter lvl 9
    I wish I was Gir.
    This is the point however where I ask you to adopt a friendlier tone please. You are entitled to your opinion as much as I am but pontificating without bringing forth evidence does nothing but paint an unpleasant picture of you, which, in this industry, is a luxury no one can afford.

    Hematite:
    metallic-luster-glossary.jpg&size=250
    Galena:
    Calcite-Galena-elm56c.jpg
    Magnetite:
    Magnetite.jpg
    Here are 3 examples of minerals for you.
    All are non-metals. Yet all exhibit higher then 0.04 F0 reflection. but with your proposed approach their reflectivity would be set as exactly that thus being physically implausible.

    Another example. According to Quixel wet mud F0 = 0.18:
    reflcompare10.jpg
    How would you realistically communicate that making it fixed non-metallic?

    Now when it comes to bluing, here's wikipedia:
    True gun bluing is an electrochemical conversion coating resulting from an oxidizing chemical reaction with iron on the surface selectively forming magnetite (Fe3O4), the black oxide of iron.
    Now if you don't want to take my word for it please do familiarize yourself with luster classification of Magnetite on wikipedia:
    http://en.wikipedia.org/wiki/Magnetite
    Now here's wikipedia on Metallic Luster itself:
    Metallic (or splendent) minerals have the lustre of polished metal, and with ideal surfaces will work as a reflective surface.


    As for baking in lighting, what you are saying makes me wonder if you are aware of what happens with a separate AO map in the shader.
    Before implementing a PBR pipeline on my project I've actually gone through all the shader code to see what it does specifically but apparently epic has some older breakdowns on UDN:
    To capture this shadowing, we generate a cavity map, which is typically an AO map with very short trace distance. This is multiplied by the final BaseColor before output and multiplied with 0.5 (Specular default) as the Specular output. To be clear this is BaseColor = Cavity*OldBaseColor, Specular = Cavity*0.5.
    As you know there is no Cavity input in UE4 anymore. But there is AO.
    And what it does is get multiplied by your Specular(default = Burley's 0.5 - in the formula). Which is exactly what I chose to do offline for my metals.

    The bigger reason for this is that reflection sampling is happening from the reflection points in the world which does not take into account object's self occlusion or self reflectance. SSAO is supposed to mask out your indirect lighting/reflection but it does not always do the best job of it and this is why you need separate AO.

    As for the texture space your approach is also not always practical. I can have all kinds of maps lined up for that B slot in my specular texture - emissive, porosity, heightmap/blendmap, scratch map, dirt map.

    I hope that makes a fairly conclusive argument that all the things I've done are nothing but physically accurate, but you are more then welcome to reply, quoting all the trusted sources you're going to be using to expose my misconceptions.


    3py0n no worries. My pleasure actually.
    I greatly appreciate your effort. I think you think it's a great idea to try to unify all the info however I'm afraid that you might be setting yourself up for a pretty tough task, 'cause a lot of studious, especially with their proprietary software, have their own spin on PBR implementation. This is not to say that most of the info is not alike, I would just probably refrain from the word "bible" :)

    Another word of advice is, and this is coming from personal experience - don't go correcting things every single time someone gives you feedback unless they provide reliable sources of the info. If not you can always politely ask them to.
    Providing information is not always about pleasing people, but rather finding the needle of truth in they haystack of scattered info floating about.

    If you're going to be transitioning it to the wiki at some point please do PM me so we can make sure that info is as correct as possible(I've been humbly given wiki-editing privileges a long while back).

    Best of luck!
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    Hey d1ver,

    That was a great read. You seem to be a wealth of knowledge. Makes me wonder if I'm the person for the job for this (newly titled) Encyclopedia haha.

    And yea I just chose that out of impulse and realized it wouldn't be a bible because there are a few statements in the doc that are contradictory (there isn't just 1 way to do things). Regardless, I've taken your suggestion to heart and will continue my efforts to prep this doc until I feel it is full enough that anyone with no prior knowledge of PBR will be able to create physically-accurate textures and understand how it works (if they so choose to read the science behind it).

    Your help so far has been very appreciated sir!!
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    Hey in general it seems there's some good info. I would clarify some parts a bit though:

    -When you explain specular, make very clear it's one of 2 workflows, the other being metallic. Things are very different between them in some areas, and people could get confused if you don't make it super obvious which one you are talking about, yet you hop between the two quite a bit.
    -this line "The sRGB color range for most non-metal materials is usually between 40 and 60. It should never be higher than 80/80/80." should be clarified that it's about the specular map.

    The Cerberus example is perhaps a bit trickier, allow me to bring up some points:
    -For really tricky materials like this, the metallic model, in most implementations, might prove limiting (as i believe is the case here). I suggested to Marmoset to perhaps add a separate 'F0-control' map to work around these limitations, no idea where they are with that.
    -The Marmoset/Quixel material values for specular values are old, I have been told by Teddy himself. He specifically called some of it 'bogus data from a prototype scanner'. The F0.18 for mud being a good example of that.
    -Wikipedia saying something has a "metallic lustre" doesn't mean that it without a doubt, is a metal. The look of a material is subjective, so that shouldn't be seen as an undeniable fact.
    -It's OK to use mixed-metallic values in difficult cases. Since the metallic makes the F0 blend from 0.04 to 0.25, a metallic value of 0.75 still results in an F-zero of 0.1975.
    -UDN saying 'AO map with very short trace distance' doesn't meanjust any AO map. AO with large, faded gradientsis not the same and should never be multiplied and 'baked into' the albedo. Most of the time you're better even not baking, but just getting cavity from your normals since that is always small-scale. The cerberus is mostly correct, just some areas around the trigger are perhaps a bit questionable.
  • marks
    Offline / Send Message
    marks polycounter lvl 9
    And finally, the reason your gloss/roughness maps should always be in linear space, is because almost all of the PBR shaders out there are computed in linear space, roughness inputs are taken from a 0-1 range in all cases. (note: this is a simplification, i want to avoid people getting overly confused on the issue).

    This is a specific pipeline thing though, there's no reason you can't do a gamma-to-linear conversion in your shader after sampling the roughness texture. Authoring linear-space textures means you need all your artists to really be on the ball with their colorspace management, which imo can be a big ask.

    I can't think of any reasons why you wouldn't do *all* calculations inside the shader in linear-space anyway. Convert all your inputs/samples to linear at the start, run your entire shader, convert back to sRGB output where needed at the end. Doing color math in gammaspace is kinda weird :p
  • stevston89
    Offline / Send Message
    stevston89 polycounter lvl 5
    @ d1ver - The reason you don't want AO in your specular ( at least in Marmoset) is that the way the AO works is it only occludes light from the sky lighting, but not dynamic lights. This is very practical because if you directly shined a light on something there wouldn't be any AO. By putting that AO in your specular you are brute forcing it in there and it will no longer be correct in certain situations. I don't know how AO works in UE4, but I assume it would work very similar. I think the overall problem with putting AO in your maps is you can't guarantee it will look good under any lighting situation. Now if you were talking about cavity yes there is no difference, but you have less control by baking it in. With cavity separate you can control the intensity without having to make tweaks in photoshop.
  • EarthQuake
    Large scale AO really should not be baked into specular (or the metallic materials of a albedo map when using the metalness workflow), or diffuse, this just does not make much sense physically. As mentioned above, when you do that, your AO is occluding direct light sources, which is very much the incorrect thing to do. Just think about it for a second, if you have the inside of a helmet, naturally your baked ao map would get a lot darker there right? Now, put a light source directly inside that helmet, what happens in real life?

    If that content is baked into your textures, you can never light that area correctly in a game.

    The AO slot in UE4 should really be thought of as a cavity slot, and generally you should only throw micro-occlusion in that input, not traditional baked ao, as it multiplies on the ambient and direct diffuse and specular contributions, which means if you've got large scale black areas in that texture, its impossible to light those areas, even if a direct light source is shining on it. This is pretty easy to test yourself, but I believe it was also mentioned by one of the epic guys a while back (Jordan? Maury?, can't remember who).

    This depends a bit on exactly how your shaders are set up, and this is why we have two inputs in TB2. AO in TB2 multiples only on the diffuse ambient contribution, while the cavity input multiplies on ambient and direct diffuse and specular. How it works in UE4 is how our cavity input works, except you can't control the diffuse and specular strength independently in UE4.

    Local reflections and self reflection should be handled by locally baked probes, and screen space reflection respectively.

    SSAO again should (and does in TB) only occlude the ambient diffuse contribution, because again, if you multiply SSAO on everything, what you're really doing is creating unlightable surfaces (or well, sections of surfaces). SSAO is not reflection occlusion and it doesn't make sense to think of it as such.

    Lee is being a little over zealous here with some of his comments though, he can't help it, he's british and very excitable, just tell him UWOTM8 if he gets out of line. Gloss generally should be linear space, it just makes more sense that way, as you can easily match parametric values to image based values which makes it quick to set up simple materials with basic values and then transfer those to your texture maps. But even though UE4 and TB2 are linear space renderers, both of them can handle sRGB gloss/roughness maps, its just not commonly something you would use as there is little benefit in doing so.
  • EarthQuake
    Xoliul wrote: »
    -For really tricky materials like this, the metallic model, in most implementations, might prove limiting (as i believe is the case here). I suggested to Marmoset to perhaps add a separate 'F0-control' map to work around these limitations, no idea where they are with that.

    We considered this but we feel it would only add further confusion, and would make it really easy to input values that are totally unrealistic, essentially, we feel its counter to the basic concept of the metalness workflow, which is to provide a simplified method to represent most materials. You can do some pro-moves stuff with partial metallic values for the rare case when you need a reflectivity value that is significantly different than 0.04.

    If you need full and precise control, we offer the specular workflow in TB2 as well.
    -The Marmoset/Quixel material values for specular values are old, I have been told by Teddy himself. He specifically called some of it 'bogus data from a prototype scanner'. The F0.18 for mud being a good example of that.

    Yes, this is true to an extent, this is something I would like to update at some point but the Quixel guys have been very busy with the Suite launch etc so I don't want to hassle them too much.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @Xoliul - Thanks for sharing :) I fixed some confusion. I guess I was reading it so much and since I wrote it, I understood what which part was referring to. As for the specular values from Marmoset, I'm shocked that they are considered old! Thought it was pretty up-to-date. Starting to wonder if I should put off adding their specular information to the doc...but I will reference for now as a baseline/starting point for people. As for an example with flats, do you have a recommendation of a better, more easily understandable example? I'd ideally like to have 2 prime examples for the 2 different workflows.


    @all - If anyone has any information sited from a reliable source they'd like to see added to the doc, please post it here :) As well any information on albedo/spec/roughness values, etc would be a great addition.


    As well I'd like to thank everyone again who has been looking at the doc and replying to this thread :)
  • EarthQuake
    Links to stuff:
    http://www.marmoset.co/toolbag/learn/pbr-theory
    http://www.marmoset.co/toolbag/learn/pbr-practice
    There are additional links in the last section of each of those articles as well
    http://www.polycount.com/forum/showthread.php?t=135776 - we did a podcast recently
  • stevston89
    Offline / Send Message
    stevston89 polycounter lvl 5
    I just released the files for the stylized dagger I made using PBR specular/reflectance workflow. Feel free to use it if you would like. Also I am no expert on this stuff so if any of you guys notice any major issues please let me know.

    Here is a link to my thread where you can download everything.
    http://www.polycount.com/forum/showthread.php?t=135431
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @EQ - Thanks dude! I haven't fully finished those first 2 links yet but they are opened since I started the doc haha. Will get to it very very soon. Next on the list :) And the podcast is sweet! I shall listen to that and add notes :) Thank you again. You've been a great help thus far! The community of 3D artists and devs thank you greatly and surely appreciate the work you've contributed.

    @Stevston89 - That's a sweet looking dagger! Leather is off the hook. But before I put it up, I'd like to get a few different opinions on its material accuracy if you don't mind. :)

    Thanks again everyone!!
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    stevston89 wrote: »
    I just released the files for the stylized dagger I made using PBR specular/reflectance workflow. Feel free to use it if you would like. Also I am no expert on this stuff so if any of you guys notice any major issues please let me know.

    Here is a link to my thread where you can download everything.
    http://www.polycount.com/forum/showthread.php?t=135431

    Nice job man. This is one asset I can say looks 100% correctly done. This should be used as a real example by people!
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    Xoliul wrote: »
    Nice job man. This is one asset I can say looks 100% correctly done. This should be used as a real example by people!

    Thanks for reassuring us :) Could you please elaborate on WHY you consider this 100% accurate, material wise? Aside from the values in spec.
  • almighty_gir
    Offline / Send Message
    almighty_gir greentooth
    Xoliul wrote: »
    Nice job man. This is one asset I can say looks 100% correctly done. This should be used as a real example by people!
    5130029+_253454a9c868d2ceb1131e4201330824.jpg
  • stevston89
    Offline / Send Message
    stevston89 polycounter lvl 5
    3py0n wrote: »
    @Stevston89 - That's a sweet looking dagger! Leather is off the hook. But before I put it up, I'd like to get a few different opinions on its material accuracy if you don't mind. :)

    Definitely. If this resource is going to be good accuracy is absolutely key.

    @ Xoliul and Gir - Thanks guys!
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @Stevston89 - For the sake of myself, as well as others who are new to PBR/PBT, could you elaborate on or perhaps even make a small quick/brief tutorial on how you determined the values for albedo/spec, etc.

    Because from my understanding, it's very different from traditional/old-school texturing wherein the values had a wider acceptance value.

    Thanks again!
  • stevston89
    Offline / Send Message
    stevston89 polycounter lvl 5
    Sure. I will try to put something together this weekend.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    Thanks! That'd greatly help :)

    I'll include the entire thing in a tutorial section :D
  • equil
    Metal actually neither refracts nor absorbs ANY light, metals are so dense that light can't actually enter the surface, which is why all of the light is reflected.

    Wait what? That doesn't even begin to make sense. If metals reflect all light, what happens to the blue photons that hit a copper plate? How is density even a part of this?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    well what he does right:

    • Correct specular values, no fudging. His metals are clearly in the bright spec range, his non-metals in the low range.
    • Good normalmap helps the shading a lot.
    • He's not attempting to use the specular map as an old-school spec map, but keeps that for the roughness map.
    • No baked lighting anywhere.
    • Correct correlation between specular and albedo; his metals are black, his dielectrics blend to the right color.
    There's been very few PBR pieces on this forum that got all of that right so far.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    equil wrote: »
    Wait what? That doesn't even begin to make sense. If metals reflect all light, what happens to the blue photons that hit a copper plate? How is density even a part of this?

    Different light wavelengths reflect differently.

    compare the graph of silver:
    http://refractiveindex.info/?shelf=main&book=Ag&page=Rakic
    to copper:
    http://refractiveindex.info/?shelf=main&book=Cu&page=Rakic

    Red light = 0.650, blue light = 0.475
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @Xoliul - Thanks for clarifying :) I assume by dielectrics, you mean his non-metals? And I guess the biggest hurdle for people shifting from the older way to the newer in terms of texturing is forgetting what they previously had known was true for the maps (minus normal).

    Hopefully I'll have picked up enough information/learnt enough after my readings/research to have some guidelines for what each map does and how it behaves now :)
  • d1ver
    Offline / Send Message
    d1ver polycounter lvl 9
    Xoliul, EarthQuake, stevston89, thanks for chiming in guys.

    I just wanted to clarify that I never once was calling on to "Baking Large Scale AO into Specular". Both the PBR shading for artists video to the video the went along with Cerberus call on having no lighting information in your textures as an ideal scenario.

    There might be slight argument on the extent of how small scale the AO should be but that has too much to do with tech.
    We started with UE4 a long way before it has gone public and SSAO might've been screwed back then, but using just cavity didn't really give very good results. Highly reflective(metallic) objects benefited more from having AO instead of cavity, because all the slightly bigger recesses and corners ended up blown out otherwise.
    An once again I'm not talking about the helmet being black where the head goes. I'm talking about subtle AO applied to inner corners, recesses and connections between highly reflective surfaces to ground them together. Screenspace reflections in UE4 were introduced way after Cerberus came out, so there was no self reflection.
    We have a whole different setup on uncharted 4 now so I don't when I will have the time to look into UE4 again, but this just proves to say that all tools are different unfortunately.

    stevston89, thanks for the clarification. You're totally right. That's how UE4 was supposed to work when I was working on cerberus, but once again it was a while back and we had issues with it.

    Xoliul, the quxiel example was just to show that there are non-metals with higher then 4% F0. There are enough other examples. It's unfortunate however to find out that those measurements are not as accurate. I'm looking forward to an update then.

    When it comes to luster, one thing I never ever advise is to do anything "without a doubt". The examples of the minerals with metallic luster I provided exhibit higher then the 4% F0 and predominant "camera dependent"/reflective behavior, which with a metallic setup can be achieved only by making it a "metal".

    And in general, when it comes to complicated materials like this, it's no longer about metals, but rather about these factors:
    1)Does the object have a colored reflecion?
    2)Does the object have higher facing angle reflectivity then 0.04?
    If it does then some form of trickery with metallic is in order. The extent of it might vary strongly however.
    And while at this point the "physically correct part" becomes slightly loose so far I didn't have a big problem communicating the types of surfaces I needed. So I personally wouldn't say the metallic system falls short here, I like it as an optimization, but it does get somewhat "hacky" sometimes. Which is still better then the alternative of having a separate spec in my opinion.

    Oh and also I updated the AO on cerberus a bit. The hammers in the back might've had it a tad to broad so I appreciate the feedback. Cheers.

    3py0n, yep, dielectrics are non-metals.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @d1ver - yea I agree. After looking at the different engines/shaders it seems that results vary and depending on the person it could look more or less accurate. So as I've reworded and mentions in my doc, just incase anyone was curious, the doc is just a set of guidelines and common usages with information. Not hardline rules, though there are some rules but those are typically more obvious, etc.

    As well I've read about F0 from various sources. But I may have missed what it stood for exactly/what it means.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    d1ver wrote: »

    Xoliul, the quxiel example was just to show that there are non-metals with higher then 4% F0. There are enough other examples. It's unfortunate however to find out that those measurements are not as accurate. I'm looking forward to an update then.

    When it comes to luster, one thing I never ever advise is to do anything "without a doubt". The examples of the minerals with metallic luster I provided exhibit higher then the 4% F0 and predominant "camera dependent"/reflective behavior, which with a metallic setup can be achieved only by making it a "metal".

    And in general, when it comes to complicated materials like this, it's no longer about metals, but rather about these factors:
    1)Does the object have a colored reflecion?
    2)Does the object have higher facing angle reflectivity then 0.04?
    If it does then some form of trickery with metallic is in order. The extent of it might vary strongly however.
    And while at this point the "physically correct part" becomes slightly loose so far I didn't have a big problem communicating the types of surfaces I needed. So I personally wouldn't say the metallic system falls short here, I like it as an optimization, but it does get somewhat "hacky" sometimes. Which is still better then the alternative of having a separate spec in my opinion.


    Se we agree here; it's approximating. The part where I think you're off, is by assuming such an "approximated/hacky" material is mostly full, pure metal. A full white metallic should only be used for the pure metals. If something looks pretty close to it, use a halfway value. Using a full metallic value and then putting some pretty dark colors in your albedo is not the way the system is intended to be used. I talked about it with Seb L. and other PBR experts at work and they all agreed; I'm really not talking out of my ass here.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 8
    3py0n wrote: »
    @d1ver - yea I agree. After looking at the different engines/shaders it seems that results vary and depending on the person it could look more or less accurate. So as I've reworded and mentions in my doc, just incase anyone was curious, the doc is just a set of guidelines and common usages with information. Not hardline rules, though there are some rules but those are typically more obvious, etc.

    As well I've read about F0 from various sources. But I may have missed what it stood for exactly/what it means.

    I'll bring it up again;
    https://www.youtube.com/watch?v=LP7HgIMv4Qo
    The parts about PBR principles are all really well explained, this is one of the best videos out there.
  • EarthQuake
    F0 = base reflectance. It simply refers to how much light a surface reflects when looking directly at it, while Fresnel is how much is reflected at a grazing angle.

    Its a term used by programmers/tech artists more so than a term most artists are familiar with.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    EarthQuake wrote: »
    F0 = base reflectance. It simply refers to how much light a surface reflects when looking directly at it, while Fresnel is how much is reflected at a grazing angle.

    Its a term used by programmers/tech artists more so than a term most artists are familiar with.

    ahhh icic.

    Thanks :) Makes more sense now haha.
  • almighty_gir
    Offline / Send Message
    almighty_gir greentooth
    to clarify it a little in written terms (although Xoliul's link is great too):

    F = fresnel, an effect which occurs at glancing angles.
    F0 = fresnel zero, or when fresnel has zero effect.

    the effect of fresnel is to exponentially desaturate toward a pure white highlight at glancing angles. so when you see the term "F0" they're saying "what colour is it when fresnel has no effect".
  • Shrike
    Offline / Send Message
    Shrike polycounter lvl 5
    @Bible hashtag offtopic

    I dont understand why everyone is talking about learning PBR but nobody is talking about learning materials even tho its the far greater effort.

    What is fundamentally missing and what was never fully required before is real world material knowledge. At the end it comes down to this. Knowing how PBR works dosnt help if you have no clue which values a material uses.

    There are so many different treatments for metal alone.

    What we now really need is a well documented, artist friendly resource for the
    most common 50-100 real world materials, a cheat sheet that could be done as a group effort maybe. The alternative would be something like an online training program, essentially learning physics and chemistry, but I guess we do not want another hurdle for the artists of our industry and the guys doing that would not make it for free thats for sure.

    Either we create a resource or someones gonna monetize it, because theres certainly a niche to fill. If you want to learn the most common things, you have to search through dozens of pages and wikipedia sites only to get 95% redundant information you do not need and are way too in-depth
    for artist usage.


    Here is something i quickly shopped together ( pic and values from toolbag page )

    Its a + - weak proposal for the most important things, I imagined this in a list based format

    MaterialTable.png
    MaterialTable2.png
    etc
    (maybe even more info, a 2-3 line tooltip would be potentially great)

    I know we do not have all the info and many things need to be measured
    but people could add things working for them and it could evolve


    The downside could be that some people just blindly copy without knowing anything I guess, but having a super incomplete list on the other hand is not satisfying either

    Also it would be a great opportunity to gather scattered information at a single place, like IOR values,
    plus adding convenient copy-paste able hex code or RGB links and reference images / wiki to understand what it really is.


    Does not matter if our system is now accurate, and people understand
    that system fully, but they have no knowledge and info over the things they want to replicate.
  • 3py0n
    Offline / Send Message
    3py0n polycounter lvl 4
    @almighty_gir - hey man, thanks for that! Definitely makes things clearer.

    @Shrike - That's true with the world material knowledge. And to do that WITHOUT some definitive value is guess work after some guidelines. It's pretty unforgiving. PBR texturing but what I hope to achieve with the help of the community as a library or sorts or encylopedia where one can find all if not almost all their answers in 1 place. But the thing that people will probably most want to see is a material values table including albedo, spec/reflection, gloss/roughness.

    Thanks for that. I suppose Microsurface is your roughness/gloss? Seeing as it's linear?

    Also I just thought of something from what Shrike posted. if someone has the expertise, we can, instead of making a doc, make a list-based webform wherein people can contribute their findings into the database and one can search via materials or even search the name of the material on their own. That would be sweet. And examples would pop up from both a real time render and also a real world example.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 4
    I'd definitely want to see a good database of PBR material values. Right now it's all over the place and very confusing for a simple artist. This stuff needs to be streamlined and I'll gladly pay for a subscription to a service that could provide all this information I need to make materials I want.
  • stevston89
    Offline / Send Message
    stevston89 polycounter lvl 5
    It's really not all over the place guys. Metals are pretty well documented in terms of reflectance values and non metals fall into a very small range. On top of that most PBR charts tell you what doesn't fit into that range. The chart posted in the document on this thread is very good. There is no way we can accurately give those all of those values either ( unless some of you have all of the scanning equipment and know the processes/math to extract accurate data from that). The only thing I know of that will be close to what you want is quixel megascans, but it's really not hard to get something physically accurate. You don't need to have every reflectance value lined up for you. All you have to do is find something close and interpret from there.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 6
    I feel i got the workflow for pbr down pretty good, but still curious about the microSurface map and using linear space color?

    When authoring this map should i turn off the sRGB color profile in photoshop? Or do i need to apply levels?

    Like if i see a value for microsurface like #2d2d2d will that value be differnt in the map with srgb on or off? Or does the color profile only effect what i see on my screen while authoring?
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 4
    passerby wrote: »

    When authoring this map should i turn off the sRGB color profile in photoshop? Or do i need to apply levels?

    from this thread's encyclopedia:
    Gloss/Roughness maps should generally be linear space (sRGB off), but its not a big deal if you use sRGB/Gamma space.*
  • s6
    Offline / Send Message
    s6 polycounter lvl 5
    Shrike wrote: »
    ...
    What is fundamentally missing and what was never fully required before is real world material knowledge. At the end it comes down to this. Knowing how PBR works doesn't help if you have no clue which values a material uses.

    There are so many different treatments for metal alone...


    This. Not so much that there wasn't a need for understanding real world materials in previous generations, buts it's certainly more crucial now I think.

    I understand the idea of unifying materials and archiving their values for consistent results and for sake of ease establishing a base, but can we really expect to remove all creative/artistic decision from the material creation process?

    Depending on age, abuse, erosion, etc two materials of the same type can vary drastically. How can you realistically account for different types of oxidation on different types of metals, in varying amounts? Polen build up, brake dust/soot, soapy film, etc. So many things can happen to a material that cause it to deviate from the established PBR charts over every texture map, not just microsurface.

    I think its a great idea to get started, and point people in the right direction, but it's like teaching a man how to fish VS giving him one. I think you would be setting people up for failure by saying it's frowned upon to deviate from established PBR values. As Shrike said I think people should study materials themselves, understand how different things react to light in different ways and learn how to recreate ANY material in an appealing way using established values as a guide, not as law. It would be much more valuable to an artist to build observations skills and be able to analyze why a material is the way it is based on reference of what they are trying to create.

    Maybe I'm missing the point or misunderstanding the goal of a "bible" but I know one thing: I'm not going to blindly create my art based on pre established archetypes that may more may not apply to what i'm attempting to recreate.
134
Sign In or Register to comment.