diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-22 11:06:48 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-05-22 11:06:48 +0400 |
commit | acd468f2b313ae576d2a4a06d26f19aad19f716c (patch) | |
tree | c651d162145e80781e44204c80fff1ac078f91b3 | |
parent | 72f38b4f097120e6d4c5b3b0c9aceda7d1782583 (diff) |
Fix #31500: Displacement Baking from Multires doesn't work
Issue was caused by wrong calculation of grid coordinates when switching
from low resolution mesh to high resolution mesh. Somehow was affected only
for face U or V equals to 1.0f.
Checked fix using all test files used during initial implementation of
multires baker and tested sample file from bug/ Seems everything is OK.
-rw-r--r-- | source/blender/editors/object/object_bake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index b89562e772b..810fe244984 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -534,7 +534,7 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, const int *orig int grid_index = origindex[face_index]; int loc_offs = face_index % (1 << (2 * lvl)); int cell_index = loc_offs % ((side - 1) * (side - 1)); - int cell_side = grid_size / (side - 1); + int cell_side = (grid_size - 1) / (side - 1); int row = cell_index / (side - 1); int col = cell_index % (side - 1); |