# Character Studio Overview
{%hackmd @themes/dracula %}
[toc]
## Goals
- Use character studio to export VRMs for Anata avatars based on provided JSON metadata
- Create CLI version for batch assembly (input manifest.json path, outputs VRM)
- Create markdown documentation for artists wanting to add their own assets, and more technically for developers about how the system works
- Feature requests: Ability to change backgrounds, switch animations for the selected, create thumbnail images for layers, wallet connect -> read from certain NFT collections / populate character select based on NFT ID for [Anata](https://opensea.io/collection/the-anata-nft)
---
## AI meeting summary
{%youtube yYkJQsqU0FY %}
The transcript discusses the process of loading assets from Blender into Unity. It explains how each asset is exported as a VRM 1.0 file and then imported into Unity for further processing. The transcript also mentions a code that was created to automate this process, saving time for exporting multiple assets. Additionally, it covers the use of manifests in Character Studio and Character Assets to organize and configure characters, including required traits and trade groups. There is also mention of plans to make creating manifests easier within Unity or Blender. The conversation touches on the possibility of using GPT (a Python library) to convert Unity C# code to Python in Blender. Finally, it briefly mentions the idea of treating each manifest as metadata for an NFT (non-fungible token).
The transcript discusses various aspects of character creation and customization. It covers topics such as character height, object cooling, background selection, trade options, layering in the model, VRM export process, mesh rendering, and setting cooling distances. The conversation also touches on issues related to exporting models in different formats (BRM Zero vs BRM One) and optimizing collision detection for clothing items.
The transcript discusses the implementation of a new algorithm that detects and displays objects in a 3D model. It explains how this algorithm helps with creating realistic visuals, particularly for clothing items like jackets. The conversation also touches on the possibility of adding a preview feature to visualize changes before exporting the model. The process of exporting and organizing models in Blender and Unity is explained, along with instructions on setting attributes such as names, locations, and distances. The goal is to simplify the setup process and ensure correct layering of wearables in the final character assets folder.
### Follow-ups
- Investigate why some triangles are appearing as errors during the export process.
- Explore the possibility of adding a feature to preview the effects of changing the default calling distance in the web app.
- Consider adding the ability to customize the background in the app for each individual Anata.
- Explore the potential for creating a user-friendly interface within Unity or Blender to easily generate the manifest files.
- Investigate the feasibility of converting Unity C# code to Blender using Python.
### Action items
- Investigate why some triangles are appearing as errors during the export process.
- Explore the possibility of adding a feature to preview the effects of changing the default calling distance in the web app.
- Consider adding the ability to customize the background in the app for each individual Anata.
- Explore the potential for creating a user-friendly interface within Unity or Blender to easily generate the manifest files.
- Investigate the feasibility of converting Unity C# code to Blender using Python.
- Clean up and optimize the manifest creation process to make it more efficient and user-friendly.
- Update the app to include the option to choose a background.
- Investigate and resolve the issue with the triangles appearing as errors during export.
- Consider implementing a preview feature for the effects of changing the default calling distance.
- Explore the possibility of creating a user-friendly interface within Unity or Blender for generating manifest files.
- Explore the potential for converting Unity C# code to Blender using Python.
- Update the app to provide the ability to export the 3D models in VRM One format.
- Note: These action items are based on the information provided in the transcript.
## Outline
- **Chapter 1: Introduction to Exporting Characters**
- Timestamp: 00:11
- Overview of the need to export characters in BRN format
- Mention of opening an example to demonstrate the process
- **Chapter 2: Updating the Script for VRM 1.0 Export**
- Timestamp: 01:28
- Reference to updating the script to ensure exports as VRM 1.0 files
- Importance of generating all necessary assets
- **Chapter 3: Exporting Assets in Blender**
- Timestamp: 03:05
- Explanation of exporting assets in Blender all at once, rather than individually
- Mention of exporting to a specific folder
- **Chapter 4: Showing the Exported Assets**
- Timestamp: 04:57
- Demonstration of the exported assets in a new folder called "New Wings"
- **Chapter 5: Manifests in Character Studio**
- Timestamp: 07:06
- Introduction to creating a manifest in Character Studio
- Location of the manifest in the project directory
- **Chapter 6: Character Assets Manifest**
- Timestamp: 09:00
- Explanation of the separate manifests for the project and specific characters
- Details of the information included in the manifest
- **Chapter 7: Creating Manifests Manually**
- Timestamp: 13:30
- Discussion on the current manual process of creating manifests
- Mention of grouping assets and setting information in the manifest
- **Chapter 8: Automating the Manifest Creation**
- Timestamp: 16:48
- Plan to automate the manifest creation process
- Simplifying the understanding of the manifest
- **Chapter 9: Manifest Structure and Options**
- Timestamp: 19:14
- Explanation of the structure and options within the manifest
- Mention of Python and SVG directories
- **Chapter 10: Exporting Process**
- Timestamp: 23:16
- Reference to the export option and the steps involved
- Request for a guide through the export process
- **Chapter 11: Importing into Unity**
- Timestamp: 26:56
- Discussion on importing the exported assets into Unity
- Mention of the model with the atlas
- **Chapter 12: Model System in Unity**
- Timestamp: 28:27
- Explanation of the model system in Unity
- Discussion on the overlapping of models
- **Chapter 13: Configuring Object and Preview**
- Timestamp: 31:27
- Explanation of configuring objects and previews within Unity
- Importance of setting the correct parameters
- **Chapter 14: Recap and Conclusion**
- Timestamp: 34:32
- Recap of the main points discussed in the transcript
- Request for a quick summary of everything covered
Note: The timestamps provided are approximate and may not be exact due to the limitations of the transcript.
## Notes
- The goal is to export characters and assets in BRN format.
- The process should be automated to save time.
- The export will include all necessary assets and object children.
- Blender is the software being used for formatting.
- Unity will be used to convert and migrate to BRM One.
- Manifest files are created in Character Studio.
- Manifest files contain information about the character assets.
- Manifest files include thumbnails and required trades.
- Creating manifest files currently requires manual writing.
- Ideas for making manifest file creation easier were discussed.
- The traits and directories for the manifest can be set up.
- The manifest can be exported from Unity or the web app.
- The export process from Unity or the web app was not explained in detail.
- There is a script to export 2D models in BRN format.
- Unity allows for creating manifest information and icons.
- Manifest files can be created manually or using Unity.
- The manifest file contains information about the model.
- The goal is to make the setup process easy.
- An export button will be added.
- The recording ends with a recap of the process.
- Future: Make character studio easier for artists that just want to load their own assets
---
## Exporting from Blender
**Both repos are needed**
- https://github.com/m3-org/CharacterStudio
- https://github.com/m3-org/character-assets
- https://youtu.be/yYkJQsqU0FY
Make sure every mesh is parented to an armature. The goal is to export each layer (a wearable such as a hat, clothing mesh, wings, etc) as a VRM 1.0 file. This can be done manually, but it would take a long time with a lot of assets so we wrote a script to batch export them.
![](https://hackmd.io/_uploads/SJebjntDeT.jpg)
Make sure to modify the path btw, all the VRM files will export there.
![](https://hackmd.io/_uploads/Bke-i2YPeT.jpg)
Here's a script that can export the layers as VRM 1.0 files from Blender, run via like this (tested with blender 3.3.6): `./blender -b -P export6.py -- Brace_FEMALE.blend`
```python=!
import bpy
import os
import sys
# Check if a blend file argument is provided
if len(sys.argv) < 2:
print("Usage: blender -b -P script.py -- [blend_file]")
sys.exit(1)
# Set the export path
export_path = "/home/jin/Desktop/Exports/"
# Get the path to the blend file from the command line argument
blend_file = sys.argv[-1]
# Open the specified blend file
bpy.ops.wm.open_mainfile(filepath=blend_file)
# Get the correct view layer (replace 'ViewLayer' with the actual view layer name)
view_layer_name = 'ViewLayer'
view_layer = bpy.context.scene.view_layers.get(view_layer_name)
if view_layer is None:
print(f"View Layer '{view_layer_name}' not found.")
sys.exit(1)
# Set the active view layer
bpy.context.window.view_layer = view_layer
# Get a list of all visible objects in the scene
visible_objects = [obj for obj in bpy.context.scene.objects if obj.parent is None]
# Iterate over each visible object and export it as a separate VRM file
for obj in visible_objects:
# Search for an armature in the hierarchy of children
mesh = None
for child in obj.children_recursive:
if child.type == 'MESH':
mesh = child
break
# If a mesh is found, select it for export
if mesh:
# Set the filename for the exported VRM file
armature = mesh.parent
armature.data.vrm_addon_extension.spec_version = "1.0"
filename = mesh.name + ".vrm"
filepath = os.path.join(export_path, filename)
# Select the mesh for export
bpy.ops.object.select_all(action='DESELECT')
mesh.select_set(True)
# Export the mesh (VRM)
bpy.ops.export_scene.vrm(
filepath=filepath,
export_invisibles=False,
enable_advanced_preferences=False,
export_fb_ngon_encoding=False,
export_only_selections=True,
armature_object_name=obj.name
)
```
### Load Into Character Studio
Clone the [character assets GitHub repo](https://github.com/memelotsqui/character-assets) first, this is where all the VRM 1.0 files you just exported will go. In the future we want to add a connect wallet feature where this screen can be where you see various VRM NFTs you own. Each one pertains to its own manifest.json.
![](https://hackmd.io/_uploads/BJ-jntvgT.jpg)
![](https://hackmd.io/_uploads/rJWi3FPla.jpg)
### Exporting from Unity
![](https://hackmd.io/_uploads/HkWohKDlT.jpg)
![](https://hackmd.io/_uploads/HkeZs2Kvla.jpg)
![](https://hackmd.io/_uploads/HJebi3Ywg6.jpg)
![](https://hackmd.io/_uploads/B1Z-jnKwl6.jpg)
## Categories
🔥 BRACE
🤡 TATTOO
👚 CLOTHING
💃 BODY
🎀 RIBBONS AND BOWS
🌹 HAIR ACCESSORIES
😇 HALOS
📿 NECK
👧 HEAD
🎩 HATS
👑 HEAD ACCESSORIES
😃 FACE OTHER
🕶 GLASSES
👀 EYES
👂 EARRING
🎃 Special Other
💈 HAIR 💈
⭕ SIGIL
🐈 TAIL
👽 TYPE
⚔ WEAPON BRACE
⚔ WEAPON
🦅 WINGS