I'm curious, how did/does engines that use a Deferred rendering system* (non PBR) deal with gloss and specular? As in, how do they control both per pixel versus per material? Additionally, with metals, does it use a check-box to get the specular color from diffuse?
*Not just lighting, the whole thing.
Replies
And it works this way in both deferred and forward rendering paths.
Maybe be more specific about the engine you are interested in.
Some, like Unity, do some hacky stuff - storing the specular value in the alpha of the albedo G-Buffer - means you don't get coloured specular.
How exactly you input gloss/spec will be really engine specific, so its better to figure out what engine you're thinking of using and then ask.
http://www.polycount.com/forum/showthread.php?p=1035922
I mentioned no PBR, because from what I understand a bnw metalness map will get the color from the albedo.. Thats why UE4 can be totally deferred in part while UE3 cant.
This isn't the case in the old system, yet the main guy was under the impression he could grab the color values from specular (they are pure programmers). Had to explain then all highlights would have diffuse color making everything look like metal. I wanted to give an example of a deferred pipeline to help. I know of non. I also haven't gotten a straight answer yet if we still will have two channels to separate the specular from the gloss. With what little I understood, they were going to rely on the diffuse for one of them...
Even better than all this, calling all game rendering coders and shaders to help some pure programmers figure out whats what.
IRC Network: irc.maxgaming.net
IRC Channel: #garagegames
Look for Andrew or Az.
TBH though, not understanding the push to deferred since its a dead end for 4K. Forward+ seems the way to go to keep abreast of whats coming ahead.
http://goo.gl/EFL006
*Please don't turn this into why would one use this engine, or it sucks. Not helpful in the least.
In general terms, I believe deferred renderers often have limitations on the amount of shaders you can use, and usually you'll have one sort of uber shader that handles almost all of your materials in a completely deferred pipeline. However, what that ubershader actually is and the inputs it takes shouldn't be limited to non-pbr or anything like that simply due to being deferred.
Metalness input is also not mutually exclusive to PBR, and I think what you say about UE3 and UE4 is incorrect and really neither here nor there.
This is technically true but PBR introduces a bunch of variables and requirements that make deferred rendering harder to write. You need to write more things to the G-Buffer (like gloss and RGB reflectance), and Unity's approach of RGB diffuse A specular-everything doesn't cut it anymore.
Whomever popped into that IRC, I meant Az, sorry!
However, you do not need a metalness input to have physically based shaders, its simply not a requirement. If you take the time to understand what metalness maps do, that should become more clear. (Hint: its mostly an optimization thing).
While i'm not aware of any engines with non-pbr shaders that uses metalness maps, there is not anything stopping you from setting one up. You certainly could use the metalness workflow with a NPR (non-photo realistic) shader for instance. You could set up a metalness shader to use a non-realistic fixed reflectance value higher than 0.04 if you wanted a stylized, look where non-metals are more reflective than they typically are in reality.
Maybe give this thread a read, its been quite active lately: http://www.polycount.com/forum/showthread.php?t=136390
I think if general you're focusing too much on what maps the shaders take, and not the basic foundations of physically based rendering. I would worry less about metalness vs 8bit spec vs 24bit spec and more about image based lighting, local probe baking, physically grounded dynamic lights energy conservation, fresnel, etc. Though even IBL is not technically required for PBR, its just hard to get realistic ambient reflections without it.
If I were you I would:
1. Figure out what sort of rendering system you want (I would recommend some sort of PBR as it is essentially industry standard at this point). Write up a technical document with all of the rendering features that would require. This will involve researching other engines like UE4, Crytek, Toolbag, etc.
2. Talk to your engineers about what is doable with deferred vs forward etc.
3. Figure out how to feed the shaders/pack the maps (metalness vs spec etc)
Probably will give a better sense just to link you to the thread.
http://www.garagegames.com/community/forums/viewthread/137917
It sounds like the metalness map in this case will be the same idea I had in the initial post with it basically acting as a mask for when to pick up the diffuse color versus not.