Page MenuHome

Array Modifier "Merge" bug?
Closed, ResolvedPublic

Description

System Information
Windows 7 Ultimate, 64 bit, GTX 680
Windows 8 pro, GTX 780ti

Blender Version
Broken: 2.72 RC1
Worked: 2.71

Short description of error
It seems that the Array modifier's "Merge" feature is no longer correctly. It seems to skip over connecting every other generated copy?

Exact steps for others to reproduce the error
In the attached .blend file, take a look at the top of this Octopus in both 2.71 and 2.72. The effect of the breakage seems to be exaggerated when using "alt-a" to play back the animation in an OpenGL shading mode.

(simple example of bug

)

Event Timeline

Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.

Gah, this behavior was intended, from comments in code. Yet, I really see no good reason for it - if it’s the idea that this could end in merging vertices that are farther than threshold distance (neighbor-from-neighbor additive 'error'), it’s way less painful than bug reported here imho.

Campbell, really need your advice here, this simple patch fixes the bug, do you see any issue with it?

1diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
2index 6679648..d338ac0 100644
3--- a/source/blender/modifiers/intern/MOD_array.c
4+++ b/source/blender/modifiers/intern/MOD_array.c
5@@ -606,11 +606,6 @@ static DerivedMesh *arrayModifier_doArray(
6 int target = full_doubles_map[prev_chunk_index];
7 if (target != -1) {
8 target += chunk_nverts; /* translate mapping */
9- /* The rule here is to not follow mapping to chunk N-2, which could be too far
10- * so if target vertex was itself mapped, then this vertex is not mapped */
11- if (full_doubles_map[target] != -1) {
12- target = -1;
13- }
14 }
15 full_doubles_map[this_chunk_index] = target;
16 }
17@@ -624,7 +619,7 @@ static DerivedMesh *arrayModifier_doArray(
18 c * chunk_nverts,
19 chunk_nverts,
20 amd->merge_dist,
21- false);
22+ true);
23 }
24 }
25 }
26@@ -644,7 +639,7 @@ static DerivedMesh *arrayModifier_doArray(
27 first_chunk_start,
28 first_chunk_nverts,
29 amd->merge_dist,
30- false);
31+ true);
32 }
33
34 /* start capping */
35@@ -669,7 +664,7 @@ static DerivedMesh *arrayModifier_doArray(
36 start_cap_start,
37 start_cap_nverts,
38 amd->merge_dist,
39- false);
40+ true);
41 }
42 }
43
44@@ -694,7 +689,7 @@ static DerivedMesh *arrayModifier_doArray(
45 end_cap_start,
46 end_cap_nverts,
47 amd->merge_dist,
48- false);
49+ true);
50 }
51 }
52 /* done capping */
53@@ -711,7 +706,12 @@ static DerivedMesh *arrayModifier_doArray(
54 if (use_merge) {
55 for (i = 0; i < result_nverts; i++) {
56 if (full_doubles_map[i] != -1) {
57- tot_doubles++;
58+ if (i == full_doubles_map[i]) {
59+ full_doubles_map[i] = -1;
60+ }
61+ else {
62+ tot_doubles++;
63+ }
64 }
65 }
66 if (tot_doubles > 0) {

Think this needs the regression tag, in fact :|

So... Will the issue be resolved?

Admiral Potato (admiral_potato) changed the task status from Resolved to Unknown Status.EditedOct 5 2014, 8:47 PM

Sadly, when I opened the blend file that I attached to this bug report with the newly released 2.72, I still had a similar but slightly different issue when animating. It now looks like the modifier is trying to find the very first vertex in the mesh, and merge all of the radially merged verts with that one, but only every other frame of animation. Would you please take a look at the previously attached blend file once more, and press alt-a to start animating it? That's where the problem persists.

See attached animated GIF for an example.