TechnologyWorldGodot clientProcedural generation

Lighter Maps Without Losing Their Identity

Valenya replaces the huge pre-rendered backgrounds of 115 maps with shared textures and compact control maps, without changing their appearance or gameplay.

·7 min read ·The Valenya team

Until now, the ground of every Valenya Online map was stored as a large pre-rendered image. This guaranteed a faithful look, but came at a considerable cost: hundreds of megabytes of textures and several gigabytes transferred with each new client version.

We have completely redesigned ground rendering using a technique called splatting. The idea is simple: instead of storing a complete image for every map, the game now reconstructs the terrain from small reusable textures and compact control maps.

A huge image for every map

A main 64 × 64-tile map previously used a background up to 4096 × 4096 pixels. Grass, earth, roads, water, terrain and biome transitions were assembled during world generation, then saved as a large WebP image.

Visually, the result worked very well. Technically, however, it had one major drawback: much of the same texture content was duplicated in every map.

A patch of grass appearing in twenty different regions was stored twenty times, embedded in twenty separate images. Generated backgrounds alone accounted for around 879 MB in the client's import cache, nearly 70% of the game's total size at that stage of the pipeline.

Across the distributed versions—Linux, Windows, macOS and the patch file—this content could account for nearly 5 GB transferred per build.

How does splatting work?

Splatting reverses that approach.

First shader prototype: WebP background on the left and UV coordinate visualization on the right

An early development step: the reference WebP background on the left; on the right, the shader displays its UV coordinates as a gradient to check that the entire map is covered and correctly oriented.

The client now has a library of small tileable textures: several kinds of grass, earth, rock, sand, snow, wet ground and paving. These materials are shared by every map.

Instead of a complete image, each region stores small control maps telling the engine how to blend those materials:

The graphics processor then assembles these elements at render time. Each map's identity comes from the combination of shared materials and region-specific masks, rather than a huge dedicated image.

This is a common technique in games with vast terrain. It preserves visual variety without needlessly duplicating textures.

The same world, rebuilt differently

The goal was not to change Valenya's appearance. We needed to reproduce the existing look with a new composition method.

The world generator therefore still calculates biomes, paths, banks, terrain and lighting variations. It simply exports the result in a more compact form. The client invents nothing and does not rerun the procedural logic: it applies information already prepared.

This approach allowed us to preserve:

Cloud shadows remain a dynamic effect rendered separately by the client.

Comparison of the WebP background and complete splat rendering on a grassland map

The same area after integrating materials, water, the road, terrain and lighting. The WebP background is on the left and the complete splat rendering on the right.

Particularly large savings in dungeons

Dungeons were among the most expensive maps. Some fully imported backgrounds exceeded 9–11 MB.

With splatting, cave, burrow, crypt and castle textures are stored just once. Each floor then retains only its control maps and descriptor.

Depending on the dungeon series, the reduction is generally between 89% and 95%. Across the full set of dungeons 10200 to 10207, roughly 80 MB of imported backgrounds was replaced by less than 4 MB of data and shared materials.

Walls are not flattened into another giant image. The shader reconstructs their volume from compact masks and directly reuses the facing textures already in the client.

Close-up comparison of crypt walls before and after migration

In this crypt, the original background is on the left and its shader reconstruction on the right. Slabs, borders, wall faces and patches of moss are still composed in the same order.

The outdoor world benefits too

The system was then extended to outdoor environments: grasslands, forests, marshes, desert, tundra and moorland.

The first batch naturally had to include the shared material libraries. Despite that initial cost, it already showed a reduction of around 73%. Once those materials are in the client, subsequent maps mostly cost only their control maps, generally 150–240 KB per region.

The last 43 outdoor maps migrated replaced around 220.5 MB of imported backgrounds with 10.8 MB of splat data and new materials: a saving of over 95% for that batch.

Full comparison of an outdoor region with multiple biomes

A complete outdoor region, with the reference WebP on the left and production rendering on the right: grass, paths, water, rocky terrain and biome transitions are reconstructed from the same shared materials.

A gradual, carefully checked migration

Maps do not all switch automatically.

Each region is compared with its old rendering before approval. When a complete splat descriptor is present, the client uses it and the old large WebP background is removed from the build. Otherwise, the map keeps its original rendering.

This strategy lets us migrate the world gradually without forcing visual changes on special or older maps. Fifteen cells of the main grid deliberately remain in WebP, for example: some have transitions between multiple biome families, while others no longer exactly match the generator's current configuration.

They will be handled individually rather than accepting a visible difference.

115 maps already converted

Current production splatting covers:

That makes 115 maps already converted.

The local map opened with M, the world overview and thumbnails also use the new rendering. A map whose WebP background has been removed therefore remains properly visible in every game interface.

What changes for players?

In game, almost nothing—and that is precisely the point.

Collision, movement, portals and data sent by the server stay identical. The change only concerns how the client displays the ground.

Behind the scenes, the benefits are considerable: a smaller client, less duplicated data, lighter builds and a foundation much better suited to future world expansion.

Splatting lets us keep enriching Valenya without adding several megabytes of nearly identical images for every new region. The world retains its painted, organic look, now supported by much more sustainable technology.