[Question] AlphaScaleBias?


Was looking into custom bone controllers when I noticed AlphaScaleBias in AnimNode_SkeletalControlBase.h:

// Current strength of the skeletal control
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Settings, meta=(PinShownByDefault))
mutable float Alpha;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Settings)
FInputScaleBias AlphaScaleBias;

Question is, what does it actually do with the alpha?
Scales it with a bias towards 0.0f? 1.0f? Alpha?


Hi Christopher,

The AlphaScaleBias is used to change what the expected input range of Alpha is in the editor. There is a details customization that presents any FInputScaleBias properties as a Min…Max range property. That’s used to compute Scale and Bias values that will adjust the input Alpha value to a final 0…1 value used for blending (e.g., if you wanted to drive a node with a velocity from 100…400, rather than a normalized 0…1 value).

The actual math is:

float FInputScaleBias::ApplyTo(float Value) const
	return FMath::Clamp(Value * Scale + Bias, 0.0f, 1.0f);

Michael Noland