From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Results of GSoC 2014 shape keys

Mesh shape key recalculation in Edit Mode is now faster in most cases

Now, while recalcualting shape keys, Blender checks if the mesh's topology has changed from the previous state by hashing the mesh's topology. This speeds up most of the operations involving shapekey switching nearly 2x. This has an even 'visible' effect on large shapekey-related meshes reducing the lag while switching the shape keys and going out of editmode.

Here is a comparison between times master Blender and soc-2014-shapekey Blender take to perform various shapekey-realated operations on different meshses: [[1]]

Mesh shape keys are now compressed on file save

While saving shape keys (and writing Object Mode undo-s) Blender checks that the vertex has changed from the basis position. This saves considerable space especially on dense shapekey meshes. The user has an option to save keyblocks in the 'legacy' old format.

Gsoc-keys-shape-storage.png

This image highlights the vertices that are changed from the rest position -- in master Blender the unchanged verts are stored too which makes a considerable impact on memory and disk usage.

The test file containing a 4.5 kVert head rigged for facial animation with over 150 shapekeys has shown a 3x reduction of space needed to store the mesh: [[2]]

Alternative shape key mix for Edit Mode

The user now can use an alternative mix while sculpting the shape key on top of a mix in Edit Mode if shape keys are animated and that gets in the way.

New Operator: Commit to Another Shape

Sometimes it happens that the user edits the wrong shape key. The Commit to Another Shape key operator preserves the original shape and silently switches to another shape key that the user selects, where the user can continue editing.

This simple operator can be seen in action in this video @ 2:16.

Fixed T35170: Undo bug between shape keys

While adding Commit to New Shape, minor changes were required to the edit mode undo system which fixed this undo bug caused by a desyncronization between the Edit Mesh CD_SHAPEKEY customdata layers and the Real Mesh KeyBlocks.

The manipulator and the transfrom markers now are drawn with regards to the derived mesh cage

Now Blender uses the coordinates of the deformed mesh cage vertices when drawing the manipulator which fixes it being drawn in the wrong place when there're modifiers on the mesh.

This pictire demostrates where the manipulator's being drawn on a deformed mesh in master Blender and soc-2014-shapes Blender

Work-in-progress. While I have a totally working implementation of this feature it's not good from the performance standpoint yet.

Modal Blend from Shape

The Blend from Shape operator got a modal behavior, allowing for easy Adding/Interpreting between shape keys with proportional falloffs adjusted by the mouse movements. The operator uses new special proportional falloff calculation routines specifically done for BMeshes and supports connected, projected and simple falloff modes with all falloff interpolators.

Work-in-progress. Need a way to filter the shapes we're blending between and International keyblock names support and a way to access the new bmesh proportional editing calculation routines from Python will be really nice.

The operator is seen in action in this video @ the beginning.

Gsoc-keys-blendfromshape.png

This screenshot shows adding OpenUpperLip to OpenJaw. Connected proportional editing is at work, only the mouth corners are selected.

Minor

  1. The Move Shape Key operator now has options for moving the shape key to the top or the bottom of the shape key list.

Gsoc-keys-move.png

  1. The 'Apply Shape Keys in Editmode' button is now visible only in Edit Mode
  2. In sculpt mode, new shape keys will have value = 1.0
  3. It's now forbidden to set a shape key to be relative to itself via RNA.

Intersting features not implemented over the course of this GSoC for future reference

  1. Make shape keys that come from linked library animatable with a proxy
  2. Add in a system to define custom evaluation routines for a shapekey
  3. Allow local mesh deformations to act as drivers for further deformations
  4. Add a "Shape Key Brush" brush that blends in the selected shape key in the active shape key

Next steps

  1. Cherry-pick all features to be in their own local branches for ease of review
  2. Inspection of code the get rid of leftover logic from non-implemented features