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.

Weekly Report #11 - Silhouette Operator

Week 11 is now over and the deadline approaches rapidly. With only two weeks to go, the Silhouette Operator needs to be done soon. At the end of last week I had multiple issues and problems. Finding solutions for them was the first thing I did this week.

The mesh problem

In sculpting mode operations manipulate the base mesh structure. Without Bmesh it is a challenge to edit the topology. After discussing, we came to the conclusion that it is best to manipulate the mesh via the CustomData Api. I was able to implement a function which remaps the customdata arrays and allows the necessary behaviour. I only need to design an undo/redo node to support those changes.

The orthographic matrix

I was able to get the correct projections by first projecting onto an orthographic plane and then project to 2D.

After solving both problems I continued to work on the intersection calculation. Last week i had already implemented a method to calculate the intersecting parts within the existing mesh. Relying on the result of this I designed an algorithm to calculate the intersecting edges of the silhouette parts. Even though the algorithm delivers a precise result it is currently very slow. I am hoping that i will be able to improve its performance in a later optimisation step.

The idea is: Calculate two loops. One loop on the existing mesh and one loop on the silhouette. Then connect both loops smoothly while still passing the precise intersection loop. Today i started to implement a method to calculate the interior and exterior vertices. In theory i can easily implement a clipping tool by just flipping interior and exterior. A later subtractive mode for the tool will be rather quick to implement.

The Plan is set and I hope I will be able to finish implementing this feature as soon as possible!

Here is a small graphic to illustrate the current development status:
Silhouette operator demo week11.png