Dev Tutorial Using dynamic, "internet-based" textures within OMSI 2 (1 Viewer)

Introduction

You may have seen it with some buses, but it is actually possible to download images via the internet and use them directly within OMSI 2!

Take V3D's E200MMC - the screens on the passenger display inside the bus are actually downloaded and then dynamically outputted on the screen - I will show you how you can do this for your project. The great thing about this is that it's not limited to just buses, you could also use it for sceneryobject textures (e.g. adverts).

Usage

Open your OMSI 2 directory, and go to the "Texture" folder. You should hopefully see lots of textures already in there - what we're interested in is creating our file which will call for the files. This is very easy to do:
  • make sure your file extensions are turned on (Top of Windows Explorer -> "View" tab -> File name extensions (ON))
  • right click and create a new text file
  • Call it whatever you like, but change the .txt part to .itx
  • Press enter to commit your changes
Open that file you have just created in a text editor of your choice (e.g. Notepad, Notepad++) - it doens't matter which!

You will see a blank file - we will add some text in this format:
  1. The HTTP (I couldn't get HTTPs to work) URL
  2. The directory to save the file to (can be anywhere within OMSI 2 folder)
For example, I have got the following in my Test.itx file:
Code:
http://projekt-gladbeck.de/inbus_img/1.jpg <-- the HTTP host
Texture\Test1.jpg             <-- the directory to save the file (the filename doesn't have to match the host filename)

Save it - then run OMSI 2. The texture download is called as soon as OMSI starts up - if it works, you should see a file in your directory you specified:

explorer_0fSYD0as1n.png


If you don't, there's probabably something wrong with the host. Even if you specify HTTP, the host may redirect you to HTTPS - this will not work.

I've used the root Texture folder for my example - this can be saved ANYWHERE in your OMSI 2 folder (sceneryobjects, vehicles). If you want multiple textures at once, this is possible:
Code:
http://projekt-gladbeck.de/inbus_img/1.jpg <-- the HTTP host
Texture\Test1.jpg             <-- the directory to save the file (the filename doesn't have to match the host filename)
    <-- blank line - IMPORTANT!
http://projekt-gladbeck.de/inbus_img/1.jpg <-- the HTTP host
Texture\Test2.jpg             <-- the directory to save the file (the filename doesn't have to match the host filename)

If you have a question, ask me below and I will try to answer it!

~ Kyle C
 
  • Like
Reactions: GalWhv69
This thread is more than 3 years old.

Your message may be considered spam for the following reasons:

Users who are viewing this thread