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.

Overview

Name: Ounan Ding

E-mail: ounanding@gmail.com

IRC: TheBusyTypist

GitHub: https://github.com/thebusytypist

Blog: http://blender.linearconstraints.net

There is a PDF version of this proposal, which has better typesetting: https://github.com/thebusytypist/gsoc-2016-doc/raw/master/proposals/solidify/solidify.pdf

Synopsis

I propose to improve the current Solidify modifier in Blender. Particularly, the self intersection issue will be addressed.

Benefits to Blender

This will make it a much easier for anyone who is 3D printing to make a solid shell from a mesh without having to manually create the shell. The 3D modeling artists may also find this tool useful if they want to create water-tight models from surfaces.

From the programming perspective, many tools will be contributed from this project and may benefit other projects. For example, some common geometric processing tools such as mean curvature flow will be implemented.

Moreover, I will also take this chance to write or to improve the documentation on BMesh and modifier infrastructure.

Deliverables

The proposed feature in this project will be implemented as a Blender Modifier. And I want to keep its interface compatible with the current Solidify modifier's as much as possible.

Project Details

In this section I will first review the current implementation of Solidify modifier, and discuss the potential issues of it. After that I will show what tools are proposed for similar goal recently in the academia. Based on the above research, I propose a design and estimate a preliminary project schedule.

Review of Current Implementation

I have written a blog post[1] to have a general review of the Solidify modifier. I also have a series of posts [2], [3], and [4] about the general mechanism of modifier system in Blender.

Generally speaking, the current Solidify modifier will duplicate and extrude the surface along the vertex normal of a given mesh to build the inner surface, or "shell".

This approach works well for most cases when the offset depth is small. However self-intersection would happen if the user offset the surface too much. We show this situation in figure Blender-stock-solidify-self-intersection.png.

In addition to the self-intersection issue, the offset direction may also cause some minor problems. Currently the vertex normal direction is used for offset, and the vertex normal is calculated by taking a weighted average of normals of its adjacent surfaces. This approximation may deviate from the actual surface normal and leads to slightly incorrect geometry.

One advantage of current implementation(or any purely mesh-based one) is that the mesh network topology is retained for both the input and the offset surface. This may be a vital requirements from 3D artists. I will discuss more about the requirements in the later section.

Related Research

There are also many research of the surface propagation in the academia.

The first paper[musialski2015reduced] I read, which is suggested by Campbell Barton, models this as an optimization problem. I also write a paper digest on my blog[5].

The general idea of that paper is to first construct the offset direction and the offset depth using mean curvature flow[tagliasacchi2012mean]. Then it construct an optimization problem of offset depth subject to some mechanical constraints.

The insights we get from this paper is that it calculates the shape skeleton to estimate a bound on the offset depth, and it puts constraints on the offset depth to prevent self-intersection.

Besides, this paper introduces a great solution for the requirements of 3D printing, where we have to consider mechanical properties of our product.

On the other hand, through some research on the mean curvature flow, we reach another very similar approach which is called level set method[sethian1999level]. In fact the Computer Graphics community (especially the physically based simulation group) has used level set method for surface tracking for a long time.

I write a post and implement a prototype program to illustrate the general idea on my blog[6].

The most significant advantage of level set method is that it can handle the topology change very naturally. By "topology change" I mean for example, some part of the geometry may break into separate parts or some surfaces join into a single piece. In figure below I illustrate some experiment results of different offset depths, where we can see the topology change due to the large offset depth can be handled correctly.

2d-hamilton-jacobi-no-topology-change.png

2d-hamilton-jacobi-with-topology-change.png

However, the level set method requires a signed distance field, and for the final result we have to contour(or remesh in the Blender glossary) the zero level set of the offset distance field. This will cause the result offset surface has a very different mesh network compared with the given input. It may not be a serious issue for 3D printing, but maybe unacceptable for 3D artists.

Requirements and Design

After we have reviewed the current implementation in Blender and seen many solutions introduced from academia, I can propose my design towards the problem.

Firstly I list some requirements below:

  • We want the new Solidify modifier can produce geometry with no self-intersection. And we do not want to leave many unhandled corner cases in the mesh processing.
  • We want both 3D printing and traditional 3D artists can benefit from this tool. That is, we have to consider the mesh network structure very carefully.
  • We deem that the Solidify modifier can be a time-consuming operation. But we still strive for the optimal performance.

We first compute an upper bound on the offset depth and construct the offset direction field as the paper[musialski2015reduced] does. For this task a mean curvature flow method can be used.

Then we offset the surface mesh along the offset direction. We check whether the desired offset depth exceeds the depth upper bound.

For 3D printing, we can loose the requirements on the mesh network structure and perform level set method for the best handling of topology change.

While for traditional 3D artists we may want to be conservative and do not alter the mesh network structure. For this case we may just simply cease extruding when we hit the depth limit.

Project Schedule

I will take first two weeks to be familiar with the BMesh and DerivedMesh system.

At the same time I will make some prototype programs in 2D for concept proof. This may last about two weeks.

After that I will start to implement the first version. I except that this can be done in two weeks.

I will not try to write a complete version in my first pass. Instead, I just make it work under some limitations, then iterate on that version to improve it and get feedbacks from our community.

Bio

Currently I am a master student from University of California, Riverside. My research direction is about Computer Graphics and Fluid Simulations. I run a blog[7] on Blender development. And I also have a blog[8] on general topics in Computer Graphics.

References

[sethian1999level] Sethian, James Albert. Level set methods and fast marching methods: evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science. Vol. 3. Cambridge university press, 1999.

[tagliasacchi2012mean] Tagliasacchi, Andrea, et al. "Mean curvature skeletons." Computer Graphics Forum. Vol. 31. No. 5. Blackwell Publishing Ltd, 2012.

[musialski2015reduced] Musialski, Przemyslaw, et al. "Reduced-order shape optimization using offset surfaces." ACM Trans. Graph 34.4 (2015): 102.