Fix T45390: Cycles experimental displacement method ignores scaling when render
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Jul 2015 13:22:36 +0000 (15:22 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 13 Jul 2015 13:24:56 +0000 (15:24 +0200)
From artists perspective it makes sense to always apply displacement in a local
space.

TODO: Double-check that BVH is being packed properly. From quick tests seems it's
all fine, but might be missing some obvious failure still.

intern/cycles/render/object.cpp

index 4a57ac4dff11b5168f9a2404d9fba81238327abf..ec85aa8f80bd5f9eca9b887754d600e040a6bfb7 100644 (file)
@@ -512,7 +512,9 @@ void ObjectManager::apply_static_transforms(DeviceScene *dscene, Scene *scene, u
 
        /* apply transforms for objects with single user meshes */
        foreach(Object *object, scene->objects) {
-               if(mesh_users[object->mesh] == 1) {
+               if(mesh_users[object->mesh] == 1 &&
+                  object->mesh->displacement_method == Mesh::DISPLACE_BUMP)
+               {
                        if(!(motion_blur && object->use_motion)) {
                                if(!object->mesh->transform_applied) {
                                        object->apply_transform(apply_to_motion);