> For the complete documentation index, see [llms.txt](https://mr-mezzo.gitbook.io/mezzos-railroad-blocks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mr-mezzo.gitbook.io/mezzos-railroad-blocks/custom-elements/custom-railroad-barriers/creating-the-model.md).

# Creating the model

{% hint style="info" %}
It is recommended to have some experience with modelling. Before you start, make sure Blockbench is installed. No additional plugins are required for this tutorial.
{% endhint %}

{% hint style="info" %}
Blockbench version used in this documentation: V 5.1.6
{% endhint %}

1. Download and install Blockbench [Download from official website](https://www.blockbench.net/downloads)

## Start modelling

1. Create a new **Modded Entity** project in Blockbench. Railroad Blocks only supports this project type, so using Java Block or other formats will not work.

<div align="left"><figure><img src="/files/Rj4ESn0n9LhYsae8yzEJ" alt="" width="563"><figcaption></figcaption></figure></div>

2. Fill out the required information: Choose a unique file name using only lowercase / uppercase letters. This name will later be used, so changing it afterwards is not recommended. I recommend the UV size to be <mark style="color:$success;">**128 x 128**</mark>. (Not 256x256 in the picture). Click confirm.&#x20;

<div align="left"><figure><img src="/files/C7FJQV84eb3EIi6vbA9K" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
When you are creating the model for Fabric 1.17+ you need to select the Export Version as Fabric 1.17+

Before that, make sure Mezzos Railroad Blocks supports custom models for Fabric [Version Support](/mezzos-railroad-blocks/custom-elements/custom-railroad-barriers/version-support.md)
{% endhint %}

## Create the model

Now you can start creating!&#x20;

#### ⚠️Important⚠️

Make sure to create groups in Blockbench for your animations. Animations are created with groups. Place related cubes inside folders. These folders are used by Railroad Blocks to identify movable parts and apply animations correctly.

<details>

<summary>Example</summary>

The base model is in a group with all its elements and cubes.

The barrier model is in a group with all its elements and cubes: later, we want to move these cubes up and down (open/close): only the cubes inside this groups will be moving.

</details>

<details>

<summary>Example groups</summary>

<div align="left"><figure><img src="/files/ACQ77EZs4m5fBE9FAtXG" alt="" width="153"><figcaption></figcaption></figure></div>

</details>

It is the best to model the barrier in its default state, as this simplifies the animation process later. Because a railroad barrier is open most of the time — only closing when a train approaches — you should build the model with the barrier in the open position.

Every moving part needs its pivot in the correct position. The pivot is the point around which the object rotates. An incorrect pivot will cause animations to rotate around the wrong location. You can use the pivot point tool to move the pivot of the selected group. Select your barrier group and use the tool to apply the pivot point correctly.

### Start painting (texture)

To start painting, head to the "Paint" tab and right-click in the texture field (bottom-left) to create a new texture.

<details>

<summary>Screen</summary>

<div align="left"><figure><img src="/files/9Rvv0ta6RVK8bg6FFmR1" alt="" width="479"><figcaption></figcaption></figure></div>

</details>

You should select "Blank" and make sure that the Resolution is the same as the project scale (UV-size - 128x128). Click confirm and start painting.

When finished modelling and painting the texture you can move on with the next step: creating your  animations!

## Help

<details>

<summary>UV Mappings</summary>

Go to the "Edit" Tab, on the left, go to UV: Make sure your modelparts and cubes do not overlap. Click and drag them somewhere free.

<div align="left"><figure><img src="/files/8L3HaKApeed4v5xKE7cQ" alt="" width="203"><figcaption></figcaption></figure></div>

</details>
