[Bf-codereview] Skin modifier (issue 6220055)

NicholasBishop at gmail.com NicholasBishop at gmail.com
Sat May 19 22:10:07 CEST 2012


Reviewers: bf-codereview_blender.org,

Description:
This patch adds a new modifier for creating a polygon skin based on
mesh vertices and edges. It's based in part on the paper "B-Mesh: A Fast
Modeling System for Base Meshes of 3D Articulated Shapes" (Zhongping
Ji, Ligang Liu, Yigang Wang).

User documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

The code is also accessible as a git repository:
https://github.com/nicholasbishop/blender/tree/skin-modifier

Note: The modifier has an icon created by Julio Iglesias, but the
blender_icons.png.c update has been removed, as it makes the patch too
large for the code review tool.

The full log follows.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Fri Mar 23 01:58:56 2012 -0400

     Add vertex skin radii scaling as a transform operator.

     Add a new transform operator, "Skin Resize", which scales the X and
Y
     axes of the radius field in MVertSkin. It's bound to CTRL+AKEY.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Wed Apr 18 00:39:29 2012 -0400

     Clear skin root flag on new vertices created by extruding.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Sun Apr 15 13:03:46 2012 -0400

     Add operator to extract armature and vertex groups from skin.

     * The operator creates bones for each input edge (does not subdivide
       them like the skin operator does), adds a fake root bone for skin
       roots with multiple children.

     * The operator adds vertex weight groups to the original mesh.

     * Make copy_object_transform() public, used to match the armature
       object to the mesh object.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Fri Mar 23 04:11:00 2012 -0400

     Add skin vertex operators.

     * Add operator to mark selected vertices as skin roots.
     * Add operator to mark/clear selected vertices as loose.
     * Add operator to equalize skin radii.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Tue Mar 27 13:02:26 2012 -0400

     Ensure skin nodes get created when adding modifier.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Fri Mar 23 04:48:38 2012 -0400

     Draw skin vertex roots in edit mode.

     Roots are drawn with a view-oriented dashed red circle around the
     vertex location. The circle's radius is the average if the skin
     vertex's X and Y radii.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Wed Feb 29 22:39:09 2012 -0500

     Add skin modifier: DNA, RNA, UI, and MOD_skin.c implementation.

     Skin modifier documentation:
     http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

     Implementation based in part off the paper "B-Mesh: A Fast Modeling
     System for Base Meshes of 3D Articulated Shapes" (Zhongping Ji,
     Ligang Liu, Yigang Wang)

     Note that to avoid confusion with Blender's BMesh data structure,
     this tool is renamed as the Skin modifier.

     The B-Mesh paper is current available here:
     http://www.math.zju.edu.cn/ligangliu/CAGD/Projects/BMesh/

     The main missing features in this code compared to the paper are:

     * No mesh evolution. The paper suggests iteratively subsurfing the
       skin output and adapting the output to better conform with the
       spheres of influence surrounding each vertex.

     * No mesh fairing. The paper suggests re-aligning output edges to
       follow principal mesh curvatures.

     * No auxiliary balls. These would serve to influence mesh
       evolution, which as noted above is not implemented.

     The code also adds some features not present in the paper:

     * Loops in the input edge graph.

     * Concave surfaces around branch nodes. The paper does not discuss
       how to handle non-convex regions; this code adds a number of
       cleanup operations to handle many (though not all) of these
       cases.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Tue Apr 24 14:20:55 2012 -0400

     Add skin modifier icon created by Julio Iglesias.

Author: Nicholas Bishop <nicholasbishop at gmail.com>
Date:   Mon Apr 9 12:26:51 2012 -0400

     Add MVertSkin DNA/RNA and customdata (CD_MVERT_SKIN).

     The MVertSkin currently just stores local skin radii and skin
     flags (MVertSkinFlag).

     Skin modifier documentation:
     http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

Please review this at http://codereview.appspot.com/6220055/

Affected files:
   release/datafiles/blender_icons.png
   release/scripts/startup/bl_ui/properties_data_modifier.py
   source/blender/blenkernel/BKE_object.h
   source/blender/blenkernel/intern/customdata.c
   source/blender/blenkernel/intern/editderivedmesh.c
   source/blender/blenkernel/intern/object.c
   source/blender/bmesh/operators/bmo_extrude.c
   source/blender/editors/include/ED_transform.h
   source/blender/editors/include/UI_icons.h
   source/blender/editors/object/object_intern.h
   source/blender/editors/object/object_modifier.c
   source/blender/editors/object/object_ops.c
   source/blender/editors/space_view3d/drawobject.c
   source/blender/editors/space_view3d/view3d_draw.c
   source/blender/editors/transform/transform.c
   source/blender/editors/transform/transform.h
   source/blender/editors/transform/transform_conversions.c
   source/blender/editors/transform/transform_ops.c
   source/blender/makesdna/DNA_customdata_types.h
   source/blender/makesdna/DNA_meshdata_types.h
   source/blender/makesdna/DNA_modifier_types.h
   source/blender/makesrna/RNA_access.h
   source/blender/makesrna/intern/rna_mesh.c
   source/blender/makesrna/intern/rna_modifier.c
   source/blender/modifiers/CMakeLists.txt
   source/blender/modifiers/MOD_modifiertypes.h
   source/blender/modifiers/intern/MOD_skin.c
   source/blender/modifiers/intern/MOD_util.c




More information about the Bf-codereview mailing list