[Bf-blender-cvs] [25a455fd21] uv_unwrapping_slim_and_ceres: Category: UV Unwrapping symmetric dirichlet energy with ceres Integration

Aurel Gruber noreply at git.blender.org
Mon Feb 27 11:27:33 CET 2017


Commit: 25a455fd2142155b5c5a10c9485690a206dbfe19
Author: Aurel Gruber
Date:   Fri Feb 24 23:26:11 2017 +0100
Branches: uv_unwrapping_slim_and_ceres
https://developer.blender.org/rB25a455fd2142155b5c5a10c9485690a206dbfe19

Category: UV Unwrapping symmetric dirichlet energy with ceres Integration

added ceres_mesh_unwrapper files

===================================================================

M	intern/SLIM/CMakeLists.txt
M	intern/SLIM/src/slim_parametrizer.cpp

===================================================================

diff --git a/intern/SLIM/CMakeLists.txt b/intern/SLIM/CMakeLists.txt
index d8cdc0fcfb..91c8ff5e52 100644
--- a/intern/SLIM/CMakeLists.txt
+++ b/intern/SLIM/CMakeLists.txt
@@ -1,10 +1,16 @@
 cmake_minimum_required(VERSION 2.6)
 
+set(ADDITIONAL_LIBRARIES "extern_ceres")
+
 set(INC
   ext/libigl_extract
   ../../source/blender/editors/uvedit
   ../../source/blender/makesdna
   ../../source/blender/blenlib
+  ../../extern/ceres/include
+  ../../extern/ceres/config
+  ../../extern/glog/src
+  ../../extern/gflags/src
 )
 
 set(INC_SYS
@@ -19,6 +25,7 @@ set(SRC
   src/area_compensation.cpp
   src/least_squares_relocator.cpp
   src/geometry_data_retrieval.cpp
+  src/ceres_mesh_unwrapper.cpp
 
   src/matrix_transfer.h
   src/slim.h
@@ -28,6 +35,7 @@ set(SRC
   src/area_compensation.h
   src/least_squares_relocator.h
   src/geometry_data_retrieval.h
+  src/ceres_mesh_unwrapper.h
 
   ${ADDITIONAL_SOURCES}
 )
diff --git a/intern/SLIM/src/slim_parametrizer.cpp b/intern/SLIM/src/slim_parametrizer.cpp
index a554cc731a..3178acb4da 100644
--- a/intern/SLIM/src/slim_parametrizer.cpp
+++ b/intern/SLIM/src/slim_parametrizer.cpp
@@ -21,6 +21,7 @@
 #include <Eigen/SparseCholesky>
 
 #include "slim_parametrizer.h"
+#include "ceres_mesh_unwrapper.h"
 
 using namespace std;
 using namespace igl;
@@ -61,9 +62,16 @@ void param_slim(matrix_transfer *mt, int nIterations, bool borderVerticesArePinn
 
 	for (int uvChartIndex = 0; uvChartIndex < mt->nCharts; uvChartIndex++) {
 
+		cout << "doing " << nIterations % 100 << " SLIM iterations" << endl;
 		SLIMData *slimData = setup_slim(mt, nIterations, uvChartIndex, timer, borderVerticesArePinned, skipInitialization);
 
-		slim_solve(*slimData, nIterations);
+
+		slim_solve(*slimData, nIterations % 100);
+
+		if (nIterations > 99){
+			cout << "using ceres with " << (nIterations / 100) * 10 << " iterations..." << endl;
+			solve_map_with_ceres(slimData->V, slimData->F, slimData->V_o, (nIterations / 100) * 10);
+		}
 
 		areacomp::correctMapSurfaceAreaIfNecessary(slimData);




More information about the Bf-blender-cvs mailing list