Hello guys,
I registered to this forum to get your insight on PBR workflows and texturing for those. My question on albedo maps:
AlbedoIf I understood the idea behind it an albedo map should contain no lighting information except the pure reflected diffuse.So should there be any gradients in an albedo color map at all? Like in this example:
http://shadermap.com/docs/mm_albedo_map_from_diffuse.htmlBecause the darker colors are just brightened shadows in this example, aren't they?
When I think of an albedo map I see only solid colored areas. Because every surface irregularity, should come from roughness, normal etc. right? (e.g. fresh paint on a surface is just one color, out of the bucket)
Or do I have to take into account if a part is modeled or flat in my 3d model, when creating my albedo?
For example, if I have a plane geometry where the light source in my scene could not create any shadow gradients my albedo should contain a color gradient? And if the part was modeled convex or concave it could just be a solid color in the albedo?
I haven't found any good explanation of the albedo workflow when creating my own painted maps and what colors can be used.
Thanks for the help in advance.
Greetings
monitorhero
Replies
This is my understanding anyway. I'm sure @earthquake on the forums here will give you a better (correct) answer.
"For example, if I have a plane geometry where the light source in my scene could not create any shadow gradients my albedo should contain a color gradient? And if the part was modeled convex or concave it could just be a solid color in the albedo?"
You kind of answered the question here. Unless you WANT to fake light information, don't fake light information. At the end of the day it is up to you if you want to do it the old school way and fake the light or embrace the tech and let it work it's magic.
As for the flowers, and many organics for that matter, there is generally a TON of color variation and gradation. Often this is subtle but still exists. So those gradients may be part of the cellular makeup of the petal and would be in the base color.
If you put no lighting into your base color then you want to make sure you are using an Ambient Occlusion map in real time, which will give you proper reflection dampening in shadowed areas. Don't worry about what individual maps look like in a modern PBR environment, what matters is how they all come together in a scene.
This is where the glossiness/normal/ao map all work in harmony in the PBR workflow, to create the microsurface detailing shading quality under lighting. The AO, as @quack says, should always be plugged into the shader rather than baked in the diffuse. It is there to ensure that an object looks 'grounded' under direct light and is controlled dynamically by the engine under direct/indirect lighting.
In this chart http://blogs.unity3d.com/wp-content/uploads/2014/11/UnityMetallicChart.png it says under Metallic R "this value will always be greyscale" but contrary to this statement the guys from Allegorithmic say that the metallic map should be only black and white most of the time as @somedoggy also mentions in this thread
http://polycount.com/discussion/117309/faq-how-u-make-dem-mats-hands-on-mini-tuts-for-making-materials-and-texturing/p5
"For the Metallic style PBR, they lock nonmetals at 4% reflection which is a refractive index of 1.5 for the material. This is good enough for most everything. The metalness map replaces this 4% with whatever is in the albedo texture. This is why people advise against painting grey values in metalness maps. For example a 50% grey would be 50-50 blending between that 4% reflection and the albedo textures color, and then removing 50% of the albedo. Note that a transition between rusted and non-rusted metal would have grey values in its metalness map in order to look decent, but this can be rationalized as thinking that at a sub-pixel level it's defining the percentage of metal versus nonmetal."
Also for almost every environment tileable texture which usually have pretty big texel you should keep in mind that normal map in many cases would have not enough resolution to reflect light in proper direction for all those small surface grains and chips so you would have to fake a lot , same as before PBR. And in fact have to non stop fight with inflexible locked nature of pure metalness variant of shader . I personally almost broke my mind before finally realised that I do have to use grayscale values in metalness channel.
If you want to account for shadows in ambient light (or shadows within shadows) you should use an AO map, which is typically loaded as a separate input so it only applies to the diffuse ambient contribution. Otherwise you get this problem where dark areas in diffuse from AO are always dark, even when lit with dynamic light sources.
Exceptions to this would generally be better represented with some special purpose shader. As Per says, if you have an object that scatters light, you may want to create the content a bit differently, but ideally here you would use a shader that approximates SSS, because light scattering and AO or baked in shadows are two very different things.
Now the whole specular vs metalness workflow thing, I don't see the point of arguing about it like it's your favorite sports team. Both work slightly differently, both have pros/cons, both have a set of rules and when it comes to most things art, you should understand the rules before you break them. That's what most documentation, charts, and basic explanations you'll find on the subject are, a set of logical rules to get you started but not some religious text you need to stick to for fear of being cast from Polycount as a heretic.
In most case, it won't be up to the individual artist to choose which to use (for instance, advising someone who is working on a UE4 project to use the specular workflow would be pointless) so you should learn how to use both. Personally, I find working with the specular workflow more comfortable, but that's simply due to muscle memory, I've been using it for a very long time. I can get essentially the same results with the metalness workflow, again unless it's some strange outlier material like SSS, gems, etc that would be better represented with a purpose built shader in either workflow.
Thank you for your answer. I know about the pros and cons but I prefer a method with more control (even if it might result in more mistakes if you don't understand to use it properly) plus I saw the substance painter video where we see both examples and the metalness workflow has a lot more edge artifacts which I personally don't like. It's not really a religious thing Coming from Vray rendering with a lot more control I prefer the specular workflow cause it has some similarities.
Another question:
So is there any reliable resource at all to work with when using the specular workflow?
Take note of the next accompanying that chart from the tutorial it came from: http://www.marmoset.co/toolbag/learn/pbr-practice
"Material values from most libraries tend to be measured from raw materials in laboratory conditions, of which you rarely see in real life. Factors like pureness of material, age, oxidization, and wear may cause variation in the real world reflectance value for a given object.
While Quixel’s scans are measured from real world materials, there is often variation even within the same material type depending on the various conditions described above, especially when it comes to gloss/roughness. The values in the chart above should be thought of as more of a beginning point, not a rigid/absolute reference."
tl;dr: Reflectance values or whatever reflectivity workflow you're using isn't a replacement for taste, experience, material research, etc.
Anyway, even if I updated the chart with more accurate data (which I will be happy to do if someone from Quixel wants to coordinate on), what we're likely to see is the reflectivity range of insulators (non metals) being clustered even closer to 4% than is shown in that chart, and metals typically in the 70%+ reflectivity range. What I would love to spend some time researching is metals in various states of oxidization, to see exactly where the reflectivity values fall, as well as various coated metals like blued steel and things of that nature, but I don't really have accurate reference for that.
As said though, "PBR" in its current conception isn't quite there yet. Having a good understanding of the system is what really gives you a leg up, because you know how to bend it to produce for visuals first. PBR is half a conceptual framework, half real physical rules or approximations to them. We're also going to see it really improve in the next few years, which I go off on in a bit.
I also strongly agree with the idea of diffuse/albedo having no lighting info. Using an AO map works far, far better since the first lighting pass is direct light. Only indirect light receives AO. Another good technique is for noisy surfaces, you can precompute the normal map mipmaps to increase roughness based on distance. UE4 supports this and it's great.
Now going off on a tangent here just out of personal interest. One big improvement I've been wanting to work on is precomputing an sggx table or making an approximated function, to get multiple scattering (currently the biggest downfall of our attainable realtime visuals IMO). It looks gorgeous but I haven't seen anyone start attempting it yet. Another big thing is having multiple samples per pixel in a single shader pass, which would produce seamless blending between diffuse and specular as well as solving specular aliasing which is a big problem in PBR. NVIDIA actually showed that tech off this year.
@somedoggy
Those developments sound interesting. When you are talking about sggx you don't mean an approximation like in this paper:
http://blog.selfshadow.com/publications/s2015-shading-course/activision/s2015_pbs_approx_models_slides.pdf
I guess this is something different? And is there a link to this presentation from nvidia?
So thank you everyone so far for the shared knowledge. I might come back to this thread since I am working on a project where I try to use pbr
SGGX is an adaptation of GGX to a microflake distribution, they use intuitions gained from that reasearch to produce a BRDF with arbitrary multiple scattering events:
The Distribution -> https://drive.google.com/file/d/0BzvWIdpUpRx_dXJIMk9rdEdrd00/view
Multiple Scattering BRDF variant -> https://eheitzresearch.wordpress.com/240-2/
@gnoop, the normal convolution info is here: http://media.steampowered.com/apps/valve/2015/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf
As for small objects in textures that should cast shadows, I'd advocate a push for tessellation or another approach that could capture that information correctly (Oldie but a goodie, a variant like this could work wonders: http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_EfficientSelfShadowedRadiosityNormalMapping.pdf). AO in lit areas looks like such an ugly visual artifact 99% of the time that I think that if you can't do it right, you should do it the most correct way you can. And that means limiting it to indirect light, even if that means sacrificing the fact that small objects would truly lie in shadow can't be properly represented. It looks good enough, IMO.
The original code is in the paper, so if you wanted to you could hypothetically drop it as-is into a custom shader. For quick results just make a variant off their built-in PBR setup. It'd be very easy to do that by dropping multicompile functions into the relevant bits of code.
Still, I would love to see some actual real world data on this. Where is a material scientist when you need one?
I thought about an interesting experiment, taking pennies of various age and sorting them by level of oxidization, taking photos of them all with the same position/lighting, and measuring the highlight value in various spots. But I just brought all the change from my piggy back to the bank. =( Even then, without a proper scanner it's difficult to separate reflectivity from roughness.
Something to illustrate my problem. Allegorithmic is talking about base color/albedo in all their videos, but in their substance player they use the terms diffuse and specular. But in this example it must be specular workflow right? Also there is a bump and height map which are basically the same (one is 8bit, the other 16bit). Why does this substance need both?
Another example. Why is the spec map so colorful. Should it be metal? If so why is there no black in the diffuse like it should be in a specular workflow? Can someone explain this to me?
I don't care about photorealism but more about the workflow which is obviously different here. It's like a mix of specular and the old non-pbr workflow. Maybe it was created before they made their transition to PBR.
And could you tell me why there is bump and height? Or does one of both cancel out the other one? Because they don't seem to multiply the effect on the texture.
float Metalness = MetalnessMap.g;
float3 defaultSpecular = (0.04, 0.04, 0.04);
float3 Specular = (defaultSpecular - defaultSpecular * Metalness) + AlbedoColor * Metalness; // 2 mad
float3 Albedo = AlbedoColor - AlbedoColor * Metalness; // 1 mad
Roughness and gloss or smoothness (thats a very dumb sounding name to me tho), are identical. There is no difference in what they represent other than that the values are inverted between roughness and gloss. Wanna make a gloss map out of a roughness? y = 1 - x. Wanna get your old roughness map back? y = 1 - x. Easy peasy. Hell, you could have any mixture of roughness or gloss maps in a game and let the conversion be handled through a tickbox. It's trivial.
There doesn't need to be any standardization of names here because they're all synonyms. Albedo = Diffuse = Base Color = whatever. No amount of trying to pick one name will ever make anyones art better, so who cares tbh. On another note Monitor, you seem really dug into however they did those Substances and all I can tell is: nobody will likely have an answer unless the creator shows up. It doesn't matter how it was made or with what system. What matters is what are you rendering with and how your result looks in it. Author for that, understand that. Looking at somebody else's art that's used with some specific shader in a previewing app isn't going to help you get better at all if you're not using the exact same setup.
Yes part of the reason people suggest using certain terms is to highlight the differences for game production. However if you looked at a diffuse only view from any film scene even 20 years ago, it'll look just like a diffuse only view in any PBR game level today. Super flat, no lighting baked in.
So, besides the problem with this statement in itself (Per already covered that part), I think this illustrates a problem I have seen time and time again here on the forums: artists coming across modern realtime shading ("PBR" in any shape or form, depending on the implementation) seem to worry waaaaaay too much about it beforehand, as if it was some alien thing, and end up searching for tutorials left and right as opposed to simply looking at the documentation of specific tools and engines.
The Marmoset team put together an extremely useful set of guides on their website clearing up the difference between their specular and metalness implementation ; there are example assets freely available for Toolbag, the Quixel Suite and Substance Painter ; and the UE4 documentation regarding inputs for their default material can be summed up as "well, our engine works pretty well with on/off (black or white) metalness, and leaving the spec map input empty, so do that". This kind of stuff is basically all there is to know to get started, and everything is actually very simple in practice.
Something else that struck me is seing artists researching how to do Albedo maps (= avoiding using too much fake lighting) ... but then forgetting that sun actually bleaches the top of objects, and that cracks tend to collect dust and dirt. Meaning that they end up with textures that are waaaay too poor as far as surface color and value variation are concerned.
This thread owns btw.
I think I kind of fall in the area of sticking to the more standard PBR guidelines, only because I feel like you should know the rules before you break them. Starting a material off following said rules, then applying the artistic liberties to really fine tune the material.
But the whole colored specular with plastic thing. I didn't know that. Are there any other materials that potentially break the whole "grayscale spec values for non-metals" mindset? Is the colored specular just a more desaturated color of the Albedo in that case?
https://jo.dreggn.org/home/2015_spectrum.pdf
Just compare how drastically different the images appear in that doc for RGB vs spectral rendered.
Fabrics are another example because their microstructure scatters light in ways that they can easily reflect a colored specular, like silk.
I'm honestly not sure where the pure plastic + colored specular he mentioned comes in, though I wouldn't be surprised at all to see much of that being due to multiple scattering events. There is this piece of research I just came across though:
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.9.5561&rep=rep1&type=pdf
If you look down towards the bottom they have plots showing specular differences, amounting to 3.5-5% variations in specular from the incident light color (incoming light). This is from '04 and they mention that it was preliminary. I'll definitely keep looking further!
That said, the effects seen in the above paper are the least of our 2 big caveats in current realtime rendering: No multiple scattering, no spectral based rendering. And of course, I'm not advocating that anyone tries to be a purist and ignore the artist's eye over 100% measurement based. Just sharing the rendering background and theory behind this all.
Edit:
https://books.google.com/books?id=ZRMEPqCRnlUC&pg=PA305&lpg=PA305&dq="The+Color+of+Specular+Highlights"&source=bl&ots=EAh-jG8QDP&sig=EqPxrOY0lM9ivBb5hGWZEmQnV_s&hl=en&sa=X&ved=0ahUKEwjD95iM5fXMAhWJaD4KHT72DiwQ6AEITzAH#v=onepage&q="The Color of Specular Highlights"&f=false
This found "at least as large as 15%"
One thing that I think is close to solving specular edge problems like you mention is having a geometric + normal map -> effective roughness conversion like Valve's Advanced VR presentation (I linked that earler up the page) and UE4's "Composite Texture" for that matter. There is no equation that solves this problem perfectly right now, but there likely will be soon. If a correct framework for that can be found and done efficiently enough in realtime then roughness will naturally increase the smaller the onscreen pixel footprint becomes, like seeing a chiseled brick building from a distance. The detail converges to look rough:
I wish I had more time to work on these kinds of problems because I've got scattered pages of content on my own thoughts for how to approach such stuff, but one can only dream!
On a totally different note, all of the tips you've mentioned would be fantastic applied to highly stylized PBR based art. That's what I really wanna see more of. Breaking the rules and our intuitions in a cohesive way to produce completely non-realistic works, instead using PBR as a template to form their own internal logic.
Edit:
Something I actually do to help roughness along, and I apologize in advance for the poor example, is go ahead and do a normal to roughness conversion with a simple Substance node I created. This is extremely similar to what Valve and UE4 do, but it's an effect that I effectively "bake in" to my materials and it works wonders. It has strength controls as well as control for large and small forms, so with a minute of tweaking it makes any material pop and lose any ugly specular edges.
What in particular are you looking for? If it's the above, I'll be putting the Substance node up this week once I do some cleanup (but it's not tied to any physical scale so it still requires good art direction).
As far as rendering papers for dummies... well, that's a little tougher, and something I actually started working on a while back.
For fabrics, car paint, etc. I always expect a special shader with the appropriate effects(with their own rules for the textures), but didn't consider SSS for some plastics.
SOMEDOGGY, that Substance node is going to be a lifesaver. I look forward to seeing how you set it up.
https://www.youtube.com/watch?v=kUCDIAupRmQ
You can grab the link from the video description or from my own thread. Thanks all!