[Bf-blender-cvs] [95b84b5e13e] sculpt-dev: Fork instant-meshes quadrangulator into intern/

Joseph Eagar noreply at git.blender.org
Mon Oct 25 19:06:09 CEST 2021


Commit: 95b84b5e13e36874c2be2319cdbf0856efe00499
Author: Joseph Eagar
Date:   Sun Oct 24 00:17:54 2021 -0700
Branches: sculpt-dev
https://developer.blender.org/rB95b84b5e13e36874c2be2319cdbf0856efe00499

Fork instant-meshes quadrangulator into intern/

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

M	CMakeLists.txt
M	intern/CMakeLists.txt
A	intern/instant-meshes/CMakeLists.txt
A	intern/instant-meshes/LICENSE.txt
A	intern/instant-meshes/README.md
A	intern/instant-meshes/ext/dset/LICENSE.txt
A	intern/instant-meshes/ext/dset/README.md
A	intern/instant-meshes/ext/dset/dset.h
A	intern/instant-meshes/ext/half/half.hpp
A	intern/instant-meshes/ext/pcg32/README.md
A	intern/instant-meshes/ext/pcg32/pcg32-demo.cpp
A	intern/instant-meshes/ext/pcg32/pcg32-demo.out
A	intern/instant-meshes/ext/pcg32/pcg32.h
A	intern/instant-meshes/ext/pss/LICENSE.txt
A	intern/instant-meshes/ext/pss/README.md
A	intern/instant-meshes/ext/pss/parallel_stable_sort.h
A	intern/instant-meshes/ext/pss/pss_common.h
A	intern/instant-meshes/ext/rply/LICENSE
A	intern/instant-meshes/ext/rply/rply.c
A	intern/instant-meshes/ext/rply/rply.h
A	intern/instant-meshes/src/aabb.h
A	intern/instant-meshes/src/adjacency.cpp
A	intern/instant-meshes/src/adjacency.h
A	intern/instant-meshes/src/batch.cpp
A	intern/instant-meshes/src/batch.h
A	intern/instant-meshes/src/bvh.cpp
A	intern/instant-meshes/src/bvh.h
A	intern/instant-meshes/src/cleanup.cpp
A	intern/instant-meshes/src/cleanup.h
A	intern/instant-meshes/src/common.h
A	intern/instant-meshes/src/dedge.cpp
A	intern/instant-meshes/src/dedge.h
A	intern/instant-meshes/src/diff.cpp
A	intern/instant-meshes/src/extract.cpp
A	intern/instant-meshes/src/extract.h
A	intern/instant-meshes/src/field.cpp
A	intern/instant-meshes/src/field.h
A	intern/instant-meshes/src/glutil.cpp
A	intern/instant-meshes/src/glutil.h
A	intern/instant-meshes/src/gui_serializer.h
A	intern/instant-meshes/src/hierarchy.cpp
A	intern/instant-meshes/src/hierarchy.h
A	intern/instant-meshes/src/main.cpp
A	intern/instant-meshes/src/meshio.cpp
A	intern/instant-meshes/src/meshio.h
A	intern/instant-meshes/src/meshstats.cpp
A	intern/instant-meshes/src/meshstats.h
A	intern/instant-meshes/src/normal.cpp
A	intern/instant-meshes/src/normal.h
A	intern/instant-meshes/src/reorder.cpp
A	intern/instant-meshes/src/reorder.h
A	intern/instant-meshes/src/serializer.cpp
A	intern/instant-meshes/src/serializer.h
A	intern/instant-meshes/src/smoothcurve.cpp
A	intern/instant-meshes/src/smoothcurve.h
A	intern/instant-meshes/src/subdivide.cpp
A	intern/instant-meshes/src/subdivide.h
A	intern/instant-meshes/src/viewer.cpp
A	intern/instant-meshes/src/viewer.h
A	intern/instant-meshes/src/widgets.cpp
A	intern/instant-meshes/src/widgets.h

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f420e879d6f..54e908a05e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -686,6 +686,8 @@ if(UNIX AND NOT APPLE)
   mark_as_advanced(WITH_CXX11_ABI)
 endif()
 
+option(WITH_INSTANT_MESHES, "Instant Meshes Quadrangulator" ON)
+
 # Installation process.
 option(POSTINSTALL_SCRIPT "Run given CMake script after installation process" OFF)
 mark_as_advanced(POSTINSTALL_SCRIPT)
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt
index dbd939e64b7..3771b911c79 100644
--- a/intern/CMakeLists.txt
+++ b/intern/CMakeLists.txt
@@ -85,3 +85,7 @@ endif()
 if(UNIX AND NOT APPLE)
   add_subdirectory(libc_compat)
 endif()
+
+if(WITH_INSTANT_MESHES)
+  add_subdirectory(instant-meshes)
+endif()
diff --git a/intern/instant-meshes/CMakeLists.txt b/intern/instant-meshes/CMakeLists.txt
new file mode 100644
index 00000000000..b89e0b01acc
--- /dev/null
+++ b/intern/instant-meshes/CMakeLists.txt
@@ -0,0 +1,91 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+  .
+  ../atomic
+  ../eigen
+  ../../extern/Eigen3
+  ext/half
+  ext/dset
+  ext/pss
+  ext/pcg32
+  ../
+  
+)
+
+set(INC_SYS
+  ${GMP_INCLUDE_DIRS}
+)
+
+set(SRC
+  src/aabb.h
+  src/adjacency.cpp
+  src/adjacency.h
+  src/batch.cpp
+  src/batch.h
+  src/bvh.cpp
+  src/bvh.h
+  src/cleanup.cpp
+  src/cleanup.h
+  src/common.h
+  src/dedge.cpp
+  src/dedge.h
+  src/diff.cpp
+  src/extract.cpp
+  src/extract.h
+  src/field.cpp
+  src/field.h
+  src/hierarchy.cpp
+  src/hierarchy.h
+  src/reorder.cpp
+  src/reorder.h
+  src/subdivide.cpp
+  src/subdivide.h
+  src/smoothcurve.cpp
+  src/smoothcurve.h
+)
+
+set(LIB
+)
+
+if(WITH_TBB)
+  add_definitions(-DWITH_TBB)
+
+  list(APPEND INC_SYS
+    ${TBB_INCLUDE_DIRS}
+  )
+
+  list(APPEND LIB
+    ${TBB_LIBRARIES}
+  )
+endif()
+
+if(WIN32 AND NOT UNIX)
+  list(APPEND INC_SYS
+    ${PTHREADS_INC}
+  )
+
+  list(APPEND LIB
+    ${PTHREADS_LIBRARIES}
+  )
+endif()
+
+blender_add_lib(bf_intern_instant_meshes "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/intern/instant-meshes/LICENSE.txt b/intern/instant-meshes/LICENSE.txt
new file mode 100644
index 00000000000..22f98a32f48
--- /dev/null
+++ b/intern/instant-meshes/LICENSE.txt
@@ -0,0 +1,37 @@
+Copyright (c) 2015 Wenzel Jakob, Daniele Panozzo, Marco Tarini,
+and Olga Sorkine-Hornung. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+   list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+You are under no obligation whatsoever to provide any bug fixes, patches, or
+upgrades to the features, functionality or performance of the source code
+("Enhancements") to anyone; however, if you choose to make your Enhancements
+available either publicly, or directly to the authors of this software, without
+imposing a separate written license agreement for such Enhancements, then you
+hereby grant the following license: a non-exclusive, royalty-free perpetual
+license to install, use, modify, prepare derivative works, incorporate into
+other computer software, distribute, and sublicense such enhancements or
+derivative works thereof, in binary and source code form.
diff --git a/intern/instant-meshes/README.md b/intern/instant-meshes/README.md
new file mode 100644
index 00000000000..679c1e16d8b
--- /dev/null
+++ b/intern/instant-meshes/README.md
@@ -0,0 +1,72 @@
+# Instant Meshes
+[![Build Status](https://travis-ci.org/wjakob/instant-meshes.svg?branch=master)](https://travis-ci.org/wjakob/instant-meshes)
+[![Build status](https://ci.appveyor.com/api/projects/status/dm4kqxhin5uxiey0/branch/master?svg=true)](https://ci.appveyor.com/project/wjakob/instant-meshes/branch/master)
+
+<img width="170" height="166" src="https://github.com/wjakob/instant-meshes/raw/master/resources/icon.png">
+
+This repository contains the interactive meshing software developed as part of the publication
+
+> **Instant Field-Aligned Meshes**<br/>
+> Wenzel Jakob, Marco Tarini, Daniele Panozzo, Olga Sorkine-Hornung<br/>
+> In *ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2015)*<br/>
+> [PDF](http://igl.ethz.ch/projects/instant-meshes/instant-meshes-SA-2015-jakob-et-al.pdf),
+> [Video](https://www.youtube.com/watch?v=U6wtw6W4x3I),
+> [Project page](http://igl.ethz.ch/projects/instant-meshes/)
+
+
+##### In commercial software
+
+Since version 10.2, Modo uses the Instant Meshes algorithm to implement its
+automatic retopology feature. An interview discussing this technique and more
+recent projects is available [here](https://www.foundry.com/trends/design-visualisation/mitsuba-renderer-instant-meshes).
+
+## Screenshot
+
+![Instant Meshes logo](https://github.com/wjakob/instant-meshes/raw/master/resources/screenshot.jpg)
+
+## Pre-compiled binaries
+
+The following binaries (Intel, 64 bit) are automatically generated from the latest GitHub revision.
+
+> [Microsoft Windows](https://instant-meshes.s3.eu-central-1.amazonaws.com/Release/instant-meshes-windows.zip)<br/>
+> [Mac OS X](https://instant-meshes.s3.eu-central-1.amazonaws.com/instant-meshes-macos.zip)<br/>
+> [Linux](https://instant-meshes.s3.eu-central-1.amazonaws.com/instant-meshes-linux.zip)
+
+Please also fetch the following dataset ZIP file and extract it so that the
+``datasets`` folder is in the same directory as ``Instant Meshes``, ``Instant Meshes.app``,
+or ``Instant Meshes.exe``.
+
+> [Datasets](https://instant-meshes.s3.eu-central-1.amazonaws.com/instant-meshes-datasets.zip)
+
+Note: On Linux, Instant Meshes relies on the program ``zenity``, which must be installed.
+
+## Compiling
+
+Compiling from scratch requires CMake and a recent version of XCode on Mac,
+Visual Studio 2015 on Windows, and GCC on Linux. 
+
+On MacOS, compiling should be as simple as
+
+    git clone --recursive https://github.com/wjakob/instant-meshes
+    cd instant-meshes
+    cmake .
+    make -j 4
+
+To build on Linux, please install the prerequisites ``libxrandr-dev``,
+``libxinerama-dev``, ``libxcursor-dev``, and ``libxi-dev`` and then use the
+same sequence of commands shown above for MacOS.
+
+On Windows, open the generated file ``InstantMeshes.sln`` after step 3 and proceed building as usual from within Visual Studio.
+
+## Usage
+
+To get started, launch the binary and select a dataset using the "Open mesh" button on the top left (the application must be located in the same directory as the 'datasets' folder, otherwise the panel will be empty).
+
+The standard workflow is to solve for an orientation field (first blue button) and a position field (second blue button) in sequence, after which the 'Export mesh' button becomes active. Many user interface elements display a descriptive message when hovering the mouse cursor above for a second.
+
+A range of additional information about the input mesh, the computed fields,
+and the output mesh can be visualized using the check boxes accessible via the
+'Advanced' panel.
+
+Clicking the left mouse button and dragging rotates the object; right-dragging
+(or shift+left-dragging) translates, and the mouse wheel zooms. The fields can also be manipulated using brush tools that are accessible by clicking the first icon in each 'Tool' row.
diff --git a/intern/instant-meshes/ext/dset/LICENSE.txt b/intern/instant-meshes/ext/dset/LICENSE.txt
new file mode 100644
index 00000000000..42b5a5708fe
--- /dev/null
+++ b/intern/instant-meshes/ext/dset/LICENSE.txt
@@ -0,0 +1,17 @@
+Copyright (c) 2015 Wenzel Jakob <wenzel at inf.ethz.ch>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appre

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list