Alembic export: normalise the homogeneous component after scaling
The scale matrix must have its homogeneous 'w' (at mat[3][3]) set to the scale in order to also scale the translations along with it. However, this also scales the transform matrix's 'w' component, which is not supposed to happen.
This commit is contained in:
parent
916eca6a1e
commit
4e5440686d
|
@ -108,6 +108,7 @@ void AbcTransformWriter::do_write()
|
|||
scale_m4_fl(scale_mat, m_settings.global_scale);
|
||||
scale_mat[3][3] = m_settings.global_scale; /* also scale translation */
|
||||
mul_m4_m4m4(yup_mat, yup_mat, scale_mat);
|
||||
yup_mat[3][3] /= m_settings.global_scale; /* normalise the homogeneous component */
|
||||
}
|
||||
|
||||
m_matrix = convert_matrix(yup_mat);
|
||||
|
|
Loading…
Reference in New Issue