Home

Awesome

OptCuts

OptCuts, a new parameterization algorithm, jointly optimizes arbitrary embeddings for seam quality and distortion. OptCuts requires no parameter tuning; automatically generating mappings that minimize seam-lengths while satisfying user-requested distortion bounds.

http://www.cs.ubc.ca/labs/imager/tr/2018/OptCuts/

Clone Repository

git clone https://github.com/liminchen/OptCuts

Then in OptCuts folder there will be

Compile and Run

cd OptCuts
python build.py

Tips on linear solver: By default OptCuts is built with Eigen::SimplicialLDLT. However, we also provide interfaces for CHOLMOD and PARDISO under src/LinSysSolver/ for customization. But note that unless MKL BLAS and LAPACK are used, CHOLMOD or PARDISO built with openblas on linux performs similar to Eigen.

Tips for Windows users: Compiling OptCuts on Windows may need manually setting up the environment. Running OptCuts on Windows is possible to encounter severe speed issues, which can be related to the memory management of Eigen backend. A useful suggestion is to swap out Eigen's malloc with dlmalloc.

python batch.py

This will run OptCuts on all the triangle meshes directly under input/, where by default bimba_i_f10000.obj will be processed as a "hello world" example with a visualization window (mode 10).

Tips on initial UV map: If the input mesh does not have texture coordinates, OptCuts will automatically compute default initial UV map, or OptCuts will start with the UV map provided in the input file.

Tips on input mesh: OptCuts takes input meshes with only one connected component. For meshes with multiple connected components, OptCuts can be independently applied on each of them.

We also provide a python script for automatically running the two regional seam placement examples in our paper

python batch_RSP.py

This will run OptCuts with all the input meshes provided under input/RSP. To enable regional seam placement, a text file named inputMeshName_selected.txt containing the indices of all selected vertices in the salient regions must be present for each input mesh under the same directory.

After finish running OptCuts, the results will be saved under output/ with separate folders per input. Then you can do

python display.py

to generate html files that will display all the completed results in output/ and open display/display.html to view them.

Output Files

For each input, OptCuts will create a folder under output/ to hold all the output files. The folder name will be composed of the input command line arguments, thus results with the same input and setting will be overwritten into the same folder. The output contains

Command Line Arguments

Format: progName mode inputMeshPath lambda_init testID methodType distortionBound useBijectivity initialCutOption [anyStringYouLike]

Example: ./build/OptCuts_bin 10 input/bimba_i_f10000.obj 0.999 1 0 4.1 1 0 firstTrial

Keyboard Events