Page MenuHome

Rig>Deform:Curve bones>Segment 32 (ease in 0 ease out0) ..max rotation causes this segmented bone stop rotating and flips
Closed, ArchivedPublic

Description

System Information
Operating system and graphics card
win 7 64bits, intel default graphic
Blender Version
Broken: (example: 2.69.7 4b206af, see splash screen)
broken very ;atest blender 2.70 official released

Short description of error
download this file..i have created.>>


Exact steps for others to reproduce the error
download file above....hard to explain !

Details

Type
Bug

Event Timeline

yellow foxz (yellowfoxz) set Type to Bug.
yellow foxz (yellowfoxz) created this task.
yellow foxz (yellowfoxz) raised the priority of this task from to Needs Triage by Developer.

Another bone issues. Mind having a look? :)

Sergey Sharybin (sergey) triaged this task as Normal priority.Apr 10 2014, 7:18 PM

So, that small patch seems to fix that glitch (yet another '-180° to 180° gap' one).

1diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
2index 3920f59..5f4beab 100644
3--- a/source/blender/blenkernel/intern/armature.c
4+++ b/source/blender/blenkernel/intern/armature.c
5@@ -506,7 +506,7 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BB
6 invert_m3_m3(imat3, mat3);
7 mul_m3_m3m3(mat3, result, imat3); /* the matrix transforming vec_roll to desired roll */
8
9- roll1 = (float)atan2(mat3[2][0], mat3[2][2]);
10+ roll1 = angle_compat_rad((float)atan2(mat3[2][0], mat3[2][2]), pchan->prev_roll1);
11 }
12 }
13 else {
14@@ -544,14 +544,14 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BB
15 invert_m3_m3(imat3, mat3);
16 mul_m3_m3m3(mat3, imat3, result); /* the matrix transforming vec_roll to desired roll */
17
18- roll2 = (float)atan2(mat3[2][0], mat3[2][2]);
19+ roll2 = angle_compat_rad((float)atan2(mat3[2][0], mat3[2][2]), pchan->prev_roll2);
20
21 /* and only now negate handle */
22 mul_v3_fl(h2, -hlength2);
23 }
24 else {
25 h2[0] = 0.0f; h2[1] = -hlength2; h2[2] = 0.0f;
26- roll2 = 0.0;
27+ roll2 = 0.0f;
28 }
29
30 /* make curve */
31@@ -578,6 +578,9 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BB
32 mul_serie_m4(result_array[a].mat, iscalemat, result_array[a].mat, scalemat, NULL, NULL, NULL, NULL, NULL);
33 }
34 }
35+
36+ pchan->prev_roll1 = roll1;
37+ pchan->prev_roll2 = roll2;
38 }
39
40 /* ************ Armature Deform ******************* */
41diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
42index dab825c..026f75c 100644
43--- a/source/blender/makesdna/DNA_action_types.h
44+++ b/source/blender/makesdna/DNA_action_types.h
45@@ -239,6 +239,10 @@ typedef struct bPoseChannel {
46 float ikrotweight; /* weight of joint rotation constraint */
47 float iklinweight; /* weight of joint stretch constraint */
48
49+ /* For handling BBones. */
50+ float prev_roll1;
51+ float prev_roll2;
52+
53 void *temp; /* use for outliner */
54 } bPoseChannel;
55

Now, I’m not quite sure about it… Piling bbones + IK + other constraints leads us to lands of hyper-complications. Joshua, thoughts here?

@Bastien Montagne (mont29): relying on the previous roll seems risky, it means you can't reliably jump to a frame and be sure the pose state will the the same as when played from the beginning.

Yes… TBH, I would be tempted to close this as "known limitation"/TODO… Rotation handling in current constraints is really week anyway.

Bastien Montagne (mont29) closed this task as Archived.Jun 16 2014, 2:05 PM

Closing as TODO (see http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Armature), pretty sure we can’t fix this in a correct way with current code…