Poom Poom Shop Pass · 29.99€/mo

Mapping

MLO performance: textures, LODs and keeping your server smooth

NXBy Team NolX
· 4 min read

Richman Cinema Mansion

Every server owner eventually gets the same complaint: "the city lags near X." Most of the time someone blames scripts, opens resmon, sees nothing alarming, and gives up. With maps, resmon is the wrong tool. An MLO barely touches script CPU. Its cost is streaming: memory, textures and geometry the client has to load and draw.

Here's what actually drives that cost and how to check the maps you run.

Streaming memory is the real budget

GTA V was built to stream the world in and out as you move. Every model and texture near the player gets loaded into memory, and everything far away is dropped. FiveM adds custom content on top of that, and the budget doesn't magically grow.

When you stack too many heavy maps in one area, the client runs out of streaming room. The symptoms are familiar:

  • Textures stay blurry for seconds, or never sharpen.
  • Props pop in late, sometimes after you've walked through where they should be.
  • Players with lower-end PCs crash near busy areas.

None of that shows up in resmon, because no script is running.

Texture dictionaries: the usual suspect

Textures are stored in .ytd files, and they're usually the biggest chunk of an MLO. A single 4096x4096 texture with mipmaps can weigh tens of megabytes. Put twenty of those in a house and you've spent a huge slice of the streaming budget on wallpaper.

What I look for when auditing a map:

  • Resolution vs. use. A 4K texture on a light switch is waste. 512 or 1024 is plenty for most interior surfaces players see up close; 2048 is reserved for big, hero surfaces.
  • Compression. Diffuse textures should be DXT1 or DXT5 (BC1/BC3), not uncompressed A8R8G8B8.
  • Duplicates. The same tile texture embedded in five different .ytd files is loaded five times.
  • Mipmaps. Without them, the engine can't use smaller versions at distance.

The oversized asset warning

FiveM tells you when something is too big. Open the F8 console in-game and look for lines like:

Asset stream/richman_hall.ytd uses 38.4 MiB of physical memory.
Oversized assets can and WILL lead to streaming issues (such as models not loading/rendering).

That warning is not cosmetic. A map that throws several of them will cause the issues listed above, especially combined with other heavy resources. If you only do one check on a map before putting it live, do this one.

LODs and why distance matters

LOD means level of detail. A well-made model has several versions: high detail up close, simpler meshes further away, and eventually nothing at all. The engine swaps between them based on distance.

For MLOs the interior itself is mostly handled by rooms and portals, so the engine doesn't draw what's inside until you can see it. But the exterior shell and any custom props placed outside still need sensible LODs and LOD distances. Common mistakes:

  • Huge LOD distances. A garden chair visible from 500 meters away is drawing for no reason.
  • No lower LODs at all. The full mesh renders at every distance until it suddenly vanishes.
  • Wrong entity LOD distance in the ymap, overriding a perfectly good model.

Poly counts, in perspective

People obsess over triangle counts, and they matter, but less than textures in most interiors. A furnished room can carry a fair amount of geometry without trouble if it's occluded properly and the materials are reasonable. What hurts is high-poly props repeated dozens of times, or a single unoptimised sculpted object (a statue, a car model used as decoration) with hundreds of thousands of triangles.

How to audit your server's maps

A practical routine I'd suggest:

  1. Start a local test server with only your maps and no scripts.
  2. Join, open F8, and fly around each map. Note every oversized asset warning.
  3. Use the built-in profiler to see frame time near busy areas:
profiler record 500
profiler view
  1. Check .ytd sizes on disk in each resource's stream folder. Anything well above 16 MB deserves a look.
  2. Remove maps one at a time from a laggy area and see what changes.

For CPU, resmon 1 is still useful, just for scripts. If a map resource shows up there with real CPU time, it's probably shipping a script with it.

What good mapping looks like

Good MLOs are boring from a performance point of view. Reasonable textures, shared dictionaries, proper LODs on exteriors, and occlusion so the engine can skip what you can't see. Entity sets help too: optional rooms and furniture that aren't enabled don't cost anything.

We build our interiors with these limits in mind, because a gorgeous house that makes half the server stutter is a bad house. If you want a reference for what a furnished interior can cost, compare one of ours, like the Cinema Mansion, against whatever is currently causing trouble in your city.

Keep reading

More from the Journal