Two of the most visible systems in any MMO renderer are character and prop models, and the terrain they stand on. Over the past few weeks we have reached working implementations of both: M2 model loading and rendering, and terrain chunk rendering with multi-layer texture blending. This dev log walks through where we are and where we are going.

M2 Model Rendering

The M2 format is used for virtually every discrete object in the game world: player characters, creatures, doodads scattered across terrain, ambient props like barrels and braziers, and particle emitter anchors. Parsing the binary format was straightforward once we had a reliable reference, but getting correct rendering required careful handling of the submesh system, texture unit mappings, and the render flag bitfields that control blending modes per batch. We now load vertex and index buffers from M2 geometry, bind the correct texture layers, and draw each submesh with its associated material state. Skinned animation is not yet wired up — characters render in their bind pose — but the geometry and texturing pipeline is solid and doodads look correct in the world.

Terrain Chunk Rendering

Terrain is organised into chunks, each carrying up to four texture layers with an alpha map controlling how those layers blend together. Reproducing this accurately requires passing all four layers and their alpha data to the GPU and blending them in the fragment shader rather than on the CPU. The result is smooth transitions between grass, dirt, rock, and sand that match the source data closely. We also parse and render the hole mask per chunk, which cuts geometry out of terrain tiles to make space for cave entrances and submerged passages. Height data comes through cleanly and the terrain reads correctly on both the CPU side (for collision) and the GPU side (for rendering).

Next Steps

With M2 and terrain rendering working, the two major remaining visual systems are WMO buildings and water. WMO files describe complex structures with interior spaces, portals for occlusion, and multiple render groups with distinct materials — they require their own loading and rendering pipeline rather than reusing M2 infrastructure. Water sits on top of terrain and requires a separate pass with animated normals and environment reflections. After those two systems land, the world will be visually complete enough for real gameplay testing. We are also planning a first pass on level-of-detail for both terrain and models, since draw call count grows quickly as the view distance extends.

Back to News