3 Star 0 Fork 0

mirrors_lepy / lscm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

LSCM

Least squares conformal mapping

This package includes the prototype code for implementing least squares conformal maps.

alt text

Build

Build status Build Status

In the root directory, run:

$ rm -r build
$ mkdir build
$ cd build
$ cmake ..
$ make

The program has been tested on Ubuntu 18.04 with g++ 5.5.0. It requires Eigen 3 for solving linear systems, which was included, but if you want to use you own Eigen library, please modify CMakeLists.txt.

Usage

./main ../data/human.obj output.obj

LSCM requires at least two fixed vertices. Search in human.obj for "fix" and you will find two such fixed vertices having an additional trait "fix u v" after the xyz coordinates. In human.obj, these two vertices are somewhere at the two eyes. These two vertices will be mapped to (u,v). You can specify your own fixed vertices in the same way.

References

Gu, Xianfeng David. Computational conformal geometry. Edited by Shing-Tung Yau. Somerville, Mass, USA: International Press, 2008.

Lévy, Bruno, Sylvain Petitjean, Nicolas Ray, and Jérome Maillot. "Least squares conformal maps for automatic texture atlas generation." In ACM transactions on graphics (TOG), vol. 21, no. 3, pp. 362-371. ACM, 2002.

Contact

Please contact Liang Mi icemiliang@gmail.com for any issues, or create an issue for reporting bugs, requesting additional features, etc.

Note

There were a few questions about texture mapping using LSCM. I honestly don't have experience with texture mapping, but I think Lévy's paper (referenced above) introduces a pipeline to do that. Below is what I understand.

  1. Segment the mesh into smaller pieces
  2. Map every piece onto the same uv plane (by giving each piece different fixed uv points)
  3. Arranage the flattened meshes on the plane to avoid overlap and make them fit into a rectangular as tight as possible
  4. Apply texture on the uv plane
  5. Use the correspondence between the 2D and 3D positions of each vertex to apply the texture to the original mesh

LSCM only serves step 2. This pipeline should work on either meshes with boundaries or water-tight meshes. However, non-genus zero meshes could be a problem.

Copyright (C) 2018 Liang Mi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
C++ 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors_lepy/lscm.git
git@gitee.com:mirrors_lepy/lscm.git
mirrors_lepy
lscm
lscm
master

搜索帮助