diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-11 18:32:57 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-11 18:32:57 +0300 |
commit | 394fa07d41bf403920806522e6ca09a9531bca29 (patch) | |
tree | 0f4f1e56f96403139485bb47b501cf245b458fa1 /intern/cycles/blender/blender_util.h | |
parent | 38b01415546f2530ced77e91ac2d57b37b576b07 (diff) |
Cycles: Fix wrong motion blur when combining deformation motion blur with autosplit
The issue was that we used to compare number of vertices for mesh after the auto
smooth was applied (at the center of the shutter time) with number of vertices
prior to the auto smooth applied. This caused false-positive consideration of a
mesh as changing topology.
Now we do autosplit as early as possible and do it from blender side, so Cycles
does not need to re-implement splitting on it's side.
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r-- | intern/cycles/blender/blender_util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index 92db5fdfd45..b67834cdea3 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -74,7 +74,12 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data, if((bool)me) { if(me.use_auto_smooth()) { - me.calc_normals_split(); + if(subdivision_type == Mesh::SUBDIVISION_CATMULL_CLARK) { + me.calc_normals_split(); + } + else { + me.split_faces(); + } } if(subdivision_type == Mesh::SUBDIVISION_NONE) { me.calc_tessface(true); |