Setting up PBR materials for game engines

Our video game development company runs independent projects, jointly creates games with the client and provides additional operational services. Expertise of our team allows us to cover all gaming platforms and develop an amazing product that matches the customer’s vision and players preferences.
Showing 1 of 1 servicesAll 242 services
Setting up PBR materials for game engines
Medium
~2 business days
FAQ
Our competencies
What are the stages of Game Development?
Latest works
  • image_games_mortal_motors_495_0.webp
    Game development for Mortal Motors
    670
  • image_games_a_turnbased_strategy_game_set_in_a_fantasy_setting_with_fire_and_sword_603_0.webp
    A turn-based strategy game set in a fantasy setting, With Fire and Sword
    860
  • image_games_second_team_604_0.webp
    Game development for the company Second term
    490
  • image_games_phoenix_ii_606_0.webp
    3D animation - teaser for the game Phoenix 2.
    533

Setting Up PBR Materials for Game Engines

Making a good texture in Substance Painter is half the task. The second half is assembling it correctly in the engine. Unity and Unreal Engine use PBR rendering, but implement it differently. Textures that look great in Marmoset Toolbag or Substance Painter viewport look different after import into Unity. Sometimes slightly, sometimes dramatically.

The problem is almost always one of three: incorrect color space, wrong channel packing, or mismatch in Tone Mapping settings between the DCC tool and the engine.

Unity: HDRP vs URP and Material Differences

In Unity the difference between HDRP and URP is not just rendering quality. They have completely different material formats.

Universal Render Pipeline (URP) uses the Lit Shader with straightforward packing: Albedo, Normal, Metallic (R) + Smoothness (A), AO (G), Emission. Smoothness in URP is inverted Roughness. If you export Roughness from Substance Painter and connect it to the Smoothness channel without inversion, the material will be mirror-like where it should be matte.

High Definition Render Pipeline (HDRP) has a Mask Map with packing: Metallic (R), AO (G), Detail Mask (B), Smoothness (A). This is non-standard packing that Substance Painter doesn't create automatically in base templates. You either use the HDRP template in Substance Painter when creating a project, or manually assemble the Mask Map via Photoshop or magick command line (ImageMagick). A mistake in channel packing is one of the most common bugs when transferring assets from another engine.

Color Space is a separate critical moment. In Unity Albedo is imported as sRGB (this is correct — color in sRGB), Normal Map as Linear (mandatory to turn off the sRGB flag in Import Settings, otherwise normals will be incorrect and the surface looks flat), Roughness, Metallic, AO as Linear (they store linear data, not color). Ignoring these settings is the source of half the problems "why does everything look different than in the reference."

Unreal Engine 5: Nuances of the Material System

In Unreal Material Graph textures are connected to corresponding inputs of Principled BSDF analog. But there are several nuances:

Packed ORM texture. In Unreal Engine the standard is packing AO (R), Roughness (G), Metallic (B) into one texture with Linear Color flag. This reduces the number of texture samples in the shader from three to one. The correct Export Preset for Unreal in Substance Painter is Unreal Engine 4 (Packed), which creates this texture automatically.

Normal Map coordinates. Unreal uses DirectX normal space: the green channel (Y) is inverted relative to OpenGL. When importing normals from Substance Painter into Unreal Engine you either use the DirectX flag on export from Substance, or enable the Flip Green Channel option in Unreal Import Settings. Symptom of error — incorrect shadow direction from Normal Map, the surface looks "inverted."

Texture Compression. Unreal compresses textures in BC7 (DirectX) or ETC2 (mobile) by default. Albedo — Default (BC7), Normal Map — Normal Map (BC5) — this is two-channel compression format that preserves only X and Y normal channels, Z is recovered in the shader. If you set Normal Map with Default format — compression will break the normals. Metallic, Roughness, AO — Masks (BC4/BC7 without sRGB).

Material Instances — mandatory practice for production. Instead of duplicating the Material Graph for each material variant — one Master Material with parameters, to which Material Instances are created. This reduces the number of unique shaders (and compilation time at game startup), allows changing parameters without shader recompilation.

Integration of Substance Painter with Engines

Both platforms support direct export from Substance Painter via Export Presets:

  • Unity HDRP — creates Mask Map with correct packing
  • Unity URP — creates standard set for Lit Shader
  • Unreal Engine 4/5 — creates ORM packed texture

But presets don't always account for custom project settings. In practice, an Export Config with explicit channel specification and mapping to output texture channels is used. This is a JSON file that can be versioned in git with the project and used by the entire team.

Direct Live Link between Substance Painter and Unreal Engine via Bridge is convenient during development, but in production pipeline import via Assets folder with explicit Import Settings is preferable: it's reproducible and doesn't depend on the state of a particular artist's workstation.

Checking Materials in Engine

Final check of the assembled material is not "looks nice." It's a technical checklist:

  • Albedo in correct range (30–240 in sRGB) — check via Color Grading / Histogram in engine
  • Normal Map not inverted by Z — test on test geometry with side light
  • Roughness works correctly — test on a sphere with HDRI lighting: mirror at roughness=0, fully matte at roughness=1
  • AO doesn't create double shadowing — remove all shadows from the scene, check AO pass only
  • Metallic is binary — no gradients where there shouldn't be
Task Scale Estimated Timeline
Material setup (1–3 assets) 0.5–1 day
Transfer of asset set from another engine (up to 20 materials) 2–4 days
Creation of Master Material + set of Instances (10–30 variants) 3–7 days
Audit and fixing of materials in existing project by agreement

Cost is calculated after analyzing: number of materials, target engine, rendering pipeline.