PBR Texturing Pipeline for Real-Time Engines

June 3, 2025 PBR, Texturing, Materials, Game Engines

Understanding PBR in Real-Time Applications

Physically Based Rendering (PBR) has revolutionized how we create materials for 3D assets in real-time applications. By simulating how light interacts with surfaces based on physical properties, PBR provides more realistic and consistent results across different lighting conditions. This makes it particularly valuable for games, architectural visualization, and interactive applications where lighting conditions may change dynamically.

At Pathgrid 3D Studio, we've developed a comprehensive PBR texturing pipeline that balances visual fidelity with performance requirements. This article outlines our approach to creating high-quality PBR materials for real-time engines like Unity, Unreal Engine, and WebGL frameworks.

The Metallic/Roughness Workflow

While there are multiple PBR workflows (specular/glossiness, metallic/roughness, Disney principled), we focus primarily on the metallic/roughness workflow for our real-time assets. This approach has become the industry standard for game engines and is the basis of the glTF format, making it ideal for cross-platform compatibility.

Core PBR Maps in the Metallic/Roughness Workflow

Our standard PBR material setup consists of the following maps:

1. Base Color (Albedo)

The albedo map defines the diffuse color of a surface without any lighting information. When creating albedo maps:

  • Remove all lighting information (shadows, highlights, ambient occlusion)
  • For dielectric (non-metal) materials, maintain values between sRGB 50-240 (avoiding pure black or white)
  • For metals, albedo represents the specular color (typically in gold, copper, aluminum ranges)
  • Ensure consistent color values for physically accurate materials

2. Metallic

The metallic map defines which areas of the surface are metal (white/1.0) and which are non-metal or dielectric (black/0.0). When creating metallic maps:

  • Use binary values whenever possible (0 for dielectric, 1 for metal)
  • Use intermediate values (0.2-0.8) only for transitions or special effects
  • Ensure metal edges are clean and precise
  • Never use pure metals for areas that should appear dirty or corroded

3. Roughness

The roughness map controls how diffuse or sharp reflections appear on the surface. When creating roughness maps:

  • Black (0.0) = perfectly smooth (mirror-like reflections)
  • White (1.0) = completely rough (diffuse reflections)
  • Add surface detail variation through subtle roughness changes
  • Consider functional aspects of the material (worn edges are often smoother)
  • Avoid extreme values (0 or 1) across large areas except for specific materials

4. Normal

The normal map adds surface detail without additional geometry. When creating normal maps:

  • Use tangent-space normals for most game engine applications
  • Ensure normal maps are properly encoded (DirectX vs. OpenGL format)
  • Calibrate normal intensity to avoid unrealistic surface perturbation
  • Combine high and mid-frequency detail for natural appearance
  • Check for normal map artifacts, especially along UV seams

5. Ambient Occlusion (AO)

The ambient occlusion map simulates how ambient light is occluded in crevices and corners. When creating AO maps:

  • Bake AO from high-poly models when possible
  • Use appropriate ray distance for the scale of your model
  • Avoid overly dark AO that can make the model appear flat in-engine
  • Consider manually enhancing AO in areas where baked results lack definition

Optional Maps for Enhanced Detail

Depending on the requirements of the project and the capabilities of the target engine, we may also include:

1. Height/Displacement

Height maps provide additional depth information that can be used for parallax effects or tessellation:

  • Create from high-poly sculpt or procedurally
  • Ensure consistency with normal map details
  • Calibrate intensity for the parallax effect in the target engine

2. Emissive

Emissive maps define areas that emit light:

  • Use HDR values when the engine supports it
  • Create subtle variations in emissive intensity for realism
  • Combine with animated textures for effects like flickering lights

Our PBR Texturing Workflow

Here's a detailed look at our step-by-step process for creating PBR texture sets:

Phase 1: Preparation and Planning

  1. Reference Gathering: Collect material references, analyze physical properties, and establish a visual target.
  2. UV Layout Optimization: Create efficient UV layouts with appropriate texel density and minimal stretching.
  3. High to Low-Poly Baking Setup: Configure proper cage settings and projection parameters for detailed baking.

Phase 2: Texture Map Creation

  1. Baking Foundation Maps:
    • Bake normal maps from high-poly model
    • Bake ambient occlusion
    • Bake curvature/position/ID maps as needed for masking
  2. Base Color Development:
    • Create base material zones
    • Develop color variations within material types
    • Add subtle detail like dust, scratches, and wear
    • Remove all lighting information
  3. Surface Property Definition:
    • Create metallic map with clean separation between metal/non-metal areas
    • Develop roughness map with appropriate variation
    • Enhance normal details where needed
    • Create height information for parallax or tessellation

Phase 3: Material Refinement

  1. Material Balancing:
    • Test maps in a PBR viewer under different lighting conditions
    • Adjust roughness and metallic values for realistic reflections
    • Fine-tune normal intensity
    • Verify physically accurate albedo values
  2. Detail Enhancement:
    • Add micro-surface detail for close-up viewing
    • Create edge wear and surface imperfections
    • Apply subtle noise and variation to break up uniformity
  3. Consistency Check:
    • Ensure materials respond properly to different lighting scenarios
    • Verify scale consistency of details across different materials
    • Check for artifacts at UV seams or texture borders

Phase 4: Optimization for Real-Time

  1. Map Packing:
    • Pack compatible maps into RGBA channels (e.g., RM[AO]H)
    • Create specialized packing for target engine requirements
  2. Texture Compression:
    • Apply appropriate compression formats for each map type
    • Generate mipmaps for optimal performance
    • Test compressed textures for artifacts
  3. Engine-Specific Setup:
    • Configure material parameters for the target engine
    • Create material instances or variants as needed
    • Document material settings and usage instructions

Engine-Specific Considerations

Different real-time engines handle PBR materials with slight variations. Here are key considerations for popular engines:

Unity Engine

For Unity's Standard Shader (or URP/HDRP):

  • Normal maps use DirectX format (Unity can convert OpenGL normals automatically)
  • Smoothness is used instead of roughness (invert your roughness maps)
  • Metallic and smoothness are often packed together (metallic in R, smoothness in A)
  • AO can be used as a separate map or baked into lightmaps
  • HDRP supports more advanced features like clear coat, subsurface scattering

Unreal Engine

For Unreal Engine's PBR materials:

  • Base Color should be in sRGB color space, other maps in linear space
  • Normal maps use DirectX format by default
  • Roughness and Metallic are separate grayscale textures
  • Ambient Occlusion can be applied directly to the material
  • Packed texture formats (ORM - Occlusion, Roughness, Metallic) can be configured in the material editor

WebGL / glTF

For web-based PBR in glTF/GLB format:

  • Strictly follows metallic-roughness workflow
  • Metallic and roughness are typically packed (B channel for metallic, G channel for roughness)
  • Normal maps use OpenGL format (Y channel is flipped compared to DirectX)
  • Occlusion is often packed in the R channel of the ORM texture
  • Consider file size and compression more strictly than other platforms

Common PBR Material Issues and Solutions

Even with a solid workflow, certain issues can arise in PBR materials. Here are common problems and their solutions:

Problem: Unrealistic Metal Appearance

Causes:

  • Incorrect albedo values for metals (too bright or with color saturation)
  • Inconsistent roughness values
  • Mixed metallic values instead of binary (0/1) values

Solutions:

  • Use physically accurate albedo values for metals (e.g., gold: 1.0, 0.766, 0.336; silver: 0.972, 0.960, 0.915)
  • Keep metallic values binary (1 for metal, 0 for non-metal)
  • Vary the roughness map to create interest rather than the metallic map

Problem: Flat or Lifeless Materials

Causes:

  • Insufficient surface detail variation
  • Uniform roughness across large surfaces
  • Weak normal maps

Solutions:

  • Add subtle roughness variation across surfaces
  • Enhance edge wear with roughness contrasts
  • Strengthen normal details in key areas
  • Add subtle dirt and surface imperfections

Problem: Materials Look Different Across Engines

Causes:

  • Different PBR implementations between engines
  • Incorrect texture format or encoding
  • Gamma vs. linear color space issues

Solutions:

  • Create engine-specific material configurations
  • Verify normal map format for each engine (DirectX vs. OpenGL)
  • Check gamma/linear settings for each texture type
  • Calibrate material parameters for each target platform

Advanced Techniques for Special Materials

Beyond standard PBR, certain specialized materials require additional techniques:

Subsurface Scattering for Organic Materials

For skin, wax, foliage, and other translucent materials:

  • Create subsurface color map representing internal scattering color
  • Define subsurface intensity/thickness map
  • Use additional parameters like subsurface radius for fine-tuning
  • Consider performance implications for real-time rendering

Clear Coat for Automotive and Lacquered Surfaces

For car paint, varnished wood, and other layered materials:

  • Create clear coat intensity and roughness maps
  • Configure normal detail for the clear coat layer separately
  • Balance base layer and clear coat properties for realistic results

Anisotropic Materials for Brushed Metals

For brushed aluminum, hair, and fabric with directional reflections:

  • Create anisotropic direction maps
  • Define anisotropic intensity
  • Verify engine support for anisotropic shading

Conclusion

Creating effective PBR materials for real-time applications requires a combination of artistic skill, technical knowledge, and an understanding of physical material properties. Our structured workflow helps ensure consistent, high-quality results across different engines and platforms.

Remember that PBR is about more than just following a technical process—it's about observing and understanding how materials behave in the real world, then translating those observations into digital representations. The best PBR artists are keen observers of the physical world around them.

At Pathgrid 3D Studio, we combine artistic excellence with technical precision to create PBR materials that look great and perform efficiently. If you need assistance with your PBR material creation, contact us to discuss your project requirements.