diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-02 11:40:25 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-02 11:40:25 +0400 |
commit | 4a33d7f210ab4007d3c590548cae74708cee11fc (patch) | |
tree | 0f7f8bb9b001ac8831f6d402843c071e45a40b4a /source/blender/editors/object/object_bake.c | |
parent | 301c4bd09ad01f8ff6d7b8c7761edf1506b4e7e7 (diff) |
Fix related on #31984: Multires Displacement Bake creates ripples for each subidived face
Skip applying subdivisions in cases when low resolution mesh is disabled
and baking happens from higher level to higher level/
Diffstat (limited to 'source/blender/editors/object/object_bake.c')
-rw-r--r-- | source/blender/editors/object/object_bake.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 810fe244984..e1c715952d1 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -616,13 +616,15 @@ static void *init_heights_data(MultiresBakeRender *bkr, Image *ima) CLAMP(ss_lvl, 0, 6); - smd.levels = smd.renderLevels = ss_lvl; - smd.flags |= eSubsurfModifierFlag_SubsurfUv; + if (ss_lvl > 0) { + smd.levels = smd.renderLevels = ss_lvl; + smd.flags |= eSubsurfModifierFlag_SubsurfUv; - if (bkr->simple) - smd.subdivType = ME_SIMPLE_SUBSURF; + if (bkr->simple) + smd.subdivType = ME_SIMPLE_SUBSURF; - height_data->ssdm = subsurf_make_derived_from_derived(bkr->lores_dm, &smd, NULL, 0); + height_data->ssdm = subsurf_make_derived_from_derived(bkr->lores_dm, &smd, NULL, 0); + } } height_data->origindex = lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX); |