Diesel Railcar Simulator

Diesel Railcar Simulator

Not enough ratings
Importing custom 3D-models
By Lapioware
How to import your own 3D-models to the route and train editors
   
Award
Favorite
Favorited
Unfavorite
File formats
You can import 3D-models made with an external program (like Blender) to the route and train editors by saving or exporting the models in .obj or .fbx format.

Textures can be imported in .dds, .tga, .png or .jpg format.
Importing to route editor
Click on your route in the main menu and choose "Open folder" to see where the route has been saved. Export your model and save it to the route folder.

In the route editor, click on the "Custom" button at the top of the side panel to add a template node. In the node properties, set model source as "model files". Your exported model file should now appear in the model id drop-down menu. If everything works correctly, the model becomes visible once you try to place it from the "Objects" button at the top of the side panel.

Please see the end of the Route editor feature showcase video for a short demonstration of how to import a model.
Importing to train editor
Click on your train in the main menu and choose "Open folder" to see where the train has been saved. Export your model and save it to the train folder.

In the train editor, open the model node properties either by left-clicking on a highlighted (yellow) part of the train or by opening the list of model nodes from the top of the side panel. In the node properties, set model source as "model files". Your exported model file should now appear in the model id drop-down menu. If everything works correctly, the model should become visible in the 3D-view once you click on it in the menu.
Overriding materials
Sometimes materials and textures are not imported correctly. In this case you can override the automatically imported materials with manually defined ones.

In the route editor click on the [...] button at the top of the side panel and select "Materials (custom models)".

In the train editor click on the "Materials" button at the top of the side panel.

When adding a custom material, hold the mouse pointer over each field to see the associated tooltip. See also Unity standard shader metallic calibration chart[docs.unity3d.com] for visual explanation of the various textures and RGB ranges used by the renderer.

In order to apply the custom material, open the properties of the custom model node (the one you added following the instructions in the previous two chapters) and add one or more node materials from the side panel. Material overrides can also be added for built-in models in the same way.

Asset packing (optional but recommended)
The editors have a packing tool that can merge multiple asset files into a single pack file. The tool supports packing 3D-models (meshes) and textures.

The purpose of packing is to bundle files together in a format that is not easily accessible to the normal user. This is a requirement for using many commercial 3D-models licensed from sites like CGTrader and TurboSquid.

Packing your assets is also recommended because loading them from the pack is more performant than loading them from individual raw files. For example, the tool resizes textures to power-of-two dimensions and stores them in compressed DXT format. It also converts meshes to proprietary DRS format for quick loading. Note that the original files are not affected, only the output that goes into the pack file.

In the route editor click on the [...] button and select "Edit route properties" to access the packing tool.

In the train editor click on the [...] button and select "Edit metadata" to access the packing tool.

Upon first pressing the "Update pack" button, the tool will create an empty folder under your Windows profile. The path will be something like:
C:\Users\[Your_profile_here]\AppData\LocalLow\Lapioware\Diesel Railcar Simulator\Packing source\[Route_or_train_ID]

Using the tool:
  1. Click on the "Update pack" button to have the source folder created
  2. Locate the folder and move there the files that need packing (meshes, materials, textures), preserving the possible subfolder structure
  3. Click on the button again to pack the moved files (the program can hang for minutes until the packing process is complete)
  4. The editor refreshes automatically and the assets should reload normally
  5. There should now be a file called "pack2" in the original route/vehicle folder

You can mix packed and plain assets while working in the editors, but it's recommended to pack finished models and textures as you go along, since they usually load faster from the pack.

Support for loading unpacked assets may be phased out in 2025.

If the program crashes hard after packing models, it might be because one of your meshes has too many vertices (over 65000). Split large meshes into smaller ones if necessary.
2 Comments
Lapioware  [author] Nov 21, 2023 @ 3:52am 
Updated Asset Packing section (Scenery patch 7)
Lapioware  [author] Sep 22, 2023 @ 12:24pm 
Guide updated to match the changes done in Scenery patch 5