Rig moves, geometry stays static in MyFirstAnimation sample with custom Model

I checked out the https://github.com/Unity-Technologies/Unity.Animation.Samples project and opened the MyFirstAnimation scene, imported an FBX asset from an external pack and tried running.

Per the readme, I attached A Rig, the MyFirstAnimation script, and the optional bone renderer.

You can see from the clip below, the bones are actually moving! But the geometry attached to those bones is standing still.


Is there something obvious that I'm missing? Do we have to reference an avatar somewhere?

One difference I've noticed is between the sample's division of GEOMETRY and SKELETON, the imported asset has geometry in-place.

5512603--565720--upload_2020-2-23_11-34-34.png

unrelated but hilarious ... did you catch that nightmare fuel in the scene view?! I'm thinkin' ship it.

5512603--565723--upload_2020-2-23_11-35-58.png

Hi @alexchesser ,

Thanks for trying out our public samples and as you saw these are really still very much in development. We certainly plan on streamlining the whole setup process but in the meantime there are manual operations to perform and quite a few things to document on our end.

For proper skinning setup, I think you might be missing the SkinMesh Component that is picked up by the conversion pipeline (I realize this is something that is not currently documented and should be rectified). Basically, for all SkinMeshRenderer components of your character you'll need to add this component which maps a SkinMeshRenderer to a RigComponent to complete the skinning setup:
5517694--566551--SkinMeshConversionComponent.png

Also, the reason you are seeing wonky deformations on the RigTerraformerLOD0 is probably because the SimpleVertexSkinning material has GPU Instancing disabled. This fix was recently pushed to the public samples repo but you can fix locally by just enabling the option through inspector:

5517694--566554--MaterialEnableGPUInstancing.jpg

Hopefully these tidbits fix the problems mentioned above. Cheers!

1 Like

Hey @OlivierDionne thanks for the reply ... I definitely knew what I was getting into when I downloaded the repo. The disclaimer was pretty clear with likes like "you must be technical" and "definitely not for production". I'm not surprised by the challenges ... but also so excited that I can't stop myself.

I followed your notes and added Skinned Mesh Renderers and the Skinned Mesh mapping to all the points of geometry and I noticed two things.

1) was that the parts seem to "jump around" in the scene view when I set the ROOT BONE

5518225--566638--upload_2020-2-24_20-47-19.png

somewhat interestingly, this jumping around is not seen in the game view, though neither is animation movement

5518225--566644--upload_2020-2-24_20-53-31.png

2) is the error message related to the MESH on the skinned mesh renderer. Circled in red below, it complains that I don't have correctly set bone weights, bind poses or blend shapes. Worse still... I secretly don't even know what those are! :) At least I have some definitions to google.

5518225--566635--upload_2020-2-24_20-46-18.jpg

I suspect it's something to do with being a generic animation and not a humanoid one but can't be sure.
Maybe I'll understand more after a night or two of watching youtube rigging tutorials.
5518225--566647--upload_2020-2-24_21-0-0.png

1 Like

update - so reading about bone weights it seems like they are created in Maya/Blender/3d studio program.

I'm assuming that in that instance I'd have to import my models into Blender and try to add bone weights? Is that accurate?

Thanks for sharing a bit more about your setup.

From what I can understand, you started with a character that basically only had MeshRenderer components on game objects which would explain why you don't have any skin weights in your current SkinMeshRenderers. As you mentioned (and to confirm), these weights are usually authored in a DCC tool the likes of Maya/Max/Blender/etc. One workaround to fix your character and quickly get results would be to create a rigid skinning setup.

It's really not the preferred solution but the easiest to put in place in the meantime. Note that it is doable to write a custom ECS system in the current version of dots animation to copy back the animated data to the entity transforms but is a tad more involved.

Just to keep you informed, we are literally working on the feature to automate reading/writing back to entity transforms from the DOTS animation system. Once this lands, your setup in it's original form, should technically just work.