I am working with a team of animators for my game. The problem is, the animation they made seems perfect in Maya, but the result in Unity is undesired. Her leg is seen above her cloth in Unity, while it looks perfect in Maya. The problem gets closer to getting solved when I set Bone Weights to 4 in Unity. I thought the animators could see the exact problem when they used the same bone weight in Maya, but they couldn't.
Is the cloth driven by bones or physics? If physics - is the cloth physics generated in Unity or Maya? If bones - the area of cloth is not being effected by the thigh bone as much as the leg mesh. Vertex weighting for the cloth should match the vertex weighting strength for the thigh.
Figure out if it's a joint positioning problem or a skinning problem. Your joints might be in a different place for some reason, or your skinning might not be coming through correctly, and the first thing to do is to figure out which one it is. Make sure no geometry is weighted to more than 4 joints, since that's Unity's max. If you weight to more than that, Unity will ignore some of them and it won't look the same. Maya has an option to enforce a limit ("Maintain Max Influences"), but I don't recommend using it (or at least don't leave it on) since it's buggy and can make various skinning operations corrupt the weights.
Then just adjust the animation a bit if editing the weights doesnt help. The cloth is "faking" being pushed forward bu the leg. Moving it a smidge more forward will result in the same look - just correct. Also - if this is humanoid set up with an avatar mask for the cloth - it could be a host of other reasons it looks off. Or if the coat is a separate animated mesh parented to the character, maybe the keyframes are not in sync because one does not have end keyframes placed in 3D app. Really just guessing at this point.
I guess you didn't get the main problem. There will be like 40 animations and they will have minor problems as long as the animator can't see the results in Unity. We have already tried moving the cloth, but now the feathered part on her belt looks incorrect. It will take like 4-5 revisions to make a perfect animation if we can't solve this dissonance. And there will be about 40 animations. The cloth and body are on the same mesh, by the way.
OK - then this is definitely due to either vertex weighting in Maya, an import setting or some humanoid rig malfunction. Is the character set as humanoid rig in Unity? Does changing to generic solve the issue? Can you confirm the artist set the skin weighting to max 4 bones per vertex influence? If the weighting of the vertices in Maya was performed - and then subsequently the artist changed the weight influence to only 4 bones - that might not be transferring into Unity correctly. (guess) If humanoid - did you attempt to import the model and rig without animation, and import separately the rig and animation without model, set the avatar correctly and apply the animation? Wouldn't expect this to show different results - but never know. In the import settings under model is mesh compression off? Optimize mesh off? Under rig is optimize game objects unchecked? Under animation is bake animation on? What is the anim compression setting? This seems like the most likely problem.
Again: step 1 is to determine whether you have a joint positioning problem or a skinning problem. Check if the joints are in the place they should be. There are plenty of things that can cause joints to not go quite where you want them to (the default animation compression options are extremely poor; root transforms might not match up), and there are another plenty of things that can make the skinning not replicate (too many influences; use of DQ or DQ-weighted skinning which Unity doesn't support), and the first thing to figure out is which category of problem you're dealing with. You could even have both problems, which makes figuring this out that much more important.
I sent the animator your replies. About your questions; * It's generic animation type. * Optimize game objects is unchecked * I disable animation compression * Optimize Mesh is unchecked
A couple other things you might mention - if the vertex weights are being set by envelope (volume/cluster) weighting, instead of other methods like paint weights or hand weighting, (I think) fbx attempts to convert the envelope weighting, to actual weight numbers upon export. This is something I have not seen in a long time, but remember long ago being a problem that caused discrepancies from 3D app to in game. What are the export settings in the fbx dialogue? Is the animation being baked upon export? Are dummies/null objects being converted to bones?
Try importing the mesh into unity without anim compression? https://docs.unity3d.com/Manual/FBXImporter-Animations.html etc - can often throw off positions, depending on model scale etc, mesh compression here also: https://docs.unity3d.com/Manual/FBXImporter-Model.html This problem does not look like an export problem, but the artist needs to ensure only 4 weights are used. All modern engines use a max of 4 usually.
Hi, if you want I can take a look at your rig and animation and find the issue for you. I have a little bit of free time this weekend, let me know if you want my help. I was in charge of all the modeling, texturing, rigging, animations and particle systems for this project: https://www.kickstarter.com/projects/620660310/in-the-line-of-fire Regards.