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 Progress

Week One

  • Added code for drawing dual graph using the properties and functions of bmesh data structure. The code is just for test purpose and is placed in the file bmesh_tools.c for now. It will be moved later and some improvement will be made on this code.
  • Integration of Eigen3 library.
  • Started writing C wrapper API for the library mentioned above. My mentor(Elubie) is helping me a lot in doing this.
  • Added some dummy codes to prove the fact that the function of the eigen library can be successfully called from the wrapper API.


Week Two

One of the major issues of this project is to include an eigen solver library that can handle very large sparse matrix. On the previous week, we tried it with Eigen3. This is a good C++ written library with modular design. It has a Sparse Matrix module too. But after started working on that, It seemed to me that the Sparse Matrix module of Eigen3 can’t be attached with the EigenSolver module of Eigen3. Later, me and my mentor(elubie) confirmed this fact by talking the Eigen devs in the irc channel. They also let us know that Sparse Matrix module of Eigen3 is not officially supported yet.
This was the start of the confusion. Then we started looking for the alternative libraries. The requirements were - it must have to be written in C/C++ and should be able to calculate eigenspace of large sparse matrix. Having a clean, smart api to call the functions from C will be an added bonus. Till now, we have looked for 3 libraries.
The first one was the C implementation of ARPACK that is used by the software Graphite. The codes under src/packages/third_party/numeric_stuff of Graphite software contains an C implementation of ARPACK but in my eyes the codes of this folder is not enough, to use those one need to access some functions residing at higher level of the source hierarchy which has many dependencies which are very much specific to Graphite software.
After that, we looked for CARPACK which is an C implementation of ARPACK . I also noticed that Graphite uses a customized version of CARPACK. This is the link of the source of CARPACK. But this some problems too.
Last of all, we have looked for a very small library named lanczospackage. This has support only one algorithm to calculate eigenspace (Lanczos Algorithm). The workflow of using the library is not clean by any means. And we are not sure that whether it will reliable to include such a library.
So, after all that we decided to postpone the decision about selecting the eigen library until we have the basic algorithm implemented with dense matrices of Eigen3 library to allow a bit more time to get to know these libraries.
So far, a dummy implementation of Laplacian Matrix from dual graph and Calculation of Eigen Space for that Laplacian Matrix is done. Currently the Dense module of Eigen3 is used for Eigen related calculations. This will be changed later.


Week Three

  • An new operator is added to compute the eigenvalues of the dual graph of a selected mesh in edit mode. The operator is also added in the User Interface. Ultimately this UI button will be used to generate seam later. This operator can be used from the editmode.
  • Removed BKE_demo.h and demo.c from blenkernel and added the codes of the file in autoseam_tools.h and autoseam_tools.cand some other minor changes.
  • Some memory management issues are fixed. Code refactoring is done.
  • Dummy codes are removed. Limitation of Mesh size is now removed. Now the code can handle any size of mesh as long as the eigen3 library is capable of calculating the eigenvalues of the laplacian matrix of the mesh.
  • Continued progress on the implementation of the main algorithm. Consulted with my mentor about some problem and blockers and took some major implementation decision.


Week Four

  • Done initial implementation of the seam generation algorithm. The algorithm now works for simple meshes. As the algorithm is not made recursive yet, it only generates 2 pieces of seam for each mesh. In the final implementation it will generate more number of seams.
  • Done some changes in algorithm of the encoding of mesh into the dual graph. Now, the dual graph of the mesh contains much sematic information of the mesh than the previous implementation.
  • A lot of restructure in the code was done for the efficiency of the algorithm. This was mainly proposed and done by my mentor Elubie. I have got sufficient help from my mentor in solving some critical problems of the algorithm too.
  • Handled non-manifold meshes.


Week Five

  • In this week, I have fixed problems with the implementation of the previous week, checked all the eigen values to get valid solution and some structural fixes.
  • On top of that, I have made some progress on the recursive implemenation of the code. Though it is not functioning properly yet, I think it will not take much time to make that done.
  • This was a week with comperative slow progress for me. This is all my fault. I will be aware from the next week so that, things run smooth from now.

Week Six

  • Implemented recursive call of the algorithm.
  • Handled mesh with holes.
  • Handled mesh without face.
  • Filter out those eigenvectors whose corresponding eigenvalue is near to zero.
  • Improved edge selection by altering seam length calculation criteria.
  • Added max recursion and 'combinatorial' as parameters to the operator.

Week Seven

  • Handled meshes with separate parts.
  • Unwrap functionality is integrated inside the seam generation operator. With single mouse click user can generate and unwrap the seam now.
  • Stretch calculation for the whole mesh is implemented and integrated as a stopping criterion of the seam generation recursive algorithm. Now the algorithm can stop generating more unnecessary seams even if it is within the range of recursion depth.

Week Eight

  • Code documentation and usage documentation is done.
  • Demonstration video about the progress of the work is uploaded in youtube and link is embeded in the wiki.
  • Start integrating a large sparse matrix Eigen Space calculation library with autoseam.
  • Functions implemented about the calculation of average and maximum strectch.
  • Some bugs are fixed about the stretch calculation.

Week Nine

  • Done most of the tasks mentioned in the midterm review by Brecht. The tasks can be found in http://wiki.blender.org/index.php/User_talk:Shuvro/soc2011 . The completed tasks are marked as done. Among them the most interesting was generating seams only for the selected faces. The user to paint on meshes and create vertex groups. When they select one/more vertex groups, seams will be generated on them. This will help the user to generate the kind of seams they want.
  • Integration of the ARPACK library is done. This is the home page of the arpack. My mentor Andrea Weikert (Elubie) helped me a lot in integrating the library with blender.
  • Integration of f2c library is done.
  • A test function is written to see that ARPACK integration is working.

Week Ten

  • Successful calculation of eigen vectors using Arpack.
  • Arpack integration autoseam module. Now, the seam calculation time is much faster than the previous code.
  • Memories are allocated dynamically for calling Arpack routines. Go to label removed from the Arpack code.
  • Modularization of eigen value calculation code.
  • Eigen calculation related codes are moved from AutoseamAdjacency.
  • Arpack crashes for erroneous dynamic memory allocation is fixed.


Week Eleven

  • Implemented Sparse Matrix module to improve the speed of seam calculation.
  • Code restructure was done proposed by my mentor.
  • Gave a binary build for mac 64-bit.
  • Tuned parameters of Arpack to make it perform better.