Docs / Making content / Modding overview
Models
Model formats#
A [mesh] (and every other place that names a mesh) may point to a glTF/GLB, FBX or
OBJ file as well as .o3d and .x. The format is detected from the file's content.
- The model is read as the modelling tool shows it: exported from Blender with the vehicle's
front along +Y, as for an
.o3d. - Units are metres. FBX files may use any unit.
- Every node's transform is applied.
- Materials keep their base colour and colour texture. The material is named after the
picture's file name, so
[matl] <picture> <n>in the.cfgworks as for an.o3d. - A texture is found beside the model or in a
texturefolder beside it. A texture packed into a.glbor.fbxis read from the file. - Skins (bone names and weights) and blend shapes are kept.
- FBX can be ASCII or binary of any version. OBJ reads its
.mtl(Kd,d,map_Kd) and any polygon.
.o3d files with 32-bit indices (the long-index flag) are drawn with their full vertex and face
count.
Mesh visibility#
A mesh can have several visibility conditions, so no script is needed to show a mesh by two variables at once.
[mesh]
door_light.o3d
[visible_range]
door_open
0.5
1.5
[visible]
lights_on
1[visible_range]takes a variable, a lowest and a highest value. The mesh shows while the variable is between them, both ends included.- Once a mesh has a
[visible_range], a!or a||, all its conditions must hold. - With only plain
[visible]blocks, OMSI 2's rule stays: the last one counts. To combine two variables, write one of them as a[visible_range]around its value. - A
!after the variable name negates the condition.door_open !with1shows the mesh while the door is not open. On a[visible_range]it means "outside the range". - A line
||between blocks starts another group. The mesh shows when all conditions before it hold, or all conditions after it. - A variable the vehicle does not have reads 0, as in OMSI 2.
Interior lamps#
OMSI 2 lights a mesh with at most four [interiorlight] lamps, the four numbers of its
[illumination_interior]. openOMSI reads up to 63. Write the extra lamp numbers on the lines
after the first four. A blank line ends the list.
[mesh]
saloon.o3d
[illumination_interior]
0
1
2
3
4
5
6
7OMSI 2 reads the first four and skips the rest. The same works in passengercabin.cfg.
Light-emitting meshes#
[light_emitter_interior] after a [mesh] turns the mesh's light-mapped parts into lamps that
light the saloon, from what the texture shows. Use it for ceiling light strips, a lit
destination sign's back, an illuminated advert, a ticket machine's glow.
[mesh]
saloon_lights.o3d
[light_emitter_interior]
1.5
4
lights_innen- Every line after the tag is optional. A blank line or the next keyword ends it.
- Line 1: the strength (
1= as bright as the texture shows). Default1. - Line 2: the most lamps it may make (1 to 16). Default
4. - Line 3: the variable that switches the light. Default: the
[matl_lightmap]'s variable.
- Line 1: the strength (
- The mesh needs a
[matl_lightmap]or[matl_nightmap]. A night map alone has no switch: give the variable on line 3. - openOMSI samples the map on every triangle of those materials. The lit triangles are
gathered into groups, and each group becomes an
[interiorlight]at the centre of its light, in its light's colour. A bigger and brighter lit area reaches further. - The lamps are added to every mesh that has an
[illumination_interior], so the seats, floor and walls are lit by them, and they cast shadows like the other saloon lamps. - OMSI 2 skips the tag.
Glowing materials#
[matl_glow] <texture> <value> after a [matl] makes the material its own light.
- The texture is a greyscale mask: white shines fully, black not at all.
- The light has the material's own colour.
valueis the brightness on the scale of the LED glow setting:6matches that setting's default,20is brighter than its maximum. The setting itself does not scale it.- It shows by day and by night, in every graphics mode. Enhanced draws it brighter than white
with a glow round it; Vanilla and Vanilla+ hold it at the material's full colour
(
6, the default's match, and more is full,3half). - A material that also has a
[matl_lightmap]keeps the light map and does not glow. - For a switched glow (a tail lamp), put it on a
[matl_item]of a[matl_change].
[led_glow_effect] <value> (0 to 1) says how much an LED panel's dots glow: 1 is the full
LED glow setting, 0.5 half of it, 0 means the material is no LED panel. Without it,
openOMSI guesses: a material with a \S:n script mask and an all-white light map counts as an
LED panel.
Both keywords are described in full in File formats.
Something wrong or missing? Fix it on GitHub or open an issue.