Everything Digital, Everything Art

Creating PBR/PBS Textures for Unity 5, Unreal Engine 4, and Blender Cycles

If you have been keeping up with the latest trends in the 3D world, you know that Physically Based Rendering/Shading is the new standard for many materials. Of course, it is still new, and for someone to simply switch over, there is very little documentation. Most of what is out there tells you to use the Substance Painter/Designer/Player to create these textures. A matter of fact, that is what you have to do if you download textures from GameTextures dot com; you use Substance Painter to convert their textures to be used in whatever platform you plan to use them. This method is fine if you are someone that uses textures from GameTextures, but if you’re someone that prefers to hand-paint your textures, like myself, this shit isn’t gonna fly. Soooooooooo, let’s look at how we get around this bs.

I almost feel bad making you come to this page, because what I’m about to explain is very simple. The main thing about PBR/PBS maps is that you you can use a single map for two different properties, and this is usually “metalness” (Yes, it’s a real word now!). In other words, instead of using strictly RGB maps, PBR takes advantage of RGBA maps, using the Alpha channel to give more information. For Unity, this the metalness in gloss maps. Let’s look at what maps are different now.

Unity 5 Specular Metalness Alpha Channel

Unity 5 Specular Map Metalness Alpha

First is the specular map. When you plug this bad boy into Unity 5, it will look for an alpha channel for the metalness setting. So, the RGB channels are used for the specular map, where black (0) is no specularity, and white is (1) specularity, with everything in between. The Alpha channel is then used for the smoothness, to tell Unity what roughness, and reflection/refraction it should have. Once again, this channel is using the Black/White spectrum, where black is zero, and white is one. To your right is a screenshot of this alpha map, from GameTexture’s Concrete Rebar PBR texture set, after being converted for Unity 5. For more information, check out the Unity 5 Standard Shader page.

The other map changed for Unity 5 is the glossiness map. There really isn’t anything special about this map, other than instead of being a RGB, or RGBA map, it is simply a Grayscale map. Either way, it’s once again using the input from Black/White, where White maps the most glossy portions of the map. Yawn…

Blender PBR Unreal Engine 4 Textures

Blender Setup using Unreal Engine 4 PBR Textures

So that is all fine and dandy, but what about the rest of us? Well, I was going to make this about Unity 5, and Unreal Engine 4, until I realized that the UE4 maps were just your usual run-of-the-mill maps (All RGB: Diffuse/Spec/Normal/etc, but in UE4 you use a bunch of RGB channel hack jobs to emulate similar results). Using these in Blender worked quite well, with a new setup I altered around CynicatPro’s Cycles PBR Setup.  Check him out by the way, that bastard knows his math, and without hesitation created a great “super charged fresnel”. This Fresnel node setup gives any Blender material the “PBR touch”, and I do mean a good touch.

Blender PBR with Unity 5 Textures

Blender PBR Setup with Unity 5 Textures

If you look to your left, you’ll see that I went ahead and plugged in the UE4 textures into Blender, with the PBR node setup, and it seems to work just fine. While it is not the greatest texture set to test with, it works quite well. After setting that up, I went ahead and tried the Unity 5 textures to see if I could make good use of the alpha channel in the RGBA specular map. Of course I could, but once again, not the greatest map to try with. Of course with Cycles you can emulate PBR without any issues, since with the maps it’s simply one more texture to take into consideration, with the “super charged fresnel” giving it that “PBR” look. I don’t know, the Unity 5 textures look much better to me, or is it just me?

While on the subject, Blender will have PBR added to it eventually. Blender developer Psy-Fi is looking at a contribution made to add this to trunk (main code), and he is slowly adding it in,  as well as additions, and fixes. The original Blender PBR hack can be found here, and possible give you an idea of what to expect. While I’m sure there will be quite a few differences, I’m sure we can expect easy addition, as well as PBR Baking shortly after (crossing fingers). It’s still not shown in the trunk, and I believe the developers are taking a well-deserved break as well, so it will probably will not be until Fall 2015 that we even see any updates on PBR even being added. Who knows? No, seriously, does anyone know?