MAKING 3D ITEMS - BLENDER
Rigging
21min
blender compatibility considerations the zepeto rig is set up in maya, and uses maya's default joint orientations in maya, joint chains can be aligned to any axis, whereas in blender, bones are strictly pointed along the y axis while it may look strange, for compatibility with the zepeto avatar, it is important to not change the bone orientation of default bones blender doesn't support binding meshes to a posed armature in the armature's non rest pose when binding weights to the armature, use an armature applied at the desired rest pose in pose mode or a duplicate rig with an a pose set as the rest pose what’s rigging? rigging is the process of applying the data to make an item move with the zepeto avatar without rigging, an item won’t move with the avatar in the app through the process of rigging, we’ll tell our item how to follow the avatar’s skeleton more technically in 3d applications, the 3d geometry of a character is often controlled by joints or bones these joints or bones are special 3d objects that don't show up in rendering that set rules for how a character will move, often serving as pivot points rigging is the process of saving data that tells a mesh's vertices how closely they should follow a given joint or bone in blender, this type of data are called "vertex groups " weights can be numerically assigned or "painted" onto a model as virtually painting on influence is more approachable than assigning decimal numbers to individual vertices, we'll be focusing on this method of weight painting to save time and sanity joints and bones serve similar functional purposes in 3d software, with slight differences that go along with their terminology joints represent a single point in 3d space with no software defined preferred directions maya uses joints and generally tends to align joints with their x axes pointing to the next bone on the chain bones functionally also represent a single point in space, but have software defined directions that it expects other characters to follow blender uses bones, with their y axes designed to point to the next bone on the chain this difference between bones and joints creates a few issues in how the rig is handled in blender that we need to work around rigging requirements the "hips" and "hips scale" bones must be included generally, try to prevent the mask from poking through your item while weight painting make sure the body and items don't collapse in on itself when the armature is moved maximum skin weight influences are fixed at 4 these are blender’s defaults, but to manually set the weight influences, go into weight paint mode for the item mesh in the weight menu in the 3d viewport, select “limit total ” expand the menu that appears at the viewport’s bottom left and ensure that the “limit” value is set to 4 generally, dresses use the bones of the upper and the lower sections of the rig, while other items have a more constrained selections the mask object that comes with the creator base set has the weights from the zepeto avatar it's useful to use the weights from the mask object as a basis for weighting items to transfer the mask weights to the item's weights, use blender's weight transfer functionality process use creator base set contents use the mask and armature objects included in the creatorbaseset zepeto fbx file these objects have a defined set of object names, bone names, and bone orientations that zepeto studio will look for to make an item work in the app it's important to keep the names similar to not confuse the conversion process later in unity non t pose rest poses blender applies its initial weighting data to an armature’s “rest pose ” this means that if you modeled items in an a pose and try applying it to a t pose rest pose armature, the item may shift out of the correct position in the initial binding operation to get around this issue, it is useful to bind the item to an armature that has its rest pose set to the item’s modeled pose a useful method to having a non t pose rest posed armature is to create a duplicate of the original armature and mask, applying the rest pose to the newly duplicated armature, and rigging the clothing item based on the rest pose for organizational purposes, the duplicated mask and rig should be renamed based on their new pose putting each armature and mask set in their own collections can also help with organization applying a rest pose to the armature is relatively simple pose the armature in your desired pose select the attached mask element, and find the armature modifier in the modifier properties tab a in the dropdown menu in the armature modifier, select “apply” 3\ select the armature element and go to pose mode select all bones and go to the pose menu at the top of the viewport go to “apply,” then “apply pose as rest pose” 4\ return to object mode and select the mask element in the modifiers tab, add a new armature modifier in the object target spot, find and select your posed armature now the armature has a new rest pose applied to it and the mask element will follow this new rest pose 📘 zepeto has specific rotations for the a pose that appear on zepeto template items with a top element the zepeto a pose has rotations across 4 total bones shoulder bones “shoulder l” and “shoulder r” are rotated by 7 5 degrees on the z axis arm bones “upperarm l” and “upperarm r” it can be easier to apply rotations on bones using euler xyz rotations rather than blender’s default quaternion settings change these rotation axes in the bone preferences tab for ease of use general workflow use the mask and armature objects included in the creatorbaseset zepeto fbx file these objects have a defined set of object names, bone names, and bone orientations that zepeto studio will look for to make an item work in the app it's important to keep the names similar to not confuse the conversion process later in unity ensure the armature fits the item and is set in it's rest pose if the clothes are modeled to fit a t pose, the unaltered creator base set armature will work by default a if the clothes are in zepeto's a pose you may need to set the armature to fit the a pose select the costume item, then the armature apply a parent to the armature with empty weights 5\ transfer the weights of the mask to the item select the mask, then the item move to weight paint mode use the "transfer weights" operation in weights > transfer weights make sure the transfer weights operation is done "by name" 6\ rotate joints to check if the weights on the item are set properly edit the joint weights using the weight brush tool make sure that deformer weights are normalized when bone weight correction is complete, reset the transforms of all the bones 🚧 the zepeto avatar uses scale bones to adapt the base avatar to multiple body sizes when the skeleton has both a scale bone and a non scale bone, apply weights to the scale bone and leave the non scaled bone with no weights blender’s symmetry and bone naming system prevents the provided rig from having easily mirrored vertex groups using built in weight mirroring tools weight symmetry has to be manually applied or mirrored via an add on skirts rigging skirt elements requires some additional attention skirts are more challenging to rig in zepeto due to the standard behavior of anything with leg elements skirts will follow the legs of an item like an expanded set of pants this can lead to the middle section of the skirt stretching when the legs are moved apart this is unavoidable, but through some careful weight painting, the stretching can be smoothed out rigging cleanup a pose to t pose when the rigging binding and correction is complete, the rig has to be reverted to the t pose to export to do this, we’ll take our item rigged to the a pose armature and put it into a t pose, apply the item in the t pose, and rebind the item to the t pose skeleton in more detail select the a pose armature in pose mode move the armature bones back into t pose a for the zepeto a pose, this can be easily accomplished by rotating the shoulder l and shoulder r bones by 7 5 degrees on the z axis and rotating the upperarm l and upperarm r bones by 40 degrees on the z axis select the item in object mode in the modifier properties tab find the armature modifier click the dropdown menu and hit apply 5\ add an armature modifier to the item point the armature object to the original creatorbaseset t pose armature 6\ make corrections to the item’s mesh or to the item’s weights for any errors that appear from the weight transfer due to how deforming works, meshes moved back into t pose are likely to lose some volume in the shoulder/upper arm area on return to t pose editing the mesh to add volume back is a relatively simple fix use the t pose mask as a reference for mesh boundary areas deleting bones when all weights have been finalized and are ready to export, delete bone sets with no influence on the item zepeto studio limits the number of bones an item can be uploaded with to 100 deleting unused bones preempts this bone count issue, as blender’s exporter will export every bone in the skeleton, even if they lack vertex groups or weights if an item requires many additional bones, it may be necessary to remove non scale bones to reduce bone count if required, delete non scale bones with a corresponding scale bone, except if they are twist bones or the hips bone the item will break if the hips bone is not included