Hello there folks
I'm pretty new to unity, but its pretty straight forward platform to work on.
There is one thing that I can't figure out.
The metallic option both has metalness slider and Smoothness slider.
But once I add texture to it, the glossiness slider is gone.
The texture is metalness with gloss map on it as alpha. (RGB-A)
Its exported from Substance designer.
The formap is .TGA. I rechecked it in photoshop and confirmed that the gloss map is in the alpha slot.
Here is a screen grab.
Do you guys know how to fix it.
Replies
yeah, I just figure that out just now. ;p
Metalness says how much metal is the surface.
Roughness - how much the surface is reflective.
For example, you might have model with shiny plastic surface and rough/worn/dirty non reflective metal; for that you set in RGB which parts is metal, which not, and in alpha reflectivity
So you can store all that in the one texture and plug it in to both the slots. Generally referred to as a material texture (I think, dunno what else) which stores all the scalar channels that define the material in each channel of the texture.
so mikolajspy, your saying that metalness says how much metal is the surface..are you refering to how much does the material absorb or reflect light?
I guess its all confusing to me. If i have Metallic at 0 and the smoothness at 1, the material should not be reflecting light at all because Metallic is at 0, meaning 0 light is being reflected...why does unity act this way.
R Metallic
G AO
B Height
A Gloss
Rather than having to use a separate map for Height on G, or having to choose between AO and Height. I've made my own shader that takes maps packed that way. I've also experimented with putting the AO map in the alpha of the Diffuse Albedo in with the specular setup when I know it's going to be an opaque material. But sticking with a nicely packed metallic setup is just easier.
I was asking a while back(posted here and on Unity's forums) if there was a reason for this. I'll have to find the links. Some people suggested it was because of texture compression reasons, but I'm not 100% sold on that.
Guessing they're assuming the gloss value will stay relatively well compressed in the alpha, with AO getting next best compression in the green. Metalness doesn't need that much to it, so it gets next best in the red.
I've had to hack the Standard shaders to use RGB rather than RGA and that's a real pain now - the code is spread out over so many include files
Blue might contain height for parallax?
Edit: Nope, height is in the green channel of another map (which is likely only used for height).
The sources for the Standard shaders (the metalness ones anyway) are:
Albedo & Alpha: RGB & A (hard-coded to be the from same texture)
Metalness & Glossiness: R & A (hard-coded to be from the same texture)
Ambient Occlusion: G
Height: G
Detail Mask: A
I always thought it was incredibly wasteful to only use 2/4 channels in a texture, at least using 3/4 is a little better.
UnityStandardInput.cginc has the source channels/textures in there.
say I have a fine wooden table with a nice reflection and there is a nice chrome trim on the outside of the table. Within unitys Metal slot what would the rbg look like as well as the glossiness?
For a wood table with chrome trim, ask yourself, is wood made of metal? No. The wood is black on the metalness map. Is chrome metal? Yes. It's white on the metalness map.
Smoothness answers another simple question: Is this surface smooth? (On a scale of 0-255) How smooth is it? If it's perfectly polished, then it's near white. If it's rough and porus like chalk or charcoal, then it's essentially black. For your table, since it's mostly polished, the smoothness map would be bright, if not near white.
When it's packed down, the R would would essentially be black with a white mask for your chrome trim and the alpha would be pretty bright. You can (apparently) pack the baked AO in the green as well.
The metalness workflow handles all of the old issues, like reflection color, reflection frensel angles, and rimlighting all by anwsering these two questions and taking the color of the diffuse into account. For most simple surfaces, you'll get a pretty decent result for complex materials and things that can only exist in games, you might want to fall back to the specular workflow or author a custom shader.
http://forum.unity3d.com/threads/official-5-0-pbr-calibration-charts.289416/
The texture is loaded into memory only once, and presumably the bit for that lookup is loaded (it knows that from the vertex shader, and the UVs don't change, nor does the mip level for that point).
So it's two samples of the same texture at the same place - meaning there is some overhead there that doesn't *need* to be there, but I'm not certain about two texture fetches.
If it's for AO... with forward rendering, it's probably very slightly beneficial - because AO isn't sampled by the forward add passes used by additional lights. So if you've got 2+ lights affecting the model then you're probably saving a little bit of overhead in the long run?
I dunno... if you're using the Standard shaders then you're probably not going to notice the difference, really.
Maybe some of you can help me. Its about the smoothness slider that does not disappear even thou I have a roughness map in the metallic alpha channel.
Furthermore the smoothness slider effects my roughness map - so if the slider does not disappear what value should I set it to, so Unity shows my material in the correct way?
I am using Substance Designer for my texture work and export an sbsar file with standard export settings (albedo, normal, roughness, metallic, AO and height)
- Martin
Moral: you shouldn't worry about that extra slider.
But what is the default value for the slider? It looks like when I place the slider at 0.8 I get the most resembling result when tab between Substance Designer and Unity. I know that the most logic answer would be 0 or 1 but that is not the case with the tests I have been doing.
Could you help me with this last question?