Fix #144528: Cycles renders OpenVDB grids with rotation wrong

Pull Request: https://projects.blender.org/blender/blender/pulls/144825
This commit is contained in:
Brecht Van Lommel
2025-08-19 21:39:30 +02:00
committed by Brecht Van Lommel
parent abf743c380
commit c7e2368d6c

View File

@@ -78,7 +78,7 @@ typename NanoToOpenVDBMask<NanoBuildT>::OpenGridT::Ptr NanoToOpenVDBMask<NanoBui
const nanovdb::Map &nanoMap = reinterpret_cast<const nanovdb::GridData *>(srcGrid)->mMap;
auto mat = openvdb::math::Mat4<double>::identity();
mat.setMat3(openvdb::math::Mat3<double>(nanoMap.mMatD));
mat.transpose(); /* The 3x3 in nanovdb is transposed relative to openvdb's 3x3. */
mat = mat.transpose(); /* The 3x3 in nanovdb is transposed relative to openvdb's 3x3. */
mat.setTranslation(openvdb::math::Vec3<double>(nanoMap.mVecD));
dstGrid->setTransform(openvdb::math::Transform::createLinearTransform(mat));