From ea12df51b8da5cc1a7b9e1b923d24c4a54bf2c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Fri, 26 Mar 2021 10:49:43 +0100 Subject: Fix T86939: Cycles objects bounds not updated when transforming objects As a rather premature optimization from rBbbe6d4492823, Object bounds were only computed when either the Object or its Geometry were modified. Prior to rB42198e9eb03b, this would work, as the Geometry was tagged as modified if the Object's transform was also modified. Since this tagging is not done anymore due to side effects, and since at the time bounds are computed Objects were already processed and tag as unmodified, the check on the modified status was always false. For now remove this check, so the bounds are always unconditionally updated. If this ever becomes a performance problem in large scenes with motion blur, we will then try to find a way to nicely optimize it. This would only affect BHV2 as OptiX and Embree handle object bounds themselves. --- intern/cycles/render/object.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 52f63685aeb..8b3ac31cf8b 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -153,10 +153,6 @@ void Object::update_motion() void Object::compute_bounds(bool motion_blur) { - if (!is_modified() && !geometry->is_modified()) { - return; - } - BoundBox mbounds = geometry->bounds; if (motion_blur && use_motion()) { -- cgit v1.2.3