[Bf-blender-cvs] [a5261e0] master: Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used

Mai Lavelle noreply at git.blender.org
Sun Aug 28 00:09:24 CEST 2016


Commit: a5261e06a309982a47e207faf59194c59408dbad
Author: Mai Lavelle
Date:   Sat Aug 27 17:57:36 2016 -0400
Branches: master
https://developer.blender.org/rBa5261e06a309982a47e207faf59194c59408dbad

Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used

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.

===================================================================

M	intern/cycles/render/object.cpp

===================================================================

diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 62076f3..db44327 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -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) {




More information about the Bf-blender-cvs mailing list