How to optimise a FiveM vehicle: polygons, LODs and texture budget
A FiveM vehicle is optimised when each streamed file needs 16 MiB of memory or less, the model has lower-detail meshes for distance, and vehicles.meta tells the game when to switch between them. In practice that means textures of 2048 pixels or smaller in a compressed format, four LOD levels under the high-detail mesh, and lodDistances such as 10, 25, 50, 100, 500, 500.
What should I aim for?
FiveM sets no polygon limit. What the server measures is the memory each streamed file needs once loaded, and it warns above 16 MiB per file. So the target is per file, not per vehicle: the .yft, the _hi.yft and the .ytd are each checked on their own. The steps of that warning are in vehicle model files and the oversized asset warning.
| File | What makes it heavy | What to do |
|---|---|---|
.ytd | Texture resolution and format | Resize and compress textures. |
_hi.yft | Triangle count of the detailed mesh | Remove geometry nobody sees, reduce dense parts. |
.yft | Triangle count of the lower levels, plus collision | Make real lower LODs instead of copies of the detailed mesh. |
A number from our own work: a sim-racing car we converted arrived with about 512,000 triangles. After the conversion and before any reduction, its model file still needed about 28 MiB of virtual memory, well past the first warning step. Models built for other games are not built to this budget, so expect to reduce them.
How do I measure a vehicle?
- Server console. Start the resource and read the console. A line naming the file and its MiB appears for every file over 16 MiB. No line means every file passed.
- Triangles per level in Blender. In Sollumz Tools > Drawables > LOD Tools > Auto LOD, select a Drawable Model and the panel shows LOD Statistics: triangles and vertices of each level that has a mesh.
- Textures. Memory per texture depends only on resolution and format. The table is in the model files guide: a 2048 x 2048 DXT5 texture is 5.33 MiB, a 4096 one is 21.3 MiB.
Which LOD levels does a vehicle have?
Sollumz gives every Drawable Model five slots. On export the top one becomes the _hi.yft and the other four go into the main .yft.
| Sollumz level | File | lodDistances value that ends it | Stock Sultan |
|---|---|---|---|
| Very High | _hi.yft | 1st | 10 m |
| High | .yft | 2nd | 25 m |
| Medium | .yft | 3rd | 50 m |
| Low | .yft | 4th | 100 m |
| Very Low | .yft | 5th | 500 m |
The sixth value is where the vehicle stops being drawn. The distances live in vehicles.meta, not in the model:
<!-- _hi, High, Medium, Low, Very Low, fade out (metres) -->
<lodDistances content="float_array">
10.000000
25.000000
50.000000
100.000000
500.000000
500.000000
</lodDistances>
The stock Faggio scooter uses 15, 30, 50, 100, 500, 500. A mistake we have seen in converted cars is a line like 10, 150, 150, 150, 150, 150: the High mesh is drawn out to 150 m and then the car disappears, so the lower levels are never shown even if the model has them. The field is explained in vehicles.meta explained, and what LODs are in what are LODs in FiveM vehicles.
How do I create LODs with Sollumz?
Open Sollumz Tools > Drawables > LOD Tools > Auto LOD. The tool copies a reference mesh and reduces it for each level you tick, then Generate LODs fills the slots.
| Setting | Default | Meaning |
|---|---|---|
| Reference Mesh | The mesh to copy and reduce. Use the most detailed one. | |
| Method | Collapse | Collapse is the general-purpose choice. Un-Subdivide suits meshes made by subdivision, Planar dissolves flat areas. |
| Decimate Step | 0.6 | One uniform step applied for each level. |
| Per-LOD Ratios | Off | When on, each level gets its own ratio. The defaults are 0.90, 0.70, 0.50, 0.30 and 0.15 from Very High to Very Low, and a level can use a target triangle count instead. |
| Decimate from Original | Off | Reduce every level from the reference instead of from the level above. |
Automatic reduction is a starting point. What we check by hand afterwards:
- Lights. Small glowing parts collapse into nothing first. Keep the original mesh for indicators and taillights on every level, or protect them from the reduction.
- Parts on different bones. Reduce each model on its own so a door never shares a vertex with the body.
- Silhouette. The lowest level only has to look right from 100 m or more. Interior, engine and underside can go entirely.
- Motorcycle wheels. On the two-wheelers we built, the game did not draw the separate wheel model at the lowest level. Stock bikes handle this by putting a simple wheel shape inside the body mesh of that level, and we do the same.
What texture sizes should a vehicle use?
These are the sizes we use by role. Never upscale: a texture that arrives at 1024 stays at 1024.
| Texture | Size |
|---|---|
| Livery, main atlas, lamp lenses | 2048 |
| Body normal map, tyre | 1024 |
| Tiling detail textures (carbon, fabric, grilles) | 512 |
| Small interior parts | 256 |
| Flat colours | 4 x 4 |
- Format. DXT1 (BC1) without transparency, DXT5 (BC3) with it. A DXT1 texture uses half the memory of the same texture in DXT5.
- Flat colours. Save 4 x 4 single-colour textures uncompressed. They cost almost nothing, and block compression shifted our dark greys towards purple and green.
- Shared textures. Specular, normal and dirt maps that already exist in the game's shared vehicle textures do not need a copy in your
.ytd. - Unused textures. Converted models carry textures no material uses. Delete them.
- Convert outside Blender. Resize and compress with a texture tool and load the result. Re-saving images from Blender darkened ours.
Can I optimise a vehicle that is already finished?
Yes, from its source file. Open the .blend the vehicle was exported from, add the lower levels and export again. What we avoid is importing a finished .yft into Blender and exporting it back: the round trip rewrote small values in the skeleton, and on one of our vehicles that was enough to break its entry and exit animations in game.
Textures are safer to change afterwards. A .ytd can be opened, its textures replaced by smaller ones with the same names, and saved, without touching the model. The tools for each job are in CodeWalker vs Sollumz.
Optimisation checklist
- No texture above 2048, none uncompressed except 4 x 4 colours.
- No unused textures in the
.ytd. - The model has a Very High mesh and four lower levels.
- Lights still show on every level.
lodDistanceshas six rising values, not the same number repeated.- The server console prints no size line for the resource.
The whole modelling workflow is in how to make a FiveM vehicle in Blender with Sollumz. As a reference from our catalog, the Coil S-Cooter and the three hoverboards ship with four LODs, High to Very Low.
Frequently asked questions
- How many polygons should a FiveM car have?
- FiveM sets no polygon limit. The server measures memory per streamed file and warns above 16 MiB, so the practical limit is a .yft and a _hi.yft that each stay at or under that size.
- What lodDistances should I use for an add-on car?
- The stock Sultan uses 10, 25, 50, 100, 500, 500 and is a safe starting point. Each value ends one level: _hi, High, Medium, Low, Very Low, then fade out.
- How do I make LODs in Sollumz?
- Use Sollumz Tools > Drawables > LOD Tools > Auto LOD. Pick the reference mesh, tick the levels to create and press Generate LODs. Then check lights and silhouette by hand.
- What texture size is best for FiveM vehicles?
- We use 2048 for the livery or main atlas, 1024 for the body normal map and tyres, 512 for tiling details and 256 for small interior parts, all in DXT1 or DXT5.
- Does the _hi.yft count towards the 16 MiB check?
- Each file is checked on its own. The .yft, the _hi.yft and the .ytd each have to stay at or under 16 MiB to keep the console quiet.
Sources
- FXServer source: asset size check (ResourceStreamComponent.cpp)
- Sollumz, Blender add-on for GTA V assets
Products from this guide
- Coil S-Cooter: FiveM Electric Scooter
- Airglider: FiveM Hoverboard
- Girlboard: FiveM Hoverboard
- Neonboard: FiveM Hoverboard
All guides
- How to install a FiveM resource from Cfx.re Escrow (Granted Assets)
- How to add a custom vehicle to an ESX, QBCore or QBox server
- What are LODs in FiveM vehicles?
- How to add an add-on vehicle to a FiveM server
- vehicles.meta explained, field by field
- handling.meta explained: fields, units and flags
- carvariations.meta and carcols.meta explained
- vehiclelayouts.meta explained: seats, entry points and animations
- fxmanifest data_file reference for vehicles
- Vehicle model files (yft, _hi.yft, ytd) and the oversized asset warning
- FiveM add-on vehicle troubleshooting: causes and fixes
- How to fix "You lack the required entitlement" on a FiveM server
- How to convert a single-player GTA 5 car mod to a FiveM add-on
- How a FiveM hoverboard works without a script
- How to make a FiveM vehicle in Blender with Sollumz 2.9
- How to set up vehicle collision in Sollumz
- Buying FiveM vehicles: what to check before you pay
- FiveM car packs vs single vehicles
- Real-brand cars on FiveM: allowed or not?
- CodeWalker vs Sollumz: which tool for FiveM vehicles?
