bones_gui.txt 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. ABOUT THE GUI OF BONES IN SYNFIGSTUDIO
  2. ======================================
  3. This document shows the current GUI of synfigstudio being developed and
  4. the pending features that needs to be done. The things that already are
  5. done are marked as (DONE) and the one pending are marked as (PEND).
  6. For more information about how the bones works in synfig-core see the
  7. corresponding document in synfig-core/trunk/docs/bones_core.txt (PEND)
  8. PRINCIPLES
  9. ----------
  10. 1) The user should not need to edit the parms directly in the skeleton
  11. or the blines unless a fine tuning or animation of the setup is
  12. needed. (PEND)
  13. 2) The bones are visible when the user select a skeleton layer.(DONE) When
  14. the user selects a layer that has a vertex under bone influence then
  15. the correspoinding bones are shown too (DONE)
  16. BASIC USAGE -WORKFLOW
  17. ---------------------
  18. 1) The user draws its stuff using the usual tools.
  19. 2) The user creates a skeleton in not animation mode. This implies:
  20. 2.1) Add a bone
  21. 2.2) Remove a bone
  22. 2.3) (Re)parent a bone.
  23. 3) The user binds the vertex/blinepoint to the bone(s). This implies:
  24. 3.1) Select a vertex/blinepoint and assign bone(s) to it.
  25. 3.2) Modify the weights of each bone over the vertex.
  26. 4) In non animation mode the user "tests" the skeleton: is happy with
  27. the current bind of the vertices or do a fine tuning.
  28. 4.1) Modify the ducks of the bones.
  29. 4.2) Modify the values of the weights.
  30. 4.3) (Re)Bind vertices to bones.
  31. 4.4) (Re)Parent bones.
  32. 5) The user changes to animation mode and animate the skeleton. This
  33. implies:
  34. 5.1) Manipulate ducks
  35. 5.2) (Re)parent bones.
  36. 5.3) Modify the Link values of the bone influenced vertex/blinepoint.
  37. 5.4) Eventually modify the weights. (RE)Bind.
  38. 6) Eventually the user can animate the parent of the bones, the weight
  39. influences values, the setup values, etc.
  40. BONES DUCKS
  41. -----------
  42. Those are the bones parameters and its corresponding interface in the
  43. edition window (GUI interface) and in the parameter panel (Param Interface):
  44. Parameter name Type GUI Interface Param Interface
  45. -------------- ---- ------------- ---------------
  46. Name String <none> Edit string input
  47. Parent Bone Value Node <none>(PEND) Drop down list
  48. Origin Vector position duck (green) (real,real)
  49. Angle Real angle duck (blue) real
  50. Local Length Scale Real real duck (cyan) real
  51. Local Width Scale Real width duck (purple) real
  52. Recursive Length Scale Real real duck (cyan) real
  53. Recursive Width Scale Real width duck (purple) real
  54. Origin Setup Vector position duck (green) (real,real)
  55. Angle Setup Real angle duck (blue) real
  56. Length Setup Real real duck (cyan) real
  57. Strength Setup Real <none> (PEND) real
  58. SETUP LOCAL and RECURSIVE
  59. To define a bone and manipulate it you only need to draw three ducks:
  60. origin, angle, and tip. The tip is placed at the end of the bone length.
  61. Due to there are two sets of ducks (setup and non setup) the user see
  62. the corresponding ducks by pressing a toggle keyboard combination:
  63. ALT-7: Toggles between setup and non setup ducks. (DONE)
  64. Also to be able to see the local and recursive scales there is also other
  65. toggle keyboard combination to do that:
  66. ALT-8: Toggles between local and recursive scales ducks. (DONE)
  67. The movement of the Length Scales (Local and Recursive) and Length Setup
  68. ducks are restricted to be alingend with the current bone angle. (DONE)
  69. Strength: Strength has not visual interface yet, but it should be like a
  70. blob around the line that connects the Origin(0) and the Tip(0). It can
  71. be represented by a dashed line like the one I draw in the wiki to explain
  72. the "distance to a bone": See http://synfig.org/Image:Strength.png. (PEND)
  73. The usage of Strenght will be seen later.
  74. All those ducks are modified by the Normal Tool of synfigstudio by click
  75. and drag.
  76. PARENT INTERFACE
  77. ----------------
  78. The user can change the parentship using the mouse and without need to
  79. expand the bone valuenode and select a parent in the drop down list.
  80. In this way the user should see some visual interface to know
  81. what's the parent of a bone without expanding the skeleton Bone
  82. list. That parentship will be represented by an arrow. Usually the
  83. arrow goes form child to parent. So a parent with lots of children
  84. has a lot of arrows pointing to it. I think that the arrow should go from
  85. child origin to parent origin. There is be a way to show/hide those arrows
  86. to allow the user check the parent-child relationship during the animation
  87. process. As well as parents are animatable those arrows changes by the
  88. time too.
  89. ALT-9 toggles parent arrows (PEND)
  90. The arrow can point form parent to children. It is more consistent and
  91. better visually. There is not need to have lots of arrows tips to be
  92. overlapping on the parent origin. The arrows tips only goes to the
  93. child, so as well as a child can only have a parent the arrows tips
  94. doesn't overlap.
  95. Work flow (PEND):
  96. 1) Two bones are not parented and the user want to make one (bone1)
  97. the child of other (bone2). Then the user selects the origin of the
  98. bone1 and right click the origin of the bone2 and select "Make
  99. Parent" from the context menu.
  100. 2) Two bones are parent and child (bone2(child)<--bone1(parent))and
  101. you want to unparent the child to select other parent (bone3). The
  102. user selects the child (bone2) and do the same than case 1. Then
  103. synfigstudio should do it in two steps (unparent bone2 from bone1
  104. and parent bone2 to bone3). The result should be:
  105. bone2(child)<--bone3(parent)
  106. 3) A bone is child of a parent and want to turn into a root bone. Just
  107. select its origin and right click and select "Unparent" from the context
  108. menu.
  109. When the user tries to do illegal things (ie. make parent a child bone
  110. or past child bone or future child bone) then the right click doesn't
  111. offer the "Make Parent" option and only the "Unparent" one (that is
  112. always valid)
  113. SETUP AND ANIMATED SKELETONS
  114. ----------------------------
  115. By using the ALT-7 keyboard combintation the user sees the setup or the
  116. non setup skeletons.
  117. When the user is creating the skeleton and is modifiying it in non
  118. animation mode then the setuo and the non setup skeletons should be the
  119. same. In this way the workflow for this creation of the skeleton will be:
  120. 1) In non animation mode and with no waypoints, modify the setup skeleton
  121. should modify also the not setup skeleton. In this case there is not difference
  122. between one skeleton and the other and the interface will mdify both at
  123. the same time.
  124. 2) Once you're in animation mode you can modify either the setup skeleton
  125. or the non setup skeleton. From the first modification both skeletons are
  126. separated and distinguished. Toggle both to see the difference.
  127. ADD BONE TOOL (PEND)
  128. -------------
  129. It is needed a new Add Bone tool like the Bline tool. That tool would
  130. add bones to a new skeleton layer or to a existing skeleton layer.
  131. WORKFLOW:
  132. 0) (optional) select a skeleton layer
  133. 1) Select the tool
  134. 2) (optional) CTRL-click to a origin of a bone and select it.
  135. 3) Left click where the origin should be.
  136. 4) Drag to where the tip should be.
  137. 5) Release mouse button and the bone is created. The origin of the new
  138. bone is selected and any other origin bone is unselected.
  139. If there were one origin bone selected then the new create bone becomes
  140. a child of that bone, if not the new bone is root bone.
  141. There are some options in the options tool panel:
  142. 1) Text entry: Bone name. It would use on the bone base name, like the
  143. layers of other tools.
  144. 2) "Force create a new skeleton": if checked it always creates a new
  145. skeleton layer regardless if there is a skeleton layer selected.
  146. If the option force create a new skeleton is off then the new added bones
  147. are:
  148. a) Added to a new skeleton layer (if there weren't any skeleton layer selected
  149. at step 0)
  150. b) Added to the first skeleton layer of the selected layers
  151. I suggest to use the code from the bline tool and the draw tool as
  152. templates to create the new bone tool.
  153. WEIGHT DUCKS (PEND)
  154. ------------
  155. There are weights per vertex and per bone. So the weights can be seen
  156. form the point of vew of the bone or from the point of view of the vertex.
  157. The most useful way of see the weigths are form the point of vew of the
  158. vertex (or bilinepoint) that is bone influenced.
  159. So a proposal for the interface is:
  160. The user selects a vertex/blinepoint and the interface shows the weight(s)
  161. of the bone(s) over that vertex/bilinepoint. It can be a radius duck centered
  162. on the bone's tip.
  163. "Select" means select it in the bline list or select the vertex parameter.
  164. I don't know if it is possible to "select" it with the mouse (draw a red
  165. square around) like if it is selected in the parameter panel.
  166. ---------------------not delete for reference only----------------------
  167. (10:23:52) Carlos: there is also other thing I didn't mention about
  168. the weights
  169. (10:25:07) Carlos: if you pick a bline and pick a bone too then with
  170. ALT-9 you can show a real duck over each vertex
  171. (like the width ducks) to allow the user see and
  172. modify individual weights)
  173. (10:25:41) Carlos: in that state you can only pick a bone each time to
  174. see only the influence of the bone on the bline
  175. (10:26:28) Carlos: it is like draw the weights around the vertices
  176. like the widths ducks are drawn.
  177. ------------------------------------------------------------------------
  178. REMOVING and INSERTING A BONE
  179. -----------------------------
  180. Remove:
  181. When the user selects a bone in the skeleton layer can do right click
  182. and select remove item smart then the bone is removed from the list and
  183. that DOESN'T DELETE A VALUENODE, it just removed the valuenode
  184. form the list and keep it alive meanwhile anyone refereces to that
  185. valuenode. Even the history can keep a valuenode alive if it is not
  186. cleaned. So, any other bone that has that bone as parent keeps it as
  187. parent. It will be alive until any children refereces to it as parent,
  188. there were no history entry of it and it is not referenced in the child
  189. panel or any other valuenode. (DONE)
  190. So remove an item smart from a list keeps the valuenode in any place
  191. where it has been used. For example the parent parameter.
  192. It is reponsability of the user restore the correct parent of the other
  193. bones if really he doesn't want that the removed bone belongs to the
  194. skeleton anymore. (DONE)
  195. The user can remove item smart by right click on the bone's origin duck
  196. and selecting the "Remove item (smart)". (PEND)
  197. Insert:
  198. When the user selects a bone in the bone list and right click and selects
  199. the "Insert item (smart)" option then a new bone is inserted, placed at
  200. the tip of the origin of the bone where the right click was done and it is
  201. a child of that bone where the right click was done. The rest of values
  202. are the default ones. (PEND)
  203. BIND BONES TO A VERTEX/BLINEPOINT
  204. ---------------------------------
  205. Once the skeleton is created and the stuff is drawn it comes the step of
  206. bind the bones to the vertex/blinepoints.
  207. WORKFLOW:
  208. 1) The user selects the drawn stuff
  209. 2) The user selects a skeleton layer too.
  210. 3) The user selects a vertex/blinepoint or a group of them
  211. 4) The user does rigth click on a bone and select "Add to Bone Influence"
  212. Then the GUI should add the current bone where the right click was done
  213. to the Bone Weight Pair list of the selected vertices/blinepoints.
  214. If the vertex/blinepoint is not converted to Bone influence then convert it
  215. to that too first and add the bone after.
  216. If the bone is already part of the Bone Weight pair list then do nothing.
  217. The initial weight can be 1.0.
  218. -----------------------DO NOT DELETE YET--------------------------------
  219. So the user, in set up moment can ask to synfigstudio to assign a
  220. weight to each bone weight pair based on the distance form the point
  221. to the bone and the strength of the bone. For instance, if a point is
  222. at the same "distance" from bone1 and from bone2 but bone1 has higher
  223. strength than the bone2 then the weight value of the bone weight pair
  224. for that particular point and for bone1 is higher than the weight of
  225. the bone weight pair for the bone2. The relationship of the weight and
  226. the distance and the strength is given by the formulations written in
  227. this page: http://synfig.org/Talk:Bone_Layer. It can be simplified if
  228. you want.
  229. The "binding mode" (Fixed, Flexi-Binded, Region-Linear,
  230. Region-parabolic) should be part of the skeleton layer so it can be a
  231. parameter from a drop down list. It doesn't make sense this value to
  232. produce any waypoint because it is just used in setup mode. Its
  233. modification doesn't modify the current values of the weights of the
  234. bone weight pairs. Only if the user override the current Vertex Bone
  235. conversion and start it over then it can have a new usage.
  236. ------------------------------------------------------------------------