Wednesday 18 October 2017

3D Modelling Techniques: Modular

[UE4] Modular Building Set Breakdown

The link above provides a thorough run through of a 3D Artist designing and building modular assets for buildings, which is something to consider for my Final project.

The artist makes a point of analysing photo reference to capture key elements of buildings that can be reused and re purposed, even detailing a method that allows for the colours to be switched using colour overlays in Unreal.

He uses PBR maps, using a workflow similar to a metallic/roughness workflow outlined by Allegorithmic Documentation (McDermott, 2015) Utilising Base Colour, Metallic, Specular and Roughness maps, each using inputs from 0 to 1.




Sources
Docs.unrealengine.com. (2017). Physically Based Materials. [online] Available at: https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/ [Accessed 18 Oct. 2017].


McDermott, W. (2015). The Comprehensive PBR Guide Vol. 2. 1st ed. [ebook] Allegorithmic. Available at: https://www.allegorithmic.com/pbr-guide [Accessed 17 Oct. 2017].

Wednesday 4 October 2017

Physically Based Rendering Workflow

There are two main workflows for PBR Shaders, depending on the engine capabilities or constraints. These are a Metal/Roughness workflow and a Specular/Glossiness workflow, each with their advantages, cruxes and map types.

Metal/Roughness
This workflow uses three map types that are exclusive to this pipeline, and each have their own guidelines on how to create them, as cited by Allegorithmic.

  • Base Colour
  • Metallic
  • Roughness

Base Colour
The base colour map is where the reflectance value is placed, with a reflected colour for dielectrics. The reflectance value works in hand with the metallic map, and will only reflect light if the metallic map masks the area as being metal.
For the base colour, no lighting information is present, and the tone of the colour is flatter than it would appear in a normal diffuse colour map. This considers the PBR Shader which will give the map a lighter appearance. On the sRGB scale, the tone of the base colour map should adhere to guidelines, depending on the brightness. If it is a darker colour, it shouldn’t go below the range of 30-50, while brighter values shouldn’t exceed 240. The dielectric value (F0) is hardcoded to 0.04 (4%) reflective.
The reflectance value uses real world values to give the desired look of certain metals. As stated before, any non-metallic elements, or dielectrics should be set to non-metallic in metallic map.

Metallic 
Like an alpha mask, this map defines which areas of the texture are raw metal, and which aren’t. This map doesn’t take any real-world values, and uses black to define non-metals, and white for metals. A blend between the two states can be achieved by using grey values, but if they have a value lower than 235 sRGB, their reflectance value in the Base Colour map too needs to change to show it is no longer a metal.

Roughness
The roughness map determines the texture that the object is given, and how smooth the surface is. While the light intensity remains a constant, a rougher surface changes the direction that reflections follow, using the microfacet theory. A smoother surface will appear brighter, with less diffusion taking place. In a roughness map, Black represents a smooth surface, while white represents rough. As the other two maps rely heavily on real-world values, it is in this map that an artist can spread their wings, defining the character of the surface and telling whatever kind of story they want about the condition it is in. The normal map of an object usually features detail that can be used as a guideline to create a roughness map, defining key areas and details.

Energy conservation
As the Base Colour Map doesn’t give control over the F0 value for dielectrics, Specular values from Base Colour and Metallic map use real world values and maintain the laws of conservation, so the two values are additive.

Specular/Glossiness Workflow
Like the metallic/roughness workflow, this workflow uses three main maps:

  • Diffuse (albedo)
  • Specular
  • Glossiness

Diffuse
This map contains the diffuse colour for the material but, unlike Base Colour, holds no reflectance values. Areas that are intended to display metal are coloured black, as they have no diffuse colour, and rust and grime would contain colour, as they are dielectrics. Like the Base Colour, it should contain no lighting information, but still adhere to the sRGB values for dielectrics, 30-50.

Specular
This map contains the reflectance values of metals, and the F0 values for dielectrics, where the F0 value is hardcoded at 4%, but should still follow real world measured values. The F0 value is greyscale, with the metal reflectance having colour. This colour is what gives the metal its tint that defines the type. For example, Gold has a yellower tint than steel.

Glossiness
Like the Roughness map, this creates surface irregularities that cause light to diffuse, and reflect less, giving a smoother, or rougher surface texture. Unlike the Roughness map, the values that denote smooth and rough are inverted, so Black defines rough, and white defines smooth.

Energy Conservation
Unlike the other workflow, Specular/Glossiness gives full control over f0 Values for dielectrics, which means the values for dielectrics and metals can combine to output a larger amount of light, breaking the laws of conservation.

Maps Common to both Workflows

Ambient Occlusion
Ambient Occlusion determines how much ambient environment light is available to the surface. So, faces that are hidden would contain no ambient environment light, and this would be presented in the ambient occlusion map. Ambient occlusion only impacts diffuse colour, and should not impact specular colour. Ambient Occlusion can be baked from the mesh itself, or from other maps, such as, Normal Maps and Height Maps.

Height
Often referred to as displacement maps, Height maps can be used in PBR for parallax mapping, and creates more depth than normal and bump maps. As with AO, Height maps can be baked from meshes themselves, or converted from Normal Maps.

Normal
Normal maps are used to create detail on surfaces, without needed to expend any polys to create the detail. In a PBR Workflow, it is used the same as in the traditional method, and is beneficial to be used to define the roughness/glossiness map. As the Height map can be defined using the Normal map, the same is true in reverse.