# Animated 3D Items

## Creating the animated model

To create the models I use [BlockBench](https://blockbench.net/), it's very easy to use and fast.\
BlockBench [tutorials ](https://www.youtube.com/results?search_query=blockbench+tutorial)are available on YouTube.

{% hint style="danger" %}
You have to make sure to create your model as Java Block/Item model! Don't use Bedrock Model or Entity model!

<img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-89edc97c515e43fa50223ce0e9e7a60b41a35efc%2Fimage_(89)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(9)%20(1)%20(1)%20(1)%20(19).png?alt=media" alt="" data-size="original">
{% endhint %}

## Creating a very simple animation

For example I created this model, it's made of some cubes as you can see.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-9acbcd05a89f3f954c4b7eb8ff056e69edfca418%2Fimage_\(52\).png?alt=media)

Now we want to animate it!\
For example I want to make it float up and down.

### **Save** the **current model** in a temporary folder (anywhere on your PC)

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-a24b7dc68779f0d4b9184d5403f432baf7abbbab%2Fimage_\(53\).png?alt=media)

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-6a4396802a75a91666736c23f2f9a2405bffd491%2Fimage_\(56\).png?alt=media)

I saved it as **1.json** inside the temporary folder. This is the first frame of the **animation**.

### Return to **BlockBench** and select all pressing **`CTRL+A`**

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-ac31dd8797221d998167cb521cad106a8f1330e5%2Fimage_\(78\)%20\(1\).png?alt=media)

**Hold left mouse button** while clicking on the <mark style="color:green;">**GREEN**</mark> arrow, **hold `CTRL`** and **move** the mouse **up** a little bit.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-fd149b9a4a109d9b24465dabedaa67594b254d73%2Fimage_\(58\).png?alt=media)

**Save** the file again but change the name to `2.json`.\
Do the same thing for each frame you want. Each model holds a single frame of your animation.

### Merging the models into a single `.json` animation

Now we have finished creating the needed frames for our animation. Open [this website](https://lonedev6.github.io/animated-models/).\
**Click** on the **icon** to load our `json` frames.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-b572baa1222f3e1db3cf641fb593cc6f435eedb5%2Fimage_\(68\).png?alt=media)

Click on **`Choose files...`** and select your `json` files (the frames) and the `png` texture.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-7646581ac36afecffbe53affbb67ae95399ffb76%2Fimage_\(77\).png?alt=media)

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-94c9637338845f205081ab4e4d4f1a9606f96be5%2Fimage_\(69\).png?alt=media)

Click on **`LOAD`.**

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-1e991bb6a605dde6a0f9ba32e4449e452a8beb8c%2Fimage_\(70\).png?alt=media)

**Click** the **copy** icon (second icon) and **drag** and **drop** the **4 files** to the bottom line.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-c15112580a653060ea858511b7eece618f77639f%2Fimage_\(71\).png?alt=media)

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-e62d140234159f0d897cd08e9427de1454f12845%2Fimage_\(72\).png?alt=media)

You should have them like that.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-4bafdc73d27e60174bbea8ab3aedf877baba9794%2Fimage_\(73\).png?alt=media)

Drag and drop them again but in reverse (3-2, I skipped 1 and 4 because they would be useless for the animation).

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-e99d51f046a834a55df85b66a3ca8b7bb4e64628%2Fimage_\(75\).png?alt=media)

Press the **play** button (on the **bottom left**) to **preview** the animation

![](https://i.imgur.com/zslbD0G.gif)

Press **`Export`** button (**top right** of the **screen**) and provide a model path, you will use it later to reference the model, then press **`Export`** again.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-a40430425dd4c8d595feaf637e195484f21ce737%2Fimage%20(104).png?alt=media" alt=""><figcaption></figcaption></figure>

Now you will have a **`zip`** file with the animation, **download** it and **open** it.

**Extract** the `models` folder from the `zip` file into your **ItemsAdder** contents folder, for example `contents\myitems\models\`

Set your item configuration like this, to use the idle animation and not the stuck one: `item/cosmetic_mob_soul`

```yaml
info:
  namespace: myitems
items:
  cosmetic_mob_soul:
    display_name: Cosmetic Mob Soul
    permission: my_items
    resource:
      generate: false
      model_path: "item/cosmetic_mob_soul"
```

Use the command `/iazip` (if you're using external-host please follow the [tutorial](https://itemsadder.devs.beer/japanese/plugin-usage/resourcepack-hosting)carefully).

{% hint style="warning" %}
Do not open the animated model (exported from the website) with BlockBench or any other editing program or it will probably break and stop working.
{% endhint %}

{% hint style="info" %}
You can delete the 1-2-3-4.json files, you don't need them anymore (but you can backup them for future usage), you only need the idle.json file and the png+mcmeta files which are the animated files.
{% endhint %}
