Alleyway Environment Breakdown #3 - Materials & Shaders

Making Of / 10 March 2021

Shaders

For the buildings I wanted to explore a workflow I've recently been learning about here and there involve baking out individual masks for modular pieces that can be used over tiling textures to break up repetition without needing unique textures for each piece in the scene.

Starting out I provided each building piece 2 UV sets, one for Texel density, and the other for a unique 0-1 unwrap with the most prominent faces given larger space in the UV. From there it's into Substance Painter for a bake. Using Painter I create 3 User channels and split them between R, G and B and then create masks within each. On export these 3 channels are packed and the buildings ambient occlusion is packed into the Alpha of the texture.

In-engine the material set it starts with the tiling textures and a unique dirt mask made in Designer that is used to create the dirty version of the base texture. Those two are Lerp-ed using the previous building mask and the AO is added in near the end using a AO blend function. At the very end of the shader are some cannibalised sets up from Quixels shaders to add in a detail normal and specular.

As I was learning as I was going there's still plenty more that could be done with this shader/optimisation and I never did get around to utilising the Green or Blue channels. This workflow is definitely one that will be explored deeper in my next project now that I have the basics learnt.

A lot of this workflow was trial and error with experimentation but a good place to start is with this video: https://youtu.be/SybpVltvwN0https://youtu.be/EXPi4lWlkn4

Materials

I would say about 90% of tiling textures used were sourced from Quixel, with one or two taken from Substance Source and myself making two from scratch when I couldn't find the necessary equivalent anywhere else.

Using Quixel textures didn't stop at me simply importing them to Unreal and that was it but instead typically taking them into Substance Designer to dirty up and make the shapes more pronounced. I think some results were pretty hit or miss and going into the future I more likely take the time to learn Quixels own Mixer so I can keep the entire process in one place.


Detail Normals

I used one prominent detail normal in this scene quickly made with Designer that can be shaped and tiled independently of the rest of the textures.