Fix: interpolating matrix attributes does not always work
The issue is that the conversion to quaternions seems to need normalized matrices and even then is not always safe. It's simplest to use the existing `*_safe` method here for now. Related to reports #129445 and #129485. Related to PR #131296. Pull Request: https://projects.blender.org/blender/blender/pulls/131297
This commit is contained in:
@@ -223,9 +223,14 @@ void float4x4Mixer::float4x4Mixer::set(int64_t index, const float4x4 &value, con
|
||||
|
||||
void float4x4Mixer::mix_in(int64_t index, const float4x4 &value, float weight)
|
||||
{
|
||||
location_buffer_[index] += value.location() * weight;
|
||||
expmap_buffer_[index] += math::to_quaternion(value).expmap() * weight;
|
||||
scale_buffer_[index] += math::to_scale(value) * weight;
|
||||
float3 location;
|
||||
math::Quaternion rotation;
|
||||
float3 scale;
|
||||
math::to_loc_rot_scale_safe<true>(value, location, rotation, scale);
|
||||
|
||||
location_buffer_[index] += location * weight;
|
||||
expmap_buffer_[index] += rotation.expmap() * weight;
|
||||
scale_buffer_[index] += scale * weight;
|
||||
total_weights_[index] += weight;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user