umasteeringgroup / UMA

Unity Multipurpose Avatar
MIT License
726 stars 167 forks source link

When I Create a new Race , I have two errors. #380

Closed FzuLiWei closed 3 months ago

FzuLiWei commented 2 years ago

When I Create a new Race , I have two errors. 1.Error! Boneweights and BonesPerVertex is invalid. The slot must be regenerated. 2.IndexOutOfRangeException: Index was outside the bounds of the array.

Unity Version:2019.4.16f1 UMA Version: 2.12 on develop Rendering Pipeline: standard Platform Build (if not editor): window

1

2

3

5

Is this Model have Bones outside to cause two errors?

Jaimi commented 2 years ago

It's probably best to ask these sorts of questions on Discord. I've seen this before, and ended up recreating everything and it fixed it. I'm still not sure what caused it.

https://discord.gg/GSVSQCfU

FzuLiWei commented 2 years ago

2022 04 13_李炜 1cbfa2cf2dd4ba2fe55786046cab9dd1

sorry , I can not open it.

Jaimi commented 2 years ago

Sorry - did not realize you were in China, and discord is blocked.
This error is saying that some of the required boneweight data is missing from the SlotDataAsset.Meshdata.

Slots in UMA can have boneweight information in two different places. Old Slots can have that in meshData.BoneWeights. New Slots will have it in two fields: ManagedBoneWeights and ManagedBonesPerVertex.

When an old slot is loaded, the data is read from the old field (meshData.BoneWeights) and put in the new fields. of course, new slots do not use this translation method.

So somehow you have a slot that does not have bone weights. This is usually not possible with a skinned mesh. It was a bug that happened with an alpha version of 2.11, so if someone generated these slots with an alpha, I could see that being a problem.

What I recommend is to review your "SlotDataAssets" that you are using, and verify that they all have boneweights - either in the MeshData.BoneWeights, or MeshData.ManagedBoneWeights and MeshData.ManagedBonesPerVertex fields.

You can do this by changing the inspector to use "debug" mode by right clicking on the tab. Then you can drill down into the meshdata on the SlotDataAssets, and find the one(s) that is/are broken, and regenerate them. If that doesn't fix it, we need to look at the slot to see why it is not working.

FzuLiWei commented 2 years ago

thanks , I will have a try for it.

christopher-genies commented 1 year ago

Any update on this? I am getting the first error. (Error! Boneweights and BonesPerVertex is invalid. The slot must be regenerated). Upon debugging, all slots have bone weights and bones per vertex data.

Jaimi commented 3 months ago

Note: This can be caused by slots issues: Old slots with new bones. Running over the buffer limit of 16 bit buffers (you should enable 32 bit buffers), or bad fbx files without weighting for some bones.