Hello guys! I have tried to get all bones’ name influncing a vertex in this way:
TArray<int32> InfluencingBonesIndices;
for (int32 InfluenceIndex = 0; InfluenceIndex < MAX_TOTAL_INFLUENCES; InfluenceIndex++)
{
if (SkinWeight.InfluenceWeights[InfluenceIndex] > 0)
{
int32 CurrentBoneIndex = SkinWeightBuffer->GetBoneIndex(VertexIndex, SkinWeight.InfluenceBones[InfluenceIndex]);
InfluencingBonesIndices.Add(CurrentBoneIndex);
UE_LOG(LogTemp, Warning, TEXT("Bone Index: %d, Bone Name: %s, Weight: %d"), CurrentBoneIndex, *SkeletalMeshComponent->GetBoneName(CurrentBoneIndex).ToString(), SkinWeight.InfluenceWeights[InfluenceIndex]);
}
}
However, the CurrentBoneIndex is always zero(indicating root bone). I checked the value in InflunenceBones, they are not zero, however also did not corresponding to true bone name.
I’m confusing with influnceIndex and boneIndex, really hope someone can help me with this question!