====== How to create models for MTR ======
This guide will tell you how to create models for MTR mod.
===== Before we get started =====
Minecraft Transit Railway mod utilises **Blockbench models (BBMODEL)** for all train models. Starting from MTR4, one can also import Wavefront OBJ models for the mod, but that will not be discussed in this tutorial. There are no de facto standards or best practices for creating a model; however, this tutorial will teach you how to create a model based on the built-in models.
You can get Blockbench [[https://www.blockbench.net/|here]].
===== How a train model is formed =====
Typically, a train is formed of several parts:
- **window**: The window of a carriage.
- **door**: The doors of a carriage.
- **head**: The front / back of a carriage with a driving cab.
- **end**: The front / back of a carriage without a driving cab.
In most cases, a train model is a combination of these parts in the following pattern:
* Leading vehicle: head-(door-window)-end
* Intermediate vehicle: end-(door-window)-end
* Back vehicle: end-(door-window)-head
There’s an example of a 4-car train
''(Head) Leading vehicle (end)'' ''(end) Intermediate vehicle (end)'' ''(end) Intermediate vehicle (end)'' ''(end) Back vehicle (head)''
<—forward
Most trains will have a window part to be around 48 Blockbench units (3m) in length, and a door part to be around 32 Blockbench units (2m) in length. This makes the train able to align with the platform screen doors. The end part is usually around 16 Blockbench units to 20 units (1m to 1.25m) in length, so there is enough space for the train to take a turn.
Most trains' bodies will be 16 Blockbench units (1 metre) above ground to allow them to match the height of the platform, and have a width of around 40 to 44 Blockbench units (2.5 to 2.75m) so that the platform gap won't be too wide.
===== Initialisation =====
* In the main menu, select **Modded Entity**.
| {{ :mtr_extra:resourcepack:make:select_modded_entity.png?200 }} |
| **ONLY** use the Modded Entity option. Other options will not work with MTR mod. |
* Type in a file name.
* Click **Confirm**.
| {{ :mtr_extra:resourcepack:make:modded_entity_options.png?200 }} |
| **ONLY** use alphanumeric characters, 0-9, -, and _. CAPITAL LETTERS, \\ special characters, white spaces, and other characters will not work. |
It is not necessary to modify any other parameters in this stage other than the file name, as MTR will just work fine with all the models in place.
===== Building your model =====
| {{ :mtr_extra:resourcepack:make:screenshot_2025-11-20_110539.png?200 }} |
| Creating a train is a long process and takes time. \\ You may find it hard at first, but when you get into the \\ way of making a train, you'll find it easy. |
For each part, repeat this process:
* Create a folder (Ctrl + G) and give a meaningful name, e.g, "window".
* You can now start building your model. Create a cube (Ctrl + N) and translate, rotate, and scale it to your liking.
==== Note ====
* You can't scale a cube in decimal values. You have to scale it to integer values. However, you may use inflate to "scale" it to decimal values for certain parts, such as handrails.
* Any rotation applied to a folder will be ignored. To rotate cubes in a folder, select all cubes in a folder, centre the pivot, and rotate.
* Display will only render at the "front" side of the cube. To check if your cube is facing front, when selecting the cube in {{:mtr_extra:resourcepack:make:local.png?50}} rotation space, the X axis (the red arrow) should face leftwards, the Y axis (green arrow) facing upwards, and Z axis (blue arrow) facing backwards.
* It is OK to make some of the cubes overlap another one (see image) - Just draw the overlapped parts of that cube transparent.
| {{ :mtr_extra:resourcepack:make:before.png?200 }} | {{ :mtr_extra:resourcepack:make:after.png?200 }} |
| Left: before texturing, Right: after texturing ||
===== Creating texture =====
- Show ALL cubes, and hide all cubes that:
* Do not need textures (floor, seat, display)
* Will share the same UV position as another cube
- Hover to TEXTURES on the left and click Create Texture (The second icon), or just press ''Ctrl + Shift + T''.
- Select a name for your texture. Remember the naming rules we talked about above.
- Select a pixel density that seems appropriate.
* Core mod trains use 64x density, but the texture is usually generated at 16x, then resized 4 times bigger to get the 64x texture.
* Having a lot of cubes and selecting a higher pixel density may cause longer generation time.
- Deselect option ''Power of 2 size''.
- Click Confirm. Give it some time to generate the texture.
Now your texture is ready. Save the texture, and you're ready to give your train a texture.
==== Note ====
* UV for cubes with a size of 0 on more than 1 axis will not be generated. You will have to use the small spaces provided at the rightmost to define the colours for these cubes.
* It is unnecessary for all faces of a cube to be coloured. They can be transparent. (That's why you don't have to use 100 cubes just to make a hole in a wall)
* You should make use of the Blockbench paint mode along with your raster graphics editor.
===== Next steps =====
As you finished your model and you're happy with what you've done, it's time to put it in the game. Check this tutorial out: [[resourcepack:make:rp_creator|Resource Pack Creator]]