Import Model ACPC

Important: this tutorial assumes that you have already extracted 3d models and textures from ACPC and explains how to import them as a mod into ACNH.

It should also works for importing any .obj 3d models.

## Chose a template to inject the model

First of all, you will have to choose an ACNH model to replace/inject the model.

Generally you want a model with the right bounding box (collisions) and the right material.

In this tutorial we will use one of theses two basic models, with the simplest material possible:

* `FtrCucumberHorse.Nin_NX_NVN.zs`
* `FtrEggplantCow.Nin_NX_NVN.zs`

## Import in Toolbox

Drag and drop your model on toolbox. You should see a little folder. Press on [+] to expand it's content.

Press on **output.bfres** to see a 3d scene with your model inside. If it's not the case, press two times on the [3D] icon on top.

Expand the content of the folder to get the same structure as in this image.

Now you want to replace the geometry with your .obj model from ACPC.

In **Objects**, right click on your model then select **Replace (Static)** (Ctrl+R).

A file selector window will open. Explore your hard drive and select the 3d model you want to import (.obj) and press Open.
A small popup will open. Uncheck **Generate Normals** and **Join Duped Vertices**.

This step is IMPORTANT. If you *don't* leave these two boxes unchecked, your model will not render correctly when imported into the game, even if it looks right in Toolbox.

Another small window will open. Select the meshes you want to import and press Ok.

Uncheck **Use material**. Save.

### Resize the model

When imported, ACPC models are too small and you have to scale them by 100.

Right click on the model > Transform (Ctrl + T).

In the Scale line, select 100.0 for X, Y and Z. Press **Update Transforms** then Ok.

## Textures and Materials

When imported, the model will use the current textures of the object.

Obviously, this will look off.

This model is the simplest you can find in ACPC, and has only one texture.

In this simple case, we can use the basic material currently associated to the object, that uses only three textures:

1. Albedo (Alb)
2. Mix
3. Normals (Nm)

### Albedo

The albedo texture is the color texture. Replace it by the extracted texture of your model.

Right click on mBody\_Alb > Replace.

#### Possible problem: weird textures

In some cases the texture look off, as if the UV were broken. For example here on the seat.

Note also the weird texture, as if it were dirty. It is caused by the Normal texture and is not related to the UV problem.

The UV problem is caused because UVs are out of the bounds of the texture, as you can see in the UV Editor (Accessible in the UV Viewer menu).

Note: **you don't need to open this menu**, it is only here to explain the problem.

It can be fixed easily in the associated Texture of the Material.
First open the material menu by clicking on the material.

The material menu will open on the right. Press on the Alb texture.

A texture configuration menu will appear below in the Textures tab.

Set **Wrap X** and **Wrap Y** to **Mirror**. You should do that for each non empty texture.

    When fixed, the model look like this:

    Note: You can select the Diffuse shading in the **Shading** menu. It will show only the Albedo texture on the model, and hide Mix/Normals:

### Mix

The mix texture use each channel of a RGBA image to setup special textures used by the shader.

Each channel is associated to an effect:

* Red for roughness
* Green for metalness
* Blue for AO (ambiant occlusion)

Models from ACPC don't have any mix texture, so you should add a default mix texture.

A default mix texture is a plain image of the color (0, 128, 128) with the RGB order. You can also use a (0, 255, 255) if your model is too dark with 128.

As for the albedo texture, replace the mix texture with a newly created plain texture, that should looks like this:

You can use this texture, but **only if it's a .png file** (fandom might convert it to .webp automatically, so be careful).

**IMPORTANT**: Mix textures should be imported (replaced) with the format `**BC1\_UNORM**, and the texture size should be a power of two (like 64x64).`

`You can use the same size than the Albedo texture if you want to draw a custom mix texture. If not, use a small texture to save memory and avoid slow loading.`

If the mix texture is not set correctly, the model can be totally black when imported in game.

### Normal

The normal texture allows to add a fake relief on models, without adding geometry.

ACPC models don't have any normal texture, so you should create a default plain normal texture.

It works like for the mix texture, except you will use:

* The plain color (128, 128, 0)
* The `**BC5\_SNORM** format`
* `Red, Green, Zero, One`

## Export

When you model is complete, you just need to export it so you can use the mod in your game.

Right click on the archive > Save

When toolbox ask for "Compress file with ZSTD" select **Yes**.