The ETS2 game use a common lighting technique for an object geometry, when the mesh is lit by any light source. It uses vertices normal directions to determine the level of shading, it produces smooth shading across polygons using normals of respective vertices.
But what happens when the object is not lit because of an obstacle casting a shadow to surface? The game engine will not compute lighting at all, assuming the light does not reach the surface. The ambient light (very dark) is used as an overal scene lighting, and the shadowed polygons appears like they are flat or look like 2D sprite on your screen. Unlit polygons shaded this way are complete unreal since this kind of shading does not reflect in real life experience. Most of the objects inside a shadow of the shadow-caster object are about to be lit by reflected light from other neighbour surfaces. Even an object casting shadows to itself will generally reflect some light to itself too. As a result, some areas of an object would get light even been in a shadow of an obstacle-object. And some areas (hard to reach) would not get any reflected light.
The reflected light is hard to compute in realtime, and nearly impossible for dynamic or moving parts. The consideration made is to compute reflected light on a mesh to be static, or literally "precomputed". The volume of light that could reach the surface is generally the brightness of the object in shadow. In other words, the less direct or reflected light could reach the surface - the darker the surface will be in a shadow
. The technique is well known as "ambient occlusion". It is a precomputed shading that adds some darkening to surfaces in areas where light will barely reach the surface, even reflected.
The technique is computation expensive and barely used in realtime. Instead, a static computation used. ETS, GTS, ETS2 models store precomputed surface ambient occlusion on a diffuse map (also known as "baked" shading) and
(the most important) it stores shading on per-vertex level. Literally, each vertex has a color from dark-gray to bright-gray in order to emulate ambient occlusion shading. This is a very fast for rendering in game at almost no cost, so each mesh in ETS has a precomuted shading.
What will happen if you don't use prelit vertices color? The vertex color will remain bright white (the default color) assuming the vertex is potentially easily reachable by reflected light. Such a model will appear to be much brighter in shadows than the rest of scene, and the model will be kinda a horse of another colour.
You can enable Diffuse color
in format of a vertices on your models, but you don't need to paint this color. Instead, ZModeler tools will do the computation and paint vertices respectively.
The video guide will show you an easy way to create per-vertex prelt color for a model in ZModeler. The first part will prelt the truck model:
The second part is for interior model and uses mostly the same methods as the first one:
Complexity level: Intermediate.
Time required: 5-30 minutes.