Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1531)

Issue 6220055: Skin modifier (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by nicholasbishop
Modified:
12 years, 6 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

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@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@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@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@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@gmail.com> Date: Tue Mar 27 13:02:26 2012 -0400 Ensure skin nodes get created when adding modifier. Author: Nicholas Bishop <nicholasbishop@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@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@gmail.com> Date: Tue Apr 24 14:20:55 2012 -0400 Add skin modifier icon created by Julio Iglesias. Author: Nicholas Bishop <nicholasbishop@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

Patch Set 1 #

Total comments: 40

Patch Set 2 : Updated with suggested changes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2905 lines, -31 lines) Patch
release/datafiles/blender_icons.png View 0 chunks +-1 lines, --1 lines 0 comments Download
release/scripts/startup/bl_ui/properties_data_modifier.py View 1 1 chunk +24 lines, -0 lines 0 comments Download
source/blender/blenkernel/BKE_blender.h View 1 1 chunk +1 line, -1 line 0 comments Download
source/blender/blenkernel/BKE_mesh.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
source/blender/blenkernel/BKE_object.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/blenkernel/intern/customdata.c View 1 4 chunks +41 lines, -9 lines 0 comments Download
source/blender/blenkernel/intern/editderivedmesh.c View 1 1 chunk +14 lines, -0 lines 0 comments Download
source/blender/blenkernel/intern/mesh.c View 1 1 chunk +12 lines, -0 lines 0 comments Download
source/blender/blenkernel/intern/object.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
source/blender/bmesh/intern/bmesh_queries.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/bmesh/intern/bmesh_queries.c View 1 1 chunk +43 lines, -0 lines 0 comments Download
source/blender/bmesh/operators/bmo_extrude.c View 1 5 chunks +31 lines, -0 lines 0 comments Download
source/blender/editors/include/ED_transform.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/editors/include/UI_icons.h View 1 1 chunk +1 line, -1 line 0 comments Download
source/blender/editors/include/UI_resources.h View 1 1 chunk +3 lines, -1 line 0 comments Download
source/blender/editors/interface/resources.c View 1 3 chunks +12 lines, -0 lines 0 comments Download
source/blender/editors/object/object_intern.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
source/blender/editors/object/object_modifier.c View 1 5 chunks +410 lines, -0 lines 0 comments Download
source/blender/editors/object/object_ops.c View 1 1 chunk +5 lines, -0 lines 0 comments Download
source/blender/editors/space_view3d/drawobject.c View 1 6 chunks +53 lines, -10 lines 0 comments Download
source/blender/editors/space_view3d/view3d_draw.c View 1 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/editors/transform/transform.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/editors/transform/transform.c View 1 3 chunks +94 lines, -1 line 0 comments Download
source/blender/editors/transform/transform_conversions.c View 1 4 chunks +20 lines, -2 lines 0 comments Download
source/blender/editors/transform/transform_ops.c View 1 7 chunks +36 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_customdata_types.h View 1 3 chunks +5 lines, -5 lines 0 comments Download
source/blender/makesdna/DNA_meshdata_types.h View 1 1 chunk +21 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_modifier_types.h View 1 2 chunks +27 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_userdef_types.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
source/blender/makesrna/RNA_access.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_mesh.c View 1 6 chunks +122 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_modifier.c View 1 4 chunks +40 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_userdef.c View 1 1 chunk +5 lines, -0 lines 0 comments Download
source/blender/modifiers/CMakeLists.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/modifiers/MOD_modifiertypes.h View 1 1 chunk +1 line, -0 lines 0 comments Download
source/blender/modifiers/intern/MOD_skin.c View 1 1 chunk +1855 lines, -0 lines 1 comment Download
source/blender/modifiers/intern/MOD_util.c View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7
nicholasbishop
12 years, 6 months ago (2012-05-19 20:10:07 UTC) #1
ideasman42
http://codereview.appspot.com/6220055/diff/1/source/blender/blenkernel/intern/customdata.c File source/blender/blenkernel/intern/customdata.c (right): http://codereview.appspot.com/6220055/diff/1/source/blender/blenkernel/intern/customdata.c#newcode1003 source/blender/blenkernel/intern/customdata.c:1003: vs[i].radius[2] = 0.25f; *picky* - copy_v3_fl() saves some pointer ...
12 years, 6 months ago (2012-05-20 17:53:48 UTC) #2
nicholasbishop
Thanks for reviewing :) I'm working my way through the changes now, couple quick questions: ...
12 years, 6 months ago (2012-05-20 22:47:03 UTC) #3
ideasman42
1) --- thats bad!, fixed in svn. 2) --- no, but may as well add ...
12 years, 6 months ago (2012-05-21 06:46:47 UTC) #4
nicholasbishop
I've updated the patch with most of the changes you suggested applied. New BKE/BM functions: ...
12 years, 6 months ago (2012-05-21 23:13:31 UTC) #5
ideasman42
LGTM (noted one small suggestion) http://codereview.appspot.com/6220055/diff/4003/source/blender/modifiers/intern/MOD_skin.c File source/blender/modifiers/intern/MOD_skin.c (right): http://codereview.appspot.com/6220055/diff/4003/source/blender/modifiers/intern/MOD_skin.c#newcode960 source/blender/modifiers/intern/MOD_skin.c:960: dv->totweight = input_dvert->totweight; prefer ...
12 years, 6 months ago (2012-05-22 06:25:45 UTC) #6
nicholasbishop
12 years, 6 months ago (2012-05-22 15:35:00 UTC) #7
Committed as revisions 46885-46886, 46888-46897.

Had a glitch with git-svn dcommit, so most of the commits lost their "reviewed
by Campbell Barton" line, but thanks again for reviewing :)

On 2012/05/22 06:25:45, ideasman42 wrote:
> LGTM (noted one small suggestion)
> 
>
http://codereview.appspot.com/6220055/diff/4003/source/blender/modifiers/inte...
> File source/blender/modifiers/intern/MOD_skin.c (right):
> 
>
http://codereview.appspot.com/6220055/diff/4003/source/blender/modifiers/inte...
> source/blender/modifiers/intern/MOD_skin.c:960: dv->totweight =
> input_dvert->totweight;
> prefer to use defvert_copy() here
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b