Models and Textures - derail-valley-modding/custom-car-loader GitHub Wiki
In order to provide a good experience to players, it is important to keep a good balance between fidelity and playability.
This entire page is just a guideline, and the values used here are just for reference. You can do more or less detailed models/textures as you wish, but consider the usability of your custom cars.
Models
Vertex count
Cars
Cars are the simplest rolling stock in terms of model detail. A complex model like the passenger coach uses over 26k vertices, boxcars are around 17.5k, and simpler models like flatbeds can use as low as 6k, so in most cases you should keep to a maximum of 20k vertices.
Locomotives
Locomotives are the most complex models in DV, as they see the most interaction with the player, and there are fewer instances of them in the world at a given time (in normal circumstances). Besides their higher vertex count, they are also made of multiple meshes at once, for all interactive parts.
The exterior models of a simple locomotive like the DH4 can use just 25k verts, DE6 and DM3 hover around 34k, and the S060 and S282 go as high as 56k.
The interior models are no less complex. The S060's cab hits almost 64k, and even the Microshunter has 28.5k vertices in the cab, versus only 18k for the outside model.
Finally, there's the interactable objects, which are explored in more detail in the Other section below.
Cargo
Cargo has slightly lower average counts compared to cars. As a rule of thumb, you should stay under 10k vertices.
Bogies/Wheels
The default bogie uses 5.1k vertices. Locomotive bogies are allowed higher complexity, going as high as 14k for the DH4.
Valve gear pieces and wheels should not go higher than 2k vertices each.
Other
Besides the exterior and interior of vehicles, there are also separate meshes for each interactable part. This includes all controls (levers, valves, buttons...), doors, windows, and lights. These parts can go as high as 1k vertices. Most of them are disabled when the player isn't inside the locomotive.
Levels of detail (LOD)
All the detail a model has is wasted performance if it cannot be seen. This is where LODs come in. You should check Unity's documentation on LODs before proceeding.
Depending on a model's complexity, DV uses from just 3 levels to 5. The container cargo uses 3, while new and imported cars use 5 levels. Most rolling stock has 4 levels.
A good rule to follow in terms of complexity is to decrease the vertex count by 50% for each level.
Textures
Resolution
Texture sizes should use powers of 2 for their heights/widths for best performance in Unity.
Cars
Almost all cars use either a 2048x2048 or a 1024x1024 texture.
Locomotives
Since locomotives see more player activity, most use a 2048x2048 texture (4 times the area of a car's texture) for their exteriors.
The interior goes even higher, with most using a 4096x4096 texture. Besides this, there's also 2 separate textures for the gauges, a normal and lit one, and depending on the number of gauges it can be a 1024x1024 or 2048x1024 texture.
Cargo
Cargo usually uses either a 2048x2048 or a 1024x1024 texture.