# Anata VRM Assembly
[toc]
---
## Overview Video
{%youtube 6msK21SeqCc %}
Watch (unlisted): https://youtu.be/6msK21SeqCc
---
## Setup
- Male assets: Message `jin` for the link
- Male blends: Message `jin` for the link
- :star: Character Studio: **https://anata.dev/** :star:
- :star: Character Studio w/ Assets: **https://beta.anata.dev** :star:
Download one of 10 zips that has files for 100 Anatas and extract somewhere. Ask `jin` for link.
| [](https://hackmd.io/_uploads/HJKGP4r8p.png) | [](https://hackmd.io/_uploads/SyroKwoLp.png) |
| -------- | -------- |
The reference image contains the metadata in top left for the way assets will be layered in studio.

You can quickly preview the traits next to the thumbnails side by side by viewing the HTML in any of the Anata ID folders. Most common issues relate to the Hair or Clothing trait, either a different hair style or clothing retexture.

If you want to take notes more quickly, I recommend screen recording while talking through each Anata ID and then processing the video through https://fireflies.ai/. Here's an example I recorded: https://app.fireflies.ai/view/2023-12-15-13-35-59-mp4::9RQMzznRf1Fnj6Y7
I started the recording by stating the follow:
> "I'm going through all of the anatas and I will be describing any issues with each anata id designated by a number and I just want to record a bullet point of the number and any notes next to it as to any issues with that pertaining anata id."
and the AI was able to produce a neat bullet list like such:

:exclamation: **For deliverable put all of the fixed traits into 1 blend file per Anata ID! Like 208.blend**
---
## QA Pipeline
Go to **https://anata.dev** and select **Create Character**, then pick Feminine or Masculine, depending on which you're working on. If you're reading this, you'll probably pick **Masculine**.
| |  |
| -------- | -------- |
:::info
If you want to preview WITH assets pre-assembled, go to **https://beta.anata.dev** :star: then drag and drop one or more JSON files into the browser window.

- Male JSON: https://drive.proton.me/urls/N41S90R69M#Lpv9XskMTQip
- Female JSON: https://drive.proton.me/urls/3FMD8EMMTM#w0eNtBx9c1dE
Click the arrows in the top right SLOWLY, refresh if it bugs out.

:::
### 1. Change Texture
Swap the texture of any trait category by selecting the trait type then drag and dropping the texture into the browser window. Here I am swapping the body texture with the skin from the Anata ID folder, which has the eyes already baked in.

### 2. Overwrite Traits
Select the trait type then drag and drop the VRM file in to overwrite or add a new trait in.

Ignore the following trait types, we're not baking these into the avatar right now:
- Brace
- Sigil
- Weapon Brace
- ~~**Weapon**~~*
> ***Weapon** can look great baked in with the character, but we plan to later implement it in as an attachable instead of baking with the texture atlas of the character. Use your judgement.
### 3. (Optional): Round Tripping / Fixing Traits
If one of the traits is way off all you need to do is modify that VRM file and reinsert it. In most cases it is a simple texture swap, however some might require a different style mesh. If you want any of the source blend files, message `jin`.

If you want to replace the hair with another one to more closely match the reference image, we can find another hair style that closely matches from either the blend file or dev server:
- https://anata.dev/vrm/files/female/HAIR/glbs.html
- https://anata.dev/vrm/files/shared/HAIR/glbs.html
- https://anata.dev/vrm/files/male/HAIR/glbs.html

One thing I did was combine the male + shared hair traits into 1 blend file and arranged them as a grid. Female team can request this too.

Proceed to tweak the individual trait in the 3D modeling software of choice (like Blender) then re-export as VRM0 back to the Anata ID folder to test. Reuse the same trait name but increment the version, like Mid_Red2.vrm or something.
:exclamation: **For deliverable put all of the fixed traits into 1 blend file per Anata ID! Like 208.blend**
> Note: The first pass will be to assemble and debug major issues, then we'll do a quality pass to fix minor imperfections.
### 4. Export VRM
- Create Atlas :heavy_check_mark:
- Merge to MToon :heavy_check_mark:
- 4096x4096 Atlas Size :heavy_check_mark:
- **Download VRM**

If we need to fix any traits, we'll fix that trait individually and then reassemble in the quality pass. Name the VRM the same as the Anata ID (like 1.vrm).
### 5. Test
Test the VRM to see if it is working, here are a few applications to try:
- https://hyperfy.io/grid
- https://vrm-validator.fern.solutions/
- https://vrm.dev/en/vrm/vrm_applications.html
> If there is an error related to Uint32Array multiples of 4, that is due to a known issue https://github.com/M3-org/CharacterStudio/issues/66
---
## FAQ / Troubleshooting
**There's missing triangle faces when I load one of the assets in**
(See neck area / where arms meet sleeves)

This is due to the auto-culling feature in character studio, meshes hidden by other layers (like the body parts underneath clothing) can be culled resulting in a more optimized file.
If the effect is too strong, pick the underlying layer (like the **Body** in this case) and adjust the sliders for **Cull Out Distance** and **Cull In Distance**.

**The skintone / texture doesn't quite match**
In each of the folders is a transparent PNG of the eyes trait that you can overlay ontop of the proper skintone. You can modify the one currently in the folder or where all of the skintones are located, then overlay the original eye transparent PNG on top.
- Female skintone: https://drive.proton.me/urls/98F47QR9QM#KaFkrDSXh0py
- Male skintone: https://drive.proton.me/urls/Y0D3EF7138#E3FdvDc7hQm0
If it affects a wide range, ping `jin` in order to programmatically update many at once. It may require reuploading new zip files.