-
-
Notifications
You must be signed in to change notification settings - Fork 123
Hair Accessory Guide
A guide for creating hair accessories from existing hair. For this guide you will need to use SB3Utility.
Some hairs are comprised of multiple meshes and can be separated in to individual accessories.
Select the animator, mark for copying, and paste in to your new unity3d file. Rename it and give it a unique name.
Select all the meshes except the one you want to keep and remove them.
Rename the remaining mesh. This is important to avoid conflicts when importing another copy of the hair for splitting up the remaining parts.
Remove the empty frames that used to contain the deleted meshes.
Expand the SkinnedMeshRenderer, select the last bone in the sequence 00,01,02, etc. and click Go To Frame. This will expand the frames for the bones. The ones that did not expand are bones belonging to deleted meshes and can safely be removed. If you delete a frame and one of the bones changes to "invalid bone" you messed up.
Rename the topmost frame to "N_move". This indicates to the game that these are the transforms moved when you adjust the accessory in the character maker. Without it accessories cannot be adjusted. Rename the rest of the frames as well. Their name doesn't matter so much, but it is important that they do not match the names of the original bones. If you do not rename them, enabling hair FK in studio will generate errors.
Save the file and reopen it. This will cause SB3Utility to refresh the MonoBehavior data. Double click the DynamicBone MonoBehaviors and remove any where the PathID is 0. These are DynamicBones MBs belonging to the bones that were removed and are no longer needed. Some hair parts may have multiple DynamicBones if they have multiple sets of bones. Others may not have DynamicBones at all.
Save and reopen again. Double click the ChaCustomHairComponent MonoBehavior. Expand the rendHair array and remove any with a PathID of 0. These are the meshes that were deleted. Expand the rendAccessory array and remove any there with a PathID of 0, if there are any.
For this to function as an accessory it must have a ChaAccessoryComponent. You can find one in any other accessory. Drag and drop it from the accessory in to your new one.
Open the ChaCustomHairComponent and ChaAccessoryComponent MonoBehaviors. Copy the PathIDs from the ChaCustomHairComponent to ChaAccessoryComponent and input them in to the rendNormal array. Every mesh in this animator must be added to the rendNormal array or it cannot function correctly. When properly initialized it will turn green.
Finally, open the material and set the line color to black.
You can find a list of various guides on the right.
Make sure to also check the Guides folder in the repository.