logo enkisoftware
Independent game developer making AVOYD
en  fr

Optimising Voxel Meshes for Games Using Blender

Doug Binks - Juliette Foucaut - 18 Sep 2023


Reducing the number of polygons in 3D objects helps improve a game's performance. This tutorial explains step by step how to clean up the geometry of voxel models in Blender to prepare them for export to game engines like Unreal or Unity.

Note you may have encountered 'polygon reduction' techniques under other names such as 'vertex reduction', '3D model optimisation' or '3D model clean up'.

This post covers the following workflow:

  1. How to use Avoyd Voxel Editor to convert your voxel model to mesh for Unreal or Unity.
  2. How to use Blender to optimise the mesh.
  3. How to use Blender to export to .fbx, and links to documentation for importing the optimised .fbx into Unreal and Unity.

Not covered in this post:

  • Export to Godot Engine: we haven't tested importing the materials into Godot. However you could try using the same methodology exporting the .gltf format from Blender.

Convert the Voxel Model to Mesh Using Avoyd

Use Avoyd Voxel Editor to export your voxel model to mesh (.obj) for games - together with its materials and their properties, such as metallic, transparent and emissive - as follows:

  1. Open Avoyd. (You can use the free demo.)
  2. Load the voxel model you want to optimise.
  3. Export to Mesh:
    1. Select File > Export > Mesh (.obj)
    2. Enter the .obj file name and press Save.
    3. Untick Optimise Mesh. (Because you will optimise in Blender.)
    4. Choose the Target Application Preset: Unreal or Unity. (For Godot use the Unity preset.)
    5. Press Export.

Optimise the Mesh Using Blender

Open the .obj file in Blender and clean up the geometry as follows:

  1. Open Blender. (Using Blender version 3.6.2.)
  2. Delete the following objects from the Scene Collection:
    • Camera.
    • Cube.
    • Light.
  3. Select File > Import > Wavefront (.obj).
  4. Select the .obj file then click Import OBJ.
    1. Select the object by either clicking on it in the viewport or on the object name.
    2. Set the Viewport Shading to Material Preview (third sphere in the top-right corner). Camper voxel model imported in Blender and selected. The Viewport Shading is set to Material Preview
    3. Set the object Interaction Mode to Edit Mode (drop-down on the top left). Blender object Interaction Mode set to Edit Mode
      1. Choose Select > All (button to the right of the interaction mode control) Blender in Edit Mode: menu select all Blender in Edit Mode: all selected
      2. Choose Mesh > Merge > By Distance (button to the right of the select button). Blender in Edit Mode: menu mesh merge by distance Blender in Edit Mode: mesh merge by distance done
    4. Set the object Interaction Mode to Object Mode.
      1. Select the Modifiers (blue wrench on the right-hand side). Blender in Object mode, Modifier Properties selection
      2. Click Add Modifier
        1. Select Decimate in the Generate column. Blender in Object mode, Added modifier, selected Decimate
        2. Open the Planar tab. Blender in Object mode, Added modifier Decimate, Planar tab open
          1. Hold down the Shift key and click all the Delimit options to select them:
            • Normal
            • Material
            • Seam
            • Sharp
            • UVs
          2. Leave All Boundaries unticked.
          3. Leave Angle Limit to 5 degrees. Blender in Object mode, Added modifier Decimate, Planar tab open with Normal, Material, Seam, Sharp and UVs selected
        3. Click the down arrow button (next to decimate) and select Apply. Blender in Object mode, Modifier Decimate with Planar Normal, Material, Seam, Sharp and UVs, 'Apply' option showing
    5. Set the object Interaction Mode to Edit Mode to see the result: the object is cleaned up, it has fewer polygons: Blender in Object mode, Modifier Decimate with Planar Normal, Material, Seam, Sharp and UVs applied. The object has fewer polygon

Export the Model to Game Engines

Export to FBX using Blender

In Blender export the mesh to .fbx for Unreal or Unity (.gltf for Godot) as follows:

  1. Select File > Export > FBX (.fbx).
  2. Name the file <filename>.fbx and click Export FBX.

Import and Configure in Unreal or Unity

Finally, follow the documentation to import the optimised .fbx into Unreal or Unity:

2023
 ›› Optimising Voxel Meshes for Games Using Blender 
 › Implementing a GPU Voxel Octree Path Tracer
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
2022
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
2021
 › Importing Minecraft maps in Avoyd Voxel Editor improved
2020
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
2019
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › In-game building
 › Player-deployable turrets in Avoyd
2018
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
2017
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
2016
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
2015
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Feral Vector
 › Normal generation in the pixel shader
2014
 › Python Google App Engine debugging with PyCharm CE
 › Lighting voxel octrees and procedural texturing
 › Patterns and spheres
 › Python Google App Engine debugging with PyTools
 › Interview
 › Domain masking using Google App Engine
 › Octree streaming - part 4
 › Black triangles and nervous_testpilot
 › Presskit for Google App Engine
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
2013
 › LAN discovery with multiple adapters
 › Playing with material worlds
 › Developer Diary archive
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Implementing a static website in Google App Engine
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
2002
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
2001
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready
 › Game Tech
 ›› Optimising Voxel Meshes for Games Using Blender 
 › Implementing a GPU Voxel Octree Path Tracer
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Normal generation in the pixel shader
 › Lighting voxel octrees and procedural texturing
 › Octree streaming - part 4
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › LAN discovery with multiple adapters
 › enkiTS
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › RCC++
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Web Tech
 › Procedural python word generator: making user names out of 4 syllables
 › Python Google App Engine debugging with PyCharm CE
 › Python Google App Engine debugging with PyTools
 › Domain masking using Google App Engine
 › Presskit for Google App Engine
 › Implementing a static website in Google App Engine
 › Avoyd
 › Implementing a GPU Voxel Octree Path Tracer
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › In-game building
 › Player-deployable turrets in Avoyd
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › Feral Vector
 › Patterns and spheres
 › Interview
 › Black triangles and nervous_testpilot
 › Playing with material worlds
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › Avoyd 1999
 › Developer Diary archive
 › Back in 1999
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready