Import Plugin - NitroxNova/humanizer GitHub Wiki
Introduction
Humanizer_import is a plugin for Godot that allows the creation of humanizer asset packs. In Humanizer 3.0 assets such as shapekeys, bodies, equipment, cloths, hair, and skins are loaded at run time from zip files. The humanizer_import plugin is a tool that converts the Make Human assets to humanizer compatible format. The plugin has been separated from Humanizer core to help make humanizer more maintainable.
New Asset workflow for 3.0
Obtain Make Human Asset (From The community or create your own) Import Asset into a "humanizer_import" project Export zip pack containing any desired assets Import zip pack into your main Humanizer game assets in one folders defined in your project settings in the "assets import paths" array. By default these are the import folders:
- res://addons/humanizer_assets
- user://humanizer
- res://humanizer
- res://addons/humanizer/data/assets
reload your game to load the new options
Installation Process
Humanizer v3 and Import Plugin Require Godot 4.4 or higher Create a new project in godot specific for importing creating asset packs Install humanizer Version 3 to the new project (all files in res://addons/humanizer Rename them to remove any version numbers) Install humanizer_import to the new project (all files in res://addons/humanizer_import Rename them to remove any version numbers)
just ignore any warnings and errors, make sure the humanizer and humanizer_import plugins are enabled (can manually toggle) and the humanizer global is also loaded
This plugin handles all the mhclo, mhmat, target jsons, and fbx animations from mixamo, turns them into Resource files that humanizer can use. If you want an example of how i have the system assets set up, you can look at the humanizer import environment . It is not necessary for you to use this project to create your own assets, its just so i have an archive in case the system assets need to be regenerated.
Setting up Import Folders
Best practice is to sett up the following folders for importing
- res://data/input/equipment
- res://data/input/material
- res://data/input/animation
- res://data/input/target
Setting up Automatic Equipment Imports
To enable automatic imports of equipment you need to define a relationship between folders and slots. This can be configured in project settings, humanizer Import>Slots Folder Config
The schema here is as follows (& before a string represents a StringName, {} is a dictionary, [] is an array, ALLCAPS words are to be user defined,True is a boolean value that is true)
&FOLDERNAME:{&slot:[SLOTNAME]}
If your folder contains both left and right files. The asset name should start with "left" or "right". The schema for an import folder with left and right is below
&FOLDERNAME:{&slot:[SLOTNAMELEFT,SLOTNAMERIGHT],&left_right:True}
The folders must be placed in the following locations
res://data/input/equipment/FOLDERNAME
Defining New Slots
New slots can be defined for either the body or clothing in the humanizer project settings. The schema for slots is as shown below (& before a string represents a StringName, {} is a dictionary, ALLCAPS words are to be user defined)
&Body Parts:{SLOTNAME:DISPLAYNAME}
&Clothing:{SLOTNAME:DISPLAYNAME}
Importing Assets
Importing Targets (shapekeys)
Shapekeys are saved in "groups" that are defined by the folder the shapekeys are put in. These groups are set up by the folder structure. res://data/input/GROUPNAME
Place all files you want grouped into the same folder and the select Project>Tools>Humanizer Import>Targets
The browse for the folder and select "Generate" This will import all targets in that folder.
Importing Equipment (clothing or body parts)
Importing Manually
Importing manually can be done asset by asset, HOWEVER this may be overwritten if import all is selected from the menus select Project>Tools>Humanizer Import>Equipment>Manual Import
Select the MHCLO file. If the MHCLO file is in an automatic place where slots are selected these will be automatically filled in, you can change the material ID and Display names as needed, set attachment points ECT
Bulk Importing
If all of your assets are properly stored in folders matching the "setting up automatic equipment imports" then simply select Project>Tools>Humanizer Import>Equipment>Import All
Other Imports
From the Project>Tools>Humanizer Import menu, you can find all of the asset import functions.