Time to tackle PBR!
PBR! It’s short for: Physical Based Rendering! It’s important and if you’re planning on going into games, you need to start learning about it because it’s going to dominate the industry very quickly! Unreal Engine 4 uses it for starters and hoo boy that engine’s gonna get some use with those features and that price point! Let’s look at some games with PBR:
The Order 1886:
*ahem* aaanyway. Let’s get analytical here. Even if you’re not an expert on games graphics, you should notice a few things. The lighting looks fantastic!!! (this is partially thanks to IBL which I discussed in my last post, IBL and PBR are BFFs), the characters have a somehow more solid and less plasticky appearance than we were accustomed to last gen, and finally OH MY GOD, THOSE METALS.
So what is PBR and how does it work? Well, the best I can manage is that it’s a new type of rendering which simulates light in a much more realistic way than we used to be able to. How it does this I….er… I don’t…know. Or rather, my knowledge of physics doesn’t really go deep enough to explain it! Here’s a clever person explaining it though! (top comment).
Now even though I don’t really know how it works on a deep level, that doesn’t really matter because basically: materials behave like real things. This actually means that it doesn’t matter if you know all the clever computery stuff going on arguably to a lesser degree than with the old rendering!
There are new maps, so let’s look at those. With PBR, the maps are all on the different RGBA channels of a single image. The easiest way to work with them is to make them individually and then pack them with a program. I use Alloy’s texture packer which came with the alloy package for Unity. So here are some clothes for a certain dapper character in an upcoming game sitting in the Unity editor here (still needs some work on the AO and other tweaks)…
So… what are the new maps?
Almost identical to the diffuse you’d have on any other model! Easy! The only difference is that you shouldn’t cheat shadows. At all. It’ll look weird. So just do purely what the colour of that part of the model is! You don’t even need to cheat things like fabric weave unless it’s a fabric like denim where the raised parts tend to go lighter, since the weave detail will be on your normal and AO.
The Normal Map:
The Specular Map:
Gloss is now obsolete, so it’s just spec. Pretty much unchanged, though you may find slightly higher values work better.
Ambient Occlusion (AO):
Unchanged, a core part of PBR, so if you’re not accustomed to them, start getting used to using them!
…Well this is new! Fortunately it’s super simple. On the metal map, anything that is metal colour it white. If it’s not metal, make it black. There are next to no instances where a thing is kind of metal (if it’s a non-metal thing coated in metal, it’s metal, if it’s a metal thing coated in non-metal, it’s non-metal). Basically “Is this part of the map made of metal? Y/N
Here we see links of the chain, the buckles etc. marked out in white. Everything else is black.
Roughness is the new gloss. Also known as “microsurface” because “roughness” can be a bit misleading, after all, when I ask you to think of a “rough” surface, you might be thinking of burlap or gritstone, but in this case we’re talking on a much more subtle scale.
Here are some Alloy assets. An ingot of gold and a basic sphere I’ve put a nice rock material of theirs onto:
Now If I lower the roughness:
Notice how the rock now looks wet, and the gold looks very smooth and shiny and highly polished, like a piece of aluminium foil or gold leaf? Remember how a couple of posts ago, I said that wet things look more glossy because water fills in all the small indentations on the surface making light reflect more directly? Basically “roughness” is talking about very small indentations on the surface of an object that make the shine less crisp. An object can still be bumpy but have a low roughness value, like this slate material:
Or be smooth but have a high roughness like this steel which has a kind of brushed finish:
To make a roughness map, I find inverting your spec then bumping up the brightness is a pretty effective quick solution. I don’t recommend ever going any darker than about a light-mid grey personally unless you want a thing to look wet, like very smooth glass or very very highly polished metal. Generally most metals will oxidise very quickly in contact with air and gain microsurface roughness, so it’s unrealistic in most cases to have roughness too low. Too low a roughness value and everything in your game will look as though it’s been shrinkwrapped in clingfilm or is soaking wet or made of jelly!
Yeah, let’s try to avoid this.
The glow map:
Thankfully works exactly the same as ever.
So there you go! PBR looks great when it’s used all together and it’s definitely the future of games graphics! Try it yourself! Even if you can’t afford Alloy, there are some free resources now, like Lux!