Ive started a google doc with specular range RGB values for various material types. The ranges here are gather from various resources that are available publically and a few that I have gathered using cross polarization photography. Im currently building a scanning rig to expand the library.
The values there right now are in no way 100% accurate but they are good approximations, may take some tweaking to look perfect.
I thought it would be good to make it public so if people wanted to add their own values they could. Just leave a comment and I can go ahead and add to the list. And of course if you have different values I would be interested in hearing them!
Here is the
link
Replies
Any idea why?
Its the same guy from the "Remember Me" studio (Dontnod) who released the last chart that was pretty popular, but now with updated UE4 values.
https://docs.google.com/spreadsheet/ccc?key=0AlSRuM7BFhPVdGV4OXRETlYwYVVqbkp6aDNwYm1XaHc&usp=sharing#gid=0
Data is pulled from Quixel Megascans content
Reflectivity in SRGB and linear space, roughness/gloss in SRGB and linear space, as well as albedo in HEX SRGB, SRGB, and linear space. This sheet was helpful when whipping up the following chart:
I would recommend putting all your data into a sheet so it can easily be sorted. Feel free to add my data to your list.
Also some math (courtesy Jeff Russell):
sRGB to linear: http://www.wolframalpha.com/input/?i=Piecewise%5B+%7B%7BS%2F19.92%2CS+%3C%3D+.04045%7D%2C+%7B%28%28S%2B0.055%29%2F1.055%29%5E2.4%2CS%3E.04045%7D%7D+%5D+where+S+%3D+0.5
linear to sRGB: http://www.wolframalpha.com/input/?i=Piecewise%5B%7B+%7B12.92*L%2CL%3C%3D.0031308%7D%2C+%7B1.055*%28L%5E%281%2F2.4%29%29+-+0.055%2CL%3E.0031308%7D+%7D%5D+where+L+%3D+0.5
(now taken down - sorry)
Btw, how do you convert linear color to srgb? How to use values from SL_GetSpecularColor.exe in photoshop?
rgb,srgb etc. what values to use in photoshop and how?
Just when I thought I know what's going on, it confuses me even more
This program isnt really for using in photoshop it gives you a linear space RGB value for your spec map.
1. Download the recompiled version for Win7 here
2. Using the database here download the txt file for the material you want
3. Run the exe in command line like this SL_GetSpecularColor.exe ###.txt where ### is the filename of the downloaded material text file
4. Profit from returned RGB value
Obviously I dont take credit for this its lagarde's program and workflow. I just recompiled the program from the source
Awesome. But when I want to use this database http://carlosmontero.com/pbr_database/ for example, which value do I use and convert to rgb? Spec(SRGB) or Spec(Linear) ? What's the difference?
This depends on if you want a SRGB(gamma) or Linear space value, which will depend on what your engine/shader expects as an input. If you're unsure, ask your programmers/tech artists.
+1
Have to say I kind of agree, the supplied content in the database is pretty all over the place.
I guess I was hoping, as radiancef0rge seemed to be, that we could build something more definitive together. the doc has data from Lagarde, Quixel, people around here, etc. And it's openly editable.
If the math is wrong, or data there doesn't make sense...let's fix it.
Mind elaborating on this Mark? Agree with Carlos. This is a start to getting some good solid information for PBR out to artists in a presentable format.
Measured roughness is a bit arbitrary imo, any material can plausibly have a large range of roughness values without being "incorrect". It's far easier to eyeball values for roughness and get reasonably correct values. I don't think there's much need to actually measure roughness values.
Ah I see what you mean. Yeah I think the values are meant for general reference but in the end it all depends how your art direction whats that material to be or variations of it that someone probably setup.
Sure roughness simply varies, all the data that I added was from actual scans, so its specific numbers for those materials. I don't think anyone is saying you always need to use a specific roughness value or anything like that, this is just a point of reference.
Also lol at your cranky programmer. Why not actually help out if you're going to get so worked up about it? Its a lot easier to deride someone else's effort than contribute I guess. In general I agree that its a bit confusing, but nothing that is impossible to fix.
I totally disagree about measuring roughness btw, all of Quixel's megascans data has gloss/roughness scan data, and its super useful. Even though roughness can very heavily, for a given material there is still generally a range. EG, you're never going to have charcoal with a mirror like surface.
A. Graphite, not charcoal
B. Even then, the surface is still very rough, unless you have the resolution to represent every micro-pore in the normal map, you're not going to use a full mirror gloss/roughness to represent a material like this.
So for a change I'll try to be helpful in a polite way
Let's start with roughness. As Mark mentioned, roughness can vary greatly within a material -- it only characterizes the slope distribution of microfacets on a surface. There is no point putting it in a generic table, as it will vary all over the place. You could potentially have another table for just roughness values, with entries like "sandpaper grade P20", or "this one particular type of plastic on this brand new surface, at this exact spot." Furthermore, "roughness" is not used as a strict physical quantity in computer graphics, but rather, as a loosely defined parameter into the specific BRDF model which a given renderer uses. Unreal Engine 4's roughness is probably going to be different from mia_material's roughness, or Marmoset's roughness. In order to have something reusable across the board, we would need to agree on one particular definition of it, or provide the raw data which goes into the BRDF, e.g. the alpha^2 parameter which the Trowbridge-Reitz/GGX model uses.
On the other hand, it makes sense to tabulate the spec level, as it is going to be mostly constant over a surface of a single material. For a pure and flat material, spec color is directly linked to its index of refraction via the Fresnel equations (it can vary a bit due to micro-occlusion from dents and scratches). Most of the time you'll be getting detail from the roughness map, which can be all over the place, and generally will not be constrained by any measurements. TL;DR: you can eyeball roughness and go crazy with it. Or use actual textures of it, not just singular values.
A bit more on spec color: is going to be grayscale for dielectrics, and tinted for metals. A monochromatic value for metals like copper is not very useful; an sRGB or linear RGB triplet would be much better.
As for color space conventions: It is pretty confusing to provide linear RGB in the 0-255 scale, as you typically don't store linear RGB in 8-bit formats -- if you do, you suffer badly from quantization artifacts. Linear RGB is most commonly used internally in shader math, and constant parameters you provide to materials; it will be in the 0-1 range. sRGB on the other hand usually comes from textures, and will typically be in the 0-255 range.
Sure, scanned data in the form of a texture map is pretty damn useful and I'd love to to be using those that's for sure!
Yeah this is kinda the point I was making, as long as your artists aren't dumb it's not super difficult to eyeball a value within that range - reference points are nice but not essential.
Reflectance amounts on the other hand are way more important to use measured data for.
Yep, agree 100%.
Haha, no worries, I think we all do the same when we don't expect our comments to be posted publicly. :poly124:
Thanks for posting, certainly some good info here.
Reflectivity for metals certainly should be represented in color values, the only reason my data was basic brightness values is that I needed to quickly sort them for this chart. The color info is in that chart and it should be easy to pull that into the database.
Something like: metal (y/n), metalic reflectance (HEX - SRGB/Linear) and reflectance (% - SRGB/Linear) probably makes more sense.
One thing that makes me very curious, because I understand the theory that no(or very few) non-metals have colored reflections, is why does there seem to be so much color in the measured spec data for Quixel's scans? I wonder if that is a technical issue or if there is some other explanation?
I'm not really sure how to address the roughness issue, I guess a big disclaimer that just says "IT VARIES!" near that column or something. Hopefully if someone is at this list, they have a fairly good understanding of the basic concepts. There are a lot of resources that explain the how and why but I think the biggest missing resource is a centralized database of known values, which is what we're attempting to do here.
Perhaps those variations are more relevantly expressed in roughness. However! I checked my ranges and EQ's Quixel data falls almost exactly into the middle of each of my measured ranges.
Are we talking about reflectance or roughness here? I don't think there's any reason you can't fit a wide enough spectrum into 0-255 for reflectance - many people have already done it and it seems to work fine.
In fact a bunch of people I've seen aren't even using per-pixel inputs for reflectance, just one constant per material definition - the perceptual variation in specular response is generally driven by the roughness term which is where all your textural detail/variation lives. Which again, appears fine in the 0-255 value range.
Sure, and so are diamonds, however I doubt an artist will get confused by the difference between diamond and charcoal on a reflectance reference chart. Idealy a decent chart would have enough data points so you can can get an idea of the different roughness values between charcoal, graphite, and diamond, even if all are just different forms of carbon.
Of course, but has anyone here suggested otherwise? This is a guide meant for reference, its not an end all-be-all list of values that every artist needs to use. In most cases, its simply a starting point.
Agreed the process varies per engine. The two engines I have worked on accepted an 8bit texture for specular.
Qft. Hence "informed" also
Yeah the different sets of data are useful for different reasons, I think the main issues is just looking at it, its confusing.
Not sure if this is something you could set up, but maybe we could stick to one base value, with a little button to convert to different values, say:
Base value = RGB(SRGB), 255, 255, 255 scale
Convert to: RGB(Linear) 255, 255, 255 scale
0-1 (SRGB
0-1 (Linear)
Maybe that's overkill and would be even more confusing though.
Let's say the spreadsheet stores a wide variety of data, it can store things in 0-1 range and 0-255 (and maybe some math done automatically). It can store reflectance values with color for measured data, but also the median luminosity of those reflectance values converted for use in a metalness workflow (again maybe more auto-math). For reflectance we could store range and average, and for roughness we put some big disclaimer label disclaimer (APPROX!).
And then on the front-end, if you could use some drop-downs or checkboxes to say "show me data for a metalness workflow, where my albedo is SRGB and reflectance is linear, and I want to see average reflectance" or "show me data for a pure pbr workflow where all data is linear, and I see the possible range of reflectance". All it would be doing is hiding/showing different sets of data based on your use case.
That'd be pretty useful right?
Never did I disagree with the basic concept that roughness varies (in fact quite the opposite if you read the whole thread). The basis of my disagreement was that measured roughness values have no use, I think they do.
Certainly, I guess I just get sick of writing disclaimers at some point. Hopefully people are doing their own research as well if they've found their way to this thing. If not, I'm not sure a million disclaimers will really help, but who knows. I've written quite a lot on the topic and I've linked to the article in this thread, I guess I could re-write it here too but honestly I don't have the time or energy for that.
Yes, I like the sound of that. I think one of the most common issues have when looking at reference charts is how to apply that information to a specific engine/shader/workflow. If we can set up some math that gives you just the info you need for a common situation, that would be great.
I tried to get my own data for skin a while back and the polarized light filtering method isn't absolutely perfect. What I was calling the specular still had a hint of the skin color. I then tried to subtract out more of my diffuse color (assuming the filtering wasn't perfect) and got a blueish tinted specular like you would expect if you wanted to add your specular color on top of your diffuse and get white.
At the end of the day the data depends on how you're using it in the model and if you're expecting to add your specular and get white then your specular colors need to counter the diffuse color. UE4's model already takes into account the specular so there isn't even an option to color it (besides metallic). If the specular has a little bit of the diffuse color to it maybe you could get away with just a bit of metalic... (I'm not completely sure how a complex material with some metal suspended in it would react). I'd be interested in learning more theory.
Yeah, I have a hunch it has something to do with the polarization, but I don't really know enough about exactly what they're doing with their scanner.
No charcoal for you, Waggle!