Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used
authorMai Lavelle <mai.lavelle@gmail.com>
Sat, 27 Aug 2016 21:57:36 +0000 (17:57 -0400)
committerMai Lavelle <mai.lavelle@gmail.com>
Sat, 27 Aug 2016 22:07:04 +0000 (18:07 -0400)
Meshes with Cycles subdivision were being transformed to world space leading to
normals to sometimes be calculated in that space, while they should be in
object space. Also caused dicing to happen at the wrong rate for scaled meshes.

intern/cycles/render/object.cpp

index 62076f3a86598b683fe1f6663cfc851fc7b061a3..db44327e24c2bba29a7c161d035d0e3aef98b5ca 100644 (file)
@@ -692,7 +692,7 @@ void ObjectManager::apply_static_transforms(DeviceScene *dscene, Scene *scene, u
                 * Could be solved by moving reference counter to Mesh.
                 */
                if((mesh_users[object->mesh] == 1 && !object->mesh->has_surface_bssrdf) &&
-                  !object->mesh->has_true_displacement())
+                  !object->mesh->has_true_displacement() && object->mesh->subdivision_type == Mesh::SUBDIVISION_NONE)
                {
                        if(!(motion_blur && object->use_motion)) {
                                if(!object->mesh->transform_applied) {