-
Notifications
You must be signed in to change notification settings - Fork 0
Mapgeo Import & Export
The .mapgeo format is League of Legends' binary mesh container. It stores geometry, vertex attributes, materials references, bucket grids, and per-mesh metadata.
Location: LoL Mapgeo tab → Import Map
| Option | Default | Description |
|---|---|---|
| Import Materials | On | Load material data and create Blender shader nodes |
| Import Vertex Colors | On | Load vertex color attributes |
| Import UVs | On | Load UV coordinate channels |
| Import Normals | On | Load custom vertex normals |
| Import Lightmaps | On | Load baked lightmap data |
| Import Bucket Grid | Off | Import spatial partitioning grid as collections |
| Merge Vertices | Off | Deduplicate coincident vertices |
| Debug Logging | Off | Verbose console output during import |
| Execution Mode | Foreground | Foreground (freeze UI) or Background (responsive) |
Each mesh in the mapgeo becomes a Blender object with:
- Geometry: Triangulated mesh with positions and normals
-
UV Channels: Up to 8 UV layers (
TEXCOORD0–TEXCOORD7) -
Vertex Colors:
COLOR0attribute (RGBA per-vertex) - Materials: Blender material assigned per-primitive (when materials are loaded)
- Custom Properties: All mapgeo-specific metadata stored on the object
After import, each mesh object carries these properties:
| Property | Type | Description |
|---|---|---|
visibility_layer |
int | Dragon layer bitmask (bits 0–7) |
quality |
int | Quality level bitmask (bits 0–4) |
is_bush |
bool | Whether this mesh is bush/vegetation |
baron_hash |
string | Baron visibility controller hash (hex) |
render_region_hash |
string | Render region controller hash |
path_hash |
string | Mapgeo path hash identifier |
unknown_v18_float |
float | Version 18+ float field |
point_light_* |
various | Custom point light data (if present) |
The Utilities panel offers specialised import modes:
| Operator | What it imports |
|---|---|
| Import Bushes | Only meshes with is_bush=True
|
| Import Render Regions | Only meshes with a render region hash |
| Import Bucket Grid | Only the bucket grid spatial data |
| Import External Mesh | glTF/FBX/OBJ with automatic mapgeo property initialisation |
Location: LoL Mapgeo tab → Mesh Properties
Select any imported mesh to view and edit its properties:
- Visibility Layer: Toggle individual dragon layers (Base, Inferno, Mountain, Ocean, Cloud, Hextech, Chemtech, Void)
- Quality: Set quality bitmask
- Bush: Toggle bush flag
- Baron Hash: Assign or edit baron visibility controller
- Render Region: Assign render region hash
- Material: View/change the assigned material name
- Diffuse Texture: Quick-change the diffuse texture path
For new or external meshes, use Mapgeo Setup Wizard to configure all properties at once:
- Select meshes
- Click "Mapgeo Setup Wizard" in Utilities
- Set visibility layer, quality, bush flag, hashes
- Click OK
Quick one-click initialiser that assigns default mapgeo properties to selected meshes (visibility=255, quality=31).
Location: LoL Mapgeo tab → Export Settings
| Setting | Options | Description |
|---|---|---|
| Version | 13–18 | Mapgeo format version to write |
| Optimize Meshes | On/Off | Optimize vertex/index buffers during export |
Blender scene objects
↓ validate geometry (triangulated, has UVs)
↓ encode vertex streams (position, normal, UV, color)
↓ encode index buffer
↓ collect bucket grid data from collections
↓ gather per-mesh metadata from custom properties
↓ write .mapgeo binary
- All mesh objects in the scene (excluding helpers/empties)
- Vertex positions, normals, UVs, vertex colors
- Material name references per-primitive
- Bucket grid spatial partitioning data
- Bounding spheres and bounding boxes
- All custom properties (visibility, quality, hashes, etc.)
Before export, the addon validates:
- All meshes are triangulated
- UV channels exist
- Material names are assigned
- No degenerate faces
Errors appear in the console and as Blender info-bar messages.
MapgeoFile
├── magic: "OEGM" (4 bytes)
├── version: u32 (13–18)
├── meshes[]: array
│ ├── name: string
│ ├── vertex_buffers[]: VertexBuffer
│ │ ├── description: VertexBufferDescription
│ │ │ └── elements[]: (name, format, offset)
│ │ └── data: raw bytes
│ ├── index_buffer: IndexBuffer
│ ├── primitives[]: MeshPrimitive
│ │ ├── material: string (name reference)
│ │ ├── start_index, index_count
│ │ └── start_vertex, vertex_count
│ ├── bounding_sphere: (x, y, z, radius)
│ ├── bounding_box: (min, max)
│ ├── visibility_layer: u32
│ ├── quality: u8
│ ├── is_bush: bool
│ ├── baron_hash: u32
│ ├── render_region_hash: u32
│ └── path_hash: u32
├── bucket_grids[]: BucketGrid
│ ├── min_x, min_z, max_x, max_z
│ ├── bucket_size_x, bucket_size_z
│ ├── count_x, count_z
│ ├── height_range_min, height_range_max
│ └── buckets[]: GeometryBucket
│ ├── mesh_indices[]
│ └── face_visibility_flags[]
└── texture_overrides[]: (optional, v15+)
| Name | Usage |
|---|---|
POSITION |
Vertex position (xyz) |
NORMAL |
Vertex normal |
TEXCOORD0–TEXCOORD7
|
UV channels |
COLOR0 |
Vertex colour (RGBA) |
BLEND_WEIGHT |
Skinning weights |
BLEND_INDEX |
Skinning indices |
| Format | Size | Description |
|---|---|---|
FLOAT3 |
12 bytes | 3× 32-bit float (positions, normals) |
FLOAT2 |
8 bytes | 2× 32-bit float (UVs) |
BYTE4N |
4 bytes | 4× 8-bit normalised (colours) |
SHORT2N |
4 bytes | 2× 16-bit normalised (compressed UVs) |
FLOAT4 |
16 bytes | 4× 32-bit float |
To add custom geometry (from glTF, FBX, or OBJ):
- Utilities → Import External Mesh (or use Blender's native importer)
- Select the imported mesh(es)
- Run Initialize for Mapgeo or Mapgeo Setup Wizard
- Assign a material name that exists in your materials file
- Set visibility layer, quality, and other properties
- Rebuild bucket grids (see Bucket Grids)
- Export
Ensure all faces are triangulated before export. Use Blender's Triangulate Faces (
Ctrl+Tin Edit Mode).
Export a mapgeo file to JSON for inspection or comparison:
- Use
debug_system.pyto export the original mapgeo as JSON - Export your modified mapgeo as JSON
- Compare bucket grid counts, mesh hashes, vertex counts
- Identify discrepancies with any diff tool
After import, the debug system reports:
- Meshes imported / failed
- Materials loaded / missing
- Textures loaded / missing / failed
- Lights created (if point lights present)