Skip to content
← Back to Blog 3d-modeling

Lighting and Baking in Blender for Game Engines: Lightmaps, HDRI, and Real-Time PBR

By BitSoul3D5 min read238 views

Most 3D artists obsess over topology and textures but treat lighting as an afterthought. That's a mistake. Lighting is the single biggest factor in whether your asset reads as professional or amateurish — and in game engines, getting it wrong means wasted draw calls, blown-out materials, and players who can't see what they're looking at.

Lighting and Baking in Blender for Game Engines: Lightmaps, HDRI, and Real-Time PBR

This guide covers the full Blender lighting and baking pipeline: HDRI setup for accurate PBR preview, light map baking, and exporting assets that behave consistently in Unity, Unreal Engine 5, and Godot 4.

Why Lighting Accuracy Starts in Blender

Blender's Cycles and EEVEE renderers are physically based, which means lighting behaves the same way as it does in modern game engines — if you set things up correctly. The key is using HDRI environment lighting for your preview and baking workflow, rather than relying on arbitrary point lights that won't transfer to the engine.

When you preview your asset under a neutral HDRI (3000–6500K, low intensity), what you see in Blender's viewport should closely match what Unity's URP or Unreal's Lumen produces. This matters because it lets you catch material problems — over-bright speculars, blown albedo values, incorrect roughness — before you're deep inside the engine.

For PBR accuracy, keep albedo values between 30–240 sRGB (never pure black or pure white), roughness non-zero for most real-world surfaces, and metallic strictly at 0 or 1. These constraints are enforced by Unreal's material validator and will save hours of debugging.

Why Lighting Accuracy Starts in Blender — illustrated

Setting Up HDRI Lighting in Blender

A proper HDRI setup takes under two minutes and dramatically improves your preview accuracy:

import bpy

# Remove all existing lights
bpy.ops.object.select_all(action='DESELECT')
for obj in bpy.data.objects:
    if obj.type == 'LIGHT':
        obj.select_set(True)
bpy.ops.object.delete()

# Set up world HDRI
world = bpy.data.worlds['World']
world.use_nodes = True
nodes = world.node_tree.nodes
links = world.node_tree.links

# Clear defaults
nodes.clear()

# Add Environment Texture node
env_tex = nodes.new('ShaderNodeTexEnvironment')
env_tex.image = bpy.data.images.load('/path/to/your/hdri.hdr')

# Add Background and Output nodes
bg = nodes.new('ShaderNodeBackground')
bg.inputs['Strength'].default_value = 1.0
output = nodes.new('ShaderNodeOutputWorld')

# Link
links.new(env_tex.outputs['Color'], bg.inputs['Color'])
links.new(bg.outputs['Background'], output.inputs['Surface'])

print("HDRI world lighting configured.")

For neutral preview, use a studio or overcast HDRI at strength 1.0. For final asset renders on marketplaces like BitSoul marketplace, a dramatic HDRI at 0.3–0.5 strength with a complementary key light produces compelling thumbnails.

Baking Lightmaps for Static Assets

Lightmap baking is essential for static environment props — walls, floors, furniture, architecture. Rather than calculating lighting at runtime, you pre-bake it into a texture that the engine samples cheaply.

The baking workflow in Blender:

  1. Create a dedicated UV channel for lightmaps (UV Channel 1). Use Blender's Smart UV Project with island margin 0.02–0.04. This channel must be non-overlapping — unlike albedo UVs which can reuse tiles.
  2. Add a new Image Texture node in the material, create a new 1024×1024 or 2048×2048 image (power-of-two only), and leave it selected but unconnected.
  3. Set bake type to Combined (for full lighting) or Diffuse with Direct + Indirect only (to exclude albedo from the bake).
  4. Set samples to 64–128 for draft, 256–512 for production.
  5. Bake and export the lightmap as a 16-bit EXR or PNG.
# Bake lightmap via Python
bpy.context.scene.cycles.bake_type = 'DIFFUSE'
bpy.context.scene.render.bake.use_pass_direct = True
bpy.context.scene.render.bake.use_pass_indirect = True
bpy.context.scene.render.bake.use_pass_color = False  # exclude albedo
bpy.context.scene.render.bake.margin = 4
bpy.context.scene.cycles.samples = 128
bpy.ops.object.bake(type='DIFFUSE')

In Unity, assign the baked lightmap to the secondary UV channel in the mesh renderer. In Unreal, use the Lightmass static lighting system and point it to the pre-baked texture. In Godot 4, use LightmapGI baking with the imported mesh.

Bake Types and When to Use Each

Bake TypeUse CaseEngine Target
CombinedFull scene preview renderMarketing renders
Diffuse (no color)Static prop lightmapsUnity, Unreal, Godot
AOCavity/contact shadow mapsAll engines (multiply blend)
NormalHigh-poly → low-poly detailAll engines
RoughnessProcedural → baked roughnessAll engines
EmitSelf-illuminated surfacesUnreal Lumen supplement

For most game assets, you'll bake Diffuse (no color pass) for lightmaps and AO separately, then composite them in the engine's material. This gives you the most flexibility — you can swap the albedo without re-baking.

Exporting Baked Assets to Game Engines

Once baked, export follows the standard FBX or GLB workflow with one critical addition: you must export both UV channels.

For FBX (Unity / Unreal):

For GLB (Godot / web):

Assets with pre-baked lightmaps dramatically reduce the lighting calculation load at runtime — important for mobile targets and VR. If you're distributing game-ready assets through the BitSoul marketplace, including a pre-baked lightmap variant alongside your base asset significantly increases its commercial value.

Exporting Baked Assets to Game Engines — illustrated

Common Lighting Mistakes to Avoid

Getting Production-Ready

Lighting and baking isn't the most glamorous part of the 3D pipeline, but it's the difference between an asset that looks like it belongs in a shipped game and one that looks like a portfolio exercise. Invest in a solid HDRI library, establish consistent bake settings across your projects, and always verify your baked assets under multiple engine lighting environments before shipping.

For ready-to-use game assets with pre-baked lighting, optimized UV maps, and multi-engine support, browse the full library at https://bitsoulhosting.com/marketplace — every asset ships with documented texture channels and export presets.


This post is part of the Ultimate Guide to Free 3D Game Assets — BitSoul's complete reference for formats, texturing, rigging, optimization, and engine integration.


Need drop-in assets for this workflow? Grab the Architecture Modern Bundle on the BitSoul marketplace and drop them straight into your project.

Tags: architecture

Skip the modeling — download it instead

A free BitSoul3D account gets you 2 GLB downloads every month for personal use plus 25 one-time AI Engine credits, no card required. PBR-textured GLB downloads with a full 3D preview before you buy, for Unreal, Unity, Godot or Blender — OBJ and 3D-printable STL come with any purchase or paid plan.

Browse 1,051 models — from $4.99 → or start free (2 downloads a month)