I wonder if setting the blend weight to a negative number (through the blend space) will lead to an unexpected result of skipping the interpolation and may stop the animation?
The blend weight value should be between 0 and 1, so it should be clamped internally I think when someone uses an out-of-range number. What do you think of the behavior here? I am currently writing the documentation for the BlendSpace and I would like to add some documentation for the blend weight value regarding its value behaviors.
Last time, I remember the LinearBlendSpace (the only implementation of BlendSpace) restricts the blend weight in the range 0 … 1, but what if someone uses a trivial implementation of BlendSpace? I have made some custom blend spaces before to provide a variety of behaviors, but in general, I was sticking to 0 - 1 range, I haven’t tested negative values and I guess it will break something; because it is not handled in this code.
However, I did test values above 1, and it magnifies the behavior when performing interpolation, kinda extrapolation or so, it did work visually well with fractional increments, but larger and larger values distort the scene.
The original drawing by Nehon, states that the values should be between 0 and 1, and so, I guess if this is not handled in code, it is an issue then.
I think the negative weight will behave like weight = 0 except that the below checks won’t get run:
I do not know how that might change the behavior.
I think the expected values for weight are in [0, 1] (it is a percentage) where 0 (0%) means only interpolating the first animation, and 1 (100%) means only interpolating the second animation and anything between will result in animation blending.
So a negative value has no sense here I believe and any value other than [0, 1] must be clamped or an exception must be thrown.