Spline files (.sli)

  • Splines together with objects form the core content of a map. They are characterized by a 2D profile that is variable in length and curvature (radius and slope).

    In OMSI, splines are created using .sli files containing plain text. Since splines are freely rotatable and curves are also possible, only a two-dimensional profile is required. OMSI calculates the textures and curvature based on length, radius and gradient.


    3200-spline-jpg


    In the following the x-axis refers to the width, the z-axis to the height.

    1. Folder structure

    SLI files are the only files besides textures that are needed to create splines. They are located in the subfolder of Splines. The textures are always located in a subfolder texture as seen from the .sli files. See also texture.

    2. Structure of the .sli file

    The structure of the keywords is explained below. It should be noted that, viewed from the cross-section, the spline file is read from left to right. If you want to have the spline in the middle, it is recommended to work with negative and positive values (see above, where the left side is negative, the right side is positive): Usually the height of the lanes is 10cm (0.1m), the height of the sidewalk is 25cm (0.25m). These values are as far as possible an accepted norm and should be adhered to. In OMSI floating point numbers are always given with a decimal point!

    2.1. Height profile

    In many splines, a height profile is also defined, but its usefulness has not yet been verified.

    SyntaxDeclaration
    [hightprofile]
    {point 1}left x-value
    {point 2}right x-value
    {Height 1}Height at left x-value
    {Height 2}Height at right x-value

    Both pairs of values do not have to have the same value. For example, a slope from left to right or vice versa would also be possible.

    2.2. Texture Definition

    In this section the basic texture settings are made.

    SyntaxDeclarationexample
    [texture]Adds a specified texture (The following entries refer to this texture). OMSI accepts .dds, .tga and .bmp image files.[texture]
    Asphalt.bmp
    [matl_alpha]Determines whether the texture has transparency over the alpha channel of the texture:
    0 - no transparency
    1 - Full transparency (any transparency is interpreted as full transparency)
    2 - Partial transparency
    [matl_alpha]
    1
    [patchwork_chain]Defines a variation of the texture (see also contribution 77 by Marcel Kuhnt) This entry divides the texture into parts that can be varied lengthwise.[patchwork_chain]
    10
    AABAAAAAA
    11211114
    10011111
    {Length}The length of each segment.
    {Transitions}The type of transition of each segment, if there are different types. The transitions are marked with letters, the first transition determines the beginning of the texture, then it goes from segment to segment on the texture until the end (the number of characters in this line must always be one more than the number of segments in total).
    {Frequency}The frequency of each segment (between 1 and 9). The number of characters in this line determines the number of total segments on the texture that are evenly distributed.
    {Reflection}If the segment can be mirrored, a 1 is entered here, otherwise a 0.

    2.3. Texture application

    SyntaxApplication
    [profile]Defines a new surface with the specified texture. Two of the following entries exist for each entry. The zero-based index of the texture follows.
    [profilepnt]Adds a new point with the following data:
    {x-coordinate}The x-coordinate of the point.
    {Height}The height of the point.
    {x-texture point}The x-coordinate of the texture at the specified point in %. It can be calculated as follows: x-pixel / width. It is recommended to use the values 0.005 and 0.995 instead of 0 or 1.
    {Stretch factor}Stretch factor of the texture, which is calculated as follows: 1 / length of the full texture in meters.

    2.4. Paths

    To allow traffic to flow on the spline, paths must be defined. This is done according to the following pattern:

    SyntaxDeclaration
    [path]Defines a new path
    {type}0: Road vehicles (buses, cars, motorcycles)
    1: People
    2: Railway vehicles (trains, metros)
    3: Aircraft
    {x-coordinate}The center of the path starting from the spline center.
    {z-coordinate}The height of the path. Again, a height of 0.25 (pedestrian) or 0.1 (road traffic) is recommended for normal roads.
    {width}The width of the path.
    {Direction}0: Forward (in the direction of the spline)
    1: Reverse (opposite to the direction of installation)
    2: Both directions (important e.g. for trains)

    3. Example files

    Attached are three example splines including textures:

    • Str_kaputt: A normal street spline with sidewalk and street lanes
    • Str_kaputt_var: A spline without sidewalk as an example for variable road damage. You can also see from the invisible sidewalk that paths do not necessarily require an area.
    • Weg_Kies_3m: A pedestrian spline as gravel path as an example for the use of transparent textures

Teilen

Kommentare 1

  • Ich würde das Bild oben vielleicht noch übersetzen ;-)

    Gefällt mir 1
CC BY-SA 4.0

Sämtliche Inhalte unseres OMSI-Wiki sind unter Creative Commons Namensnennung & Weitergabe unter gleichen Bedingungen (CC BY-SA 4.0) lizensiert.

Anzeige