Module |
|
Header |
/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Public/USDSkeletalDataConversion.h |
Include |
#include "USDSkeletalDataConversion.h" |
Source |
/Engine/Plugins/Importers/USDImporter/Source/USDUtilities/Private/USDSkeletalDataConversion.cpp |
namespace UsdUtils
{
void UsdUtils::ResolveWeightsForBlendShape
(
const FUsdBlendShape & InBlendShape,
float InWeight,
float & OutPrimaryWeight,
TArray< float > & OutInbetweenWeights
)
}
We decompose inbetween blend shapes on import into separate morph targets, alongside the primary blend shape, which also becomes a morph target. This function returns the morph target weights for the primary morph target, as well as all the morph targets for inbetween shapes of 'InBlendShape', given an initial input weight value for the USD blend shape. Calculations are done following the equations at https://graphics.pixar.com/usd/docs/api/_usd_skel__schemas.html#UsdSkel_BlendShape_Inbetweens
This assumes that the morph targets in InBlendShape are sorted by weight.