Diesel Railcar Simulator

Diesel Railcar Simulator

Not enough ratings
Train editor: A quick & easy way to import custom decals
By bricksathome
This guide demonstrates an easy method for creating and importing any image as a custom model in the train editor. No prior modelling experience is required, but basic image manipulation may be required based on the decal you want to create.
   
Award
Favorite
Favorited
Unfavorite
Introduction
This guide aims to show a quick and easy method for creating and importing custom 2D decals as custom models into the train editor, absolutely zero computer modelling skill is required but the guide assumes you have basic image manipulation skills and that you have a decent understanding of the train editor.

Required Programs
- An image editor - if your decal isn't a rectangle image you will need an image editor capable of exporting PNGs with transparency (paint.net, GIMP, Photoshop etc)

-Blender - This free modelling software will turn your image into a 2D plane that can be exported as a model. In this guide I'll be using Blender 2.8.
Creating the image
To create a custom decal you'll need an image, you can either create an image from scratch or find and existing design on the internet.

Make sure the image you use doesn't have a solid fill background, you may have to edit the image to remove the background. In my example I am using a British Railways emblem and the images below show how I have removed the green background using the magic wand tool in Photoshop.





Before saving your image is is a good idea to crop the image as much as possible to remove any unnecessary transparent borders.



Once you have done this save the image as a .PNG

Setting up Blender
In order to import our image we need to enable a built in Blender Add-on.

Open Blender and click on 'edit' in the top left and then preferences at the bottom of the list that shows up (shown below)



On the window that opens select 'Add Ons' and then in the top right of the window search for 'import'.
Then enable 'Import images as planes'



Now close the box and we've finished setting up Blender.
Converting the image into a model
Now that Blender is set up we can convert our image into a model that can be imported into Diesel Railcar Simulator.

With Blender open you should see a grey cube on a dark grey grid background, select this cube by left-clicking on it and press the 'delete' key on your keyboard. This should delete the cube.


Now head to 'file' in the top left of the window, expand the 'import' list and select 'Images as Planes'


In the window that opens navigate to the location where you saved your image, select it and press 'Import images as planes'


You should now see a flat grey object appear on the dark grey grid:

This is your image, you wont be able to see the actual texture yet, but it is there. If you want to confirm if everything so far has worked you can press 'F12' to render the image, if you see your texture when it loads it means it's working.

The final step in Blender is to export this object as a 3D model, head to 'file', expand 'export' and select 'wavefront .obj'


Select a location and a name to save your decal as and then press 'export .obj'
Importing the model into Diesel Railcar Sim
To import the model into Diesel Railcar Simulator we need to move the files we just exported from Blender into the vehicle files of the train you are editing in Diesel Railcar Simulator.

In the windows taskbar search window search '%appdata%' and open the folder.


This will open the 'Roaming' folder, move one folder back into the 'AppData' folder


From here you should see three folders, select 'LocalLow' and then inside that select 'Lapioware' then 'Diesel Railcar Simulator' and then 'Vehicles'

Open the folder corresponding to the vehicle you are editing, if this is the last vehicle you have saved in the train editor then it's folder is the one with the most recent 'Date modified' time

With this folder open you should see a 'vehicle' file. It is here that you should paste the files that you exported in Blender, these are the .obj and .mtl files.
Opening the model in the train editor
The final step is to apply the model onto your train. Open your train in the Train Editor and right click on the part of the train that you wish to apply the decal to. In my case this is the body, so I right click on the body and then select 'edit body 17 'body''


From here right-click on the 'ModelNode' dropdown and add a ParentModelNode


Give the node a name and then change the 'modelSource' box to 'Model files'. Leave the 'modelled' box as '(none)' for now as this list doesn't update until you press the 'ok' button


Once you press 'ok' you can reselect the node you just created from the list and change the '(none)' box to the correct model.


Remember to change the models position to a place where you can see the model.

And then you're done! just position the model how you desire on the train.
1 Comments
Lapioware  [developer] May 27, 2020 @ 9:33am 
Brilliant, thanks for taking the time to write this!
It may be possible to skip the Blender phase by copying a suitable logo (.obj and .mtl) from another train and changing the image. The decal dimensions can be changed by editing the .obj with a text editor like Notepad. The image name can also be changed from the .mtl file (again using Notepad)