2. Trait Mapping
This function is ideally utilized for PFP projects that were created by Generative Art.
MYTY Kit supports expressing multiple PFP Avatars from one AssetBundle file. It means that multiple PFP Avatars will share skeletons and animations defined. And this function can be supported through Trait Mapping file. Trait Mapping file has information about which image layers need to be included in each NFT.
Avatar Trait Mapping in MYTY Kit
What is Avatar Trait?
Every single NFT has its own traits, which represent the key characteristics of the PFP image of the NFT.
Based on the traits, we can imagine what the image of the NFT will look like.
As most of the PFP collections have been created by generative art algorithms, each NFT shares its traits with other NFTs in the collection.
What is Trait Mapping?
The Trait Mapping file has information about which image layers need to be included in each NFT.
MYTY Kit utilizes the Trait Mapping file to pile the selected image layers up and build the full image of each PFP avatar.
The method 5. Import 2D Avatar Assets loads the Trait Mapping file and the file is used to create Avatar Selector.
Avatar Selector enables us to display certain Avatar that we want to load, by updating the parameter Avatar ID included in Avatar Selector.
Why do we need a Trait Mapping file?
Basically, of course it is possible to create a PFP avatar that supports a single NFT.
In this case, if we want to create PFP Avatars for the collection level, we have to do the work 10k times repeatedly.
Using the Trait Mapping file, we only need to create skeletons just once (or several times at most), and each PFP Avatar will share the same skeletons.
The size of the Motion Adaption-related work and Controller-related work are also significantly reduced, if we use the Trait Mapping file.
In this case, the PSB file should consist of all the image layers of the whole collection.
How to create a Trait Mapping file?
You can either:
Use MYTY's MYTY Kit Trait Mapper Web.
Manually create a Trait Mapping file
What is the specification of Trait Mapping file?
File Extension: JSON file
Sample file
File Format
Example JSON file
Is it possible to update the Trait Mapping file?
๐ After you imported the Trait Mapping file to the Unity Project:
It is never recommended to update the Trait Mapping file. We recommend building another project using the new Trait Mapping file. However, if it is inevitable, please contact MYTY Kit Community.
๐ After you exported Asset Bundle of the collection:
You have to update the Unity Project first. Please contact MYTY Kit Community. After the update, you need to export Asset Bundle again.
Last updated