Add **skeleton retargeting** to play animations on different skeletons

This commit is contained in:
Wojtek Figat
2023-05-04 11:54:17 +02:00
parent b89d32ce2b
commit 05ffaf7cef
15 changed files with 775 additions and 104 deletions

View File

@@ -160,6 +160,18 @@ ExportAssetResult AssetExporters::ExportSkinnedModel(ExportAssetContext& context
stream.ReadUint32(&vertices);
uint32 triangles;
stream.ReadUint32(&triangles);
uint16 blendShapesCount;
stream.ReadUint16(&blendShapesCount);
for (int32 blendShapeIndex = 0; blendShapeIndex < blendShapesCount; blendShapeIndex++)
{
stream.ReadBool();
uint32 tmp;
stream.ReadUint32(&tmp);
stream.ReadUint32(&tmp);
uint32 blendShapeVertices;
stream.ReadUint32(&blendShapeVertices);
stream.Move(blendShapeVertices * sizeof(BlendShapeVertex));
}
uint32 indicesCount = triangles * 3;
bool use16BitIndexBuffer = indicesCount <= MAX_uint16;
uint32 ibStride = use16BitIndexBuffer ? sizeof(uint16) : sizeof(uint32);