Internet textures

Bald ist es soweit: Unsere nächste Leitstellenfahrt findet statt. Weitere Informationen findet ihr hier.

  • With Internet textures, textures can be dynamically downloaded from the Internet by OMSI and reused on objects or vehicles, such as advertisements for a publisher's DLCs.

    In order for OMSI to download textures from the Internet, the following two pieces of information are required:

    • URL where the texture is located (e.g. a web server)
    • File path where the downloaded texture is saved

    This information is provided to OMSI via .itx files. These files are pure text files located under the main directory in the Texture folder. Unlike many other files in OMSI, they are structured without keywords.


    As a developer you should make sure that the given URL is permanently available.

    1. Structure of .itx files

    .itx files are structured as follows:

    1. URL of the texture
    2. Path where the texture should be saved and file name
    3. At least one blank line

    Slashes in the URL are "simple" slashes directed to the right (usually SHIFT + 7); whereas slashes in paths are "reversed" slashes directed to the left (usually ALT GR +ß or CTRL + ALT + ß)

    1.1. URL

    The following conditions are imposed on the URL:

    • It must be absolute and complete, i.e. start with http:// or https://.
    • It must refer directly to the image. So a website containing the texture and other text would not be allowed. To make sure that the link is suitable for internet textures, you can right-click on the texture and then click on "Open image in new tab". The tab that opens should contain a suitable web address.
      Normally you can recognize a direct URL by the ending, e.g. .jpg. Pages ending in html or php are usually not direct links to an image

    1.2. Path

    .itx files are located in the folder \Texture directly in the OMSI main directory, the path to the actual texture starts with a folder in the main directory (Sceneryobjects, Vehicles etc.). The file names of URL and texture can be different.


    Attention: The diagonal stitches in path specifications are reversed as in the web address (\)!

    1.3. Downloadable file formats

    The file formats dds, tga, bmp and jpg can be downloaded (png is not supported). However, it must be noted that only one file format is downloaded and saved in a *.itx file.

    Possible:

    Code
    https://mywebsite.de/omsi-textures/poster_advertising_02.dds
    Sceneryobjects\Advertising posters\texture\Advertising\02.dds
    
    https://mywebsite.de/omsi-textures/poster_advertising_03.dds
    Sceneryobjects\Advertising posters\texture\Advertising\03.dds⠀⠀


    Not possible:

    Code
    https://mywebsite.de/omsi-textures/poster_advertising_02.dds
    Sceneryobjects\Advertising posters\texture\Advertising\02.dds
    
    /////// No more textures will be downloaded from here, as the following download has a different format:
    https://mywebsite.de/omsi-textures/poster_advertising_03.bmp
    Sceneryobjects\Advertising posters\texture\Advertising\03.bmp

    2. Example

    A .itx file named Advertising.itx is intended to download the texture https://mywebsite.de/omsi-textures/poster_advertising_01.dds and save it under Sceneryobjects/Advertising posters/texture/Advertising/01.dds.

    The file will look like this:

    Code: Texture\Advertising.itx
    https://mywebsite.de/omsi-textures/poster_advertising_01.dds
    Sceneryobjects\Advertising posters\texture\Advertising\01.dds⠀


    An .itx file can also contain several entries:

    Code: Sceneryobjects\advertising posters\advertising_multi.itx
    https://mywebsite.de/omsi-textures/poster_advertising_02.dds
    Sceneryobjects\Advertising posters\texture\Advertising\02.dds
    
    https://mywebsite.de/omsi-textures/poster_advertising_03.dds
    Sceneryobjects\Advertising posters\texture\Advertising\03.dds⠀⠀

    3. Error when downloading internet textures

    Often you read the following line(s) in log files:

    Code
        10:04:03 -  -       Information: Problem while getting file http://...jpg

    This error occurs when the PC has no active internet connection or the texture or URL is blank. Therefore developers should always deliver textures under this name (can also be 1×1px large textures), otherwise problems can occur if the textures cannot be downloaded and are not available.

Teilen

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.