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

Issue 15580049: Laplacian Deform Modifier

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

Description

Laplacian Deform Modifier

Patch Set 1 #

Total comments: 37

Patch Set 2 : Laplacian Deform update 1 #

Total comments: 47
Unified diffs Side-by-side diffs Delta from patch set Stats (+975 lines, -0 lines) Patch
M release/scripts/startup/bl_ui/properties_data_modifier.py View 1 1 chunk +5 lines, -0 lines 0 comments Download
M source/blender/blenloader/intern/readfile.c View 1 chunk +9 lines, -0 lines 0 comments Download
M source/blender/blenloader/intern/writefile.c View 1 chunk +5 lines, -0 lines 0 comments Download
M source/blender/makesdna/DNA_modifier_types.h View 2 chunks +10 lines, -0 lines 0 comments Download
M source/blender/makesrna/RNA_access.h View 1 chunk +1 line, -0 lines 0 comments Download
M source/blender/makesrna/intern/rna_modifier.c View 1 5 chunks +38 lines, -0 lines 1 comment Download
M source/blender/modifiers/CMakeLists.txt View 1 chunk +1 line, -0 lines 0 comments Download
M source/blender/modifiers/MOD_modifiertypes.h View 1 chunk +1 line, -0 lines 0 comments Download
A source/blender/modifiers/intern/MOD_laplaciandeform.c View 1 1 chunk +904 lines, -0 lines 46 comments Download
M source/blender/modifiers/intern/MOD_util.c View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10
howardt
https://codereview.appspot.com/15580049/diff/1/release/scripts/startup/bl_ui/properties_data_modifier.py File release/scripts/startup/bl_ui/properties_data_modifier.py (right): https://codereview.appspot.com/15580049/diff/1/release/scripts/startup/bl_ui/properties_data_modifier.py#newcode377 release/scripts/startup/bl_ui/properties_data_modifier.py:377: layout.row().prop(md, "iterations") Your code had just layout.pro(md, "iterations") but ...
10 years, 6 months ago (2013-10-22 14:14:15 UTC) #1
howardt
I uploaded Alexander's changes in response to my first comments as a second patch set. ...
10 years, 6 months ago (2013-10-23 10:58:55 UTC) #2
apinzonf
https://codereview.appspot.com/15580049/diff/1/release/scripts/startup/bl_ui/properties_data_modifier.py File release/scripts/startup/bl_ui/properties_data_modifier.py (right): https://codereview.appspot.com/15580049/diff/1/release/scripts/startup/bl_ui/properties_data_modifier.py#newcode377 release/scripts/startup/bl_ui/properties_data_modifier.py:377: layout.row().prop(md, "iterations") On 2013/10/22 14:14:16, howardt wrote: > Your ...
10 years, 6 months ago (2013-10-23 20:35:13 UTC) #3
ideasman42
Lots of small comments - main thing Im concerned about is converting to BMesh which ...
10 years, 6 months ago (2013-10-23 20:39:19 UTC) #4
ideasman42
Added minor note, also - tselem_draw_icon() misses the new modifier in 'switch ((ModifierType)md->type) {' statement. ...
10 years, 6 months ago (2013-10-23 20:43:36 UTC) #5
apinzonf
https://codereview.appspot.com/15580049/diff/60001/source/blender/modifiers/intern/MOD_laplaciandeform.c File source/blender/modifiers/intern/MOD_laplaciandeform.c (right): https://codereview.appspot.com/15580049/diff/60001/source/blender/modifiers/intern/MOD_laplaciandeform.c#newcode112 source/blender/modifiers/intern/MOD_laplaciandeform.c:112: memset(sys->no, 0.0, sizeof(float) * totalVerts * 3); ok, Done, ...
10 years, 6 months ago (2013-10-23 23:16:29 UTC) #6
apinzonf
https://codereview.appspot.com/15580049/diff/60001/source/blender/modifiers/intern/MOD_laplaciandeform.c File source/blender/modifiers/intern/MOD_laplaciandeform.c (right): https://codereview.appspot.com/15580049/diff/60001/source/blender/modifiers/intern/MOD_laplaciandeform.c#newcode634 source/blender/modifiers/intern/MOD_laplaciandeform.c:634: BLI_array_declare(index_anchors); On 2013/10/23 20:39:20, ideasman42 wrote: > This array ...
10 years, 6 months ago (2013-10-23 23:17:49 UTC) #7
ideasman42
Regarding NOT using BMesh. First - perhaps get everything else finalized first, then evaluate removing ...
10 years, 6 months ago (2013-10-24 03:17:35 UTC) #8
apinzonf
Hi Campbell, Howard I need your help I know you have much experience with Blender, ...
10 years, 6 months ago (2013-10-29 17:04:16 UTC) #9
howardt
10 years, 6 months ago (2013-10-29 17:17:21 UTC) #10
On Tue, Oct 29, 2013 at 1:04 PM, Alexander Pinzon Fernandez <
apinzonf@gmail.com> wrote:

> Hi Campbell, Howard
>
> I need your help
>
> I know you have much experience with Blender, and your help would save me
> much time to search into the code of Blender, if you cannot help me right
> now so busy that I will continue looking.
>
> About the bmesh use:
> I can delete the use of bmesh, if I can retrieve topology information from
> other methods, this not represent a problem.
> If the problem is the computation of Bmesh, Bmesh is computing only one
> time in the initialization of the Laplacian system, because the
> LaplacianDeform Modifier, use the cache information for calculate de
> solution of the system.
>
>
Did you see Campbell's previous message where he suggested
 BKE_mesh_vert_poly_map_create() and BKE_mesh_vert_edge_map_create()?

My opinion is that it is less essential to remove the use of Bmesh, and I
think Campbell might be willing to do it later if he wants to.  He points
out that the issue is more the space usage of Bmesh than the time to
convert.


> LaplacianDeform requirement
> - The system captures the vertex positions at the moment of configure the
> name of anchors vertex group.
> - The system only works with triangles and quads, because the Laplace
> Beltrami Operators have known discretization on triangles and quads.
> - I need the information of vertex positions
> - I need the information of faces vertex (only triangles and quads).
>
> About Ngons.
> I look the code in source\blender\editors\armature\meshlaplacian.c, I saw
> in this file the author use Mesh struct, and this struct only have quads,
> and triangles.
>
> Do you know some structure that allows me to get a tessellated mesh? (I
> can store the tessellation information for save time), and how I can
> convert (ModifierData *md, Object *ob, DerivedMesh *derivedData) to this
> struct.
>
>
I sent you mail last night explaining how to use scanfill to get the
triangulation of a polygon.  Are you looking for something simpler?  Or do
you need more explanation of how to use it?

Another alternative would be to duplicate an ngon face in Bmesh and then
use the Bmesh operator that triangulates that face, and then delete the
face afterwards.  Or you could triangulate the ngon using the Bmesh
operator, and then after you have built your Laplacian system, merge all of
the triangles back into an ngon.  Both of these solutions seem more work to
me than just using scanfill.

Maybe Campbell knows of an internal function that just triangulates a
polygon, given coordinates, but I couldn't find one.


> Att.
> Alexander Pinzon Fernandez
>
>
>
> 2013/10/23 <ideasman42@gmail.com>
>
> Regarding NOT using BMesh.
>> First - perhaps get everything else finalized first, then evaluate
>> removing bmesh use.
>>
>>
>> 2 reasons to do this -
>> - memory use, bmesh are very heavy on memory use.
>> - conversion speed (probably less of an issue).
>>
>>
>> BM_EDGES_OF_VERT and BM_FACES_OF_VERT can be replaced with -
>> BKE_mesh_vert_poly_map_create(**) and BKE_mesh_vert_edge_map_create(**)
>>
>> I know its less flexible to use fixes arrays from DerivedMesh, but if
>> this isnt changing a lot, IMHO its a worthwhile tradeoff.
>>
>>
https://codereview.appspot.**com/15580049/<https://codereview.appspot.com/155...
>>
>
>
Sign in to reply to this message.

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