|
XPF Morph file formatInformation is hard to find, so the following is based on a sample file I have been given. The XPF format is a lot like an animation file, however in place of bone IDs it has MORPHNAME attributes and instead of translations and rotations it has WEIGHT tags. What appears to be happening is that the target mesh has "morphs" built in, pre-programmed actions, for example the upper left eyelid closing. The XPF file "weight" numbers (ranging from 0 to 1) tell it when to apply those actions and by how much. Since the actions are built into the mesh not the XPF file the mesh can be replaced and the XPF can still work, for example if the human head is replaced with an animal head the eye movements can still work, and since the morphs are accessed by name it is safe to make meshes with less than the full set of morphs, any morph weights that don't have corresponding morphs in the mesh will simply be ignored.
The following is a list of the morph names found in the file, which presumably reflect those found in an avatar face.
Given this list it is hoped that XPF files may be generated by text editing the same way that XAF files can. More information on Morph names may be found at the new "Education Center": http://www.imvu.com/creators/education_center.php?tutorial_id=2225221 where the list runs to 79 Morphs including the eye movement morphs e.g. look left, right etc. Also see the older one at: IMVU Developers - How to Make Avatar Heads where you will find the above list in a better order and an explanation of the suffixes "Average, Additive, Clamped, Exclusive", which determine what action to take when multiple morph files are active. Average: Take the average of the weight values. Additive: Sum the values Clamped: Sum the values, limiting the result so it can't exceed 1 Exclusive: Only one weight value is accepted, probably the last to be applied.
The above morph does not appear to be used for animation, instead it appears to have been added as a shortcut to reshape the head without invalidating the other morphs. As such I suspect that IMVU applies a permanent weight of 1 and that XPF files should not modify it. What is going on here is that this morph is applied constantly, but is not defined in the standard head. By adding this morph a mesher can adjust the shape of the head by small amounts without the need to adjust all the other morphs. |