Code Monkey home page Code Monkey logo

cwf's Introduction

CWF: Consolidating Weak Features in High-quality Mesh Simplification

Code of CWF: Consolidating Weak Features in High-quality Mesh Simplification.

Project Page: https://ruixu.me/html/CWF/index.html

Paper link: https://arxiv.org/abs/2404.15661

Please cite our work:

@article{xu2024cwf,
      title={CWF: Consolidating Weak Features in High-quality Mesh Simplification}, 
      author={Xu, Rui and Liu, Longdu and Wang, Ningna and Chen, Shuangmin and Xin, Shiqing and Guo, Xiaohu and Zhong, Zichun and Komura, Taku and Wang, Wenping and Tu, Changhe},
      journal={ACM Transactions on Graphics (TOG)},
      publisher={ACM New York, NY, USA},
      year={2024},
      address = {New York, NY, USA},
      volume = {43},
      number = {4},
      issn = {0730-0301},
      url = {https://doi.org/10.1145/3658159},
      doi = {10.1145/3658159},
}

Currently we have only tested our code on 64-bit windows systems and Visual Studio 2022 Professional.

Dependence

  • CGAL
  • Eigen3
  • Boost
  • Libigl

Please using vcpkg to install dependent libraries!!!

Important: Please use "git clone" to install vcpkg, otherwise you may get errors in cgal installation.

  • .\vcpkg install boost:x64-windows

  • .\vcpkg install cgal:x64-windows

    ​ use "git pull" if you get errors with the "gmp" library.

  • .\vcpkg install Eigen3:x64-windows

  • .\vcpkg install libigl:x64-windows

  • .\vcpkg integrate install

MSVC on Windows

Download this project: CWF

Open Cmake-GUI

Where is the source code: CWF

Where to build the binaries: CFW/build

note: check the location of dependencies and install. It is recommended to use vcpkg to add dependencies.

Configure->Generate->Open Project

Then, build the project:

ALL_BUILD -> Build Turn Debug to Release -> ALL_BUILD -> Build

Test

The example is in 'MAIN'.

All the files is in 'CWF\data'.

The output files is in 'CWF\data\LBFGSOUT'.

We put the result of our operation in 'CWF\data\LBFGSOUT\DemoOutput', you can use it for comparison to know whether the program is running correctly.

IMPORTANT NOTE:

Make sure you are using C++ 14, not C++ 17 or newer versions.

This code is not optimized for speed, but for clarity.

The default number of Openmp parallel threads is 30, set according to an AMD Ryzen 5950x CPU, please set different number of threads according to the CPU you use to get the best running effect.

Testing Platform

  • Windows 10
  • Visual Studio 2022 Professional
  • AMD Ryzen 5950X
  • 64GB Memory

Considering that most computers may not have this configuration, this commit does not support acceleration.

In order to allow you to view the optimization process in more detail, we have only set the optimization stop at 50 iterations, you can manually stop the optimization, and view all iteration results in the data\LBFGSOUT folder.

License

CWF is under AGPL-3.0, so any downstream solution and products (including cloud services) that include CWF code inside it should be open-sourced to comply with the AGPL conditions. For learning purposes only and not for commercial use. If you want to use it for commercial purposes, please contact us first.

cwf's People

Contributors

xrvitd avatar ningnawang avatar afabri avatar liu411417492 avatar

Stargazers

Dimitri Diakopoulos avatar Dong Mo avatar Housz avatar  avatar  avatar Pupa avatar  avatar  avatar ifree avatar Ruoyu Lee avatar Fukahire avatar Ethan Wilcox avatar Yi Lin (Kyle) Gao avatar Erxiang Luo avatar Tianyu Huang avatar Yang Li avatar xiaolang avatar  avatar Jeremy Ong avatar Daichi Ishida avatar  avatar zzh avatar  avatar Ben Graham avatar Menghan Li avatar ahmed avatar Sai Kumar Dwivedi avatar Samuel Chan avatar  avatar Pasquale Simonetti avatar  avatar Intec avatar inFinith avatar Barak Chamo avatar  avatar day avatar Che avatar  avatar  avatar Roman Gaditskii avatar lan avatar MingXiao avatar  avatar  avatar xuheny avatar XH Yang avatar  avatar  avatar  avatar Hyungki Kim avatar  avatar  avatar  avatar Xue Xingfei avatar X avatar Wang Hesheng avatar Alucard avatar LiBoran avatar Andrew R McHugh avatar  avatar Nuri Ryu avatar Kingfree avatar CJT avatar Silverry avatar OntheWays avatar  avatar Design_Dream avatar  avatar  avatar Therapy avatar  avatar Aka-ring avatar  avatar  avatar CP-Design avatar  avatar AIGODLIKE avatar Jiantao Song avatar  avatar GP Wang avatar  avatar  avatar ZZSSCC  avatar  avatar Sil avatar  avatar cupofc0t avatar Youtian Lin avatar Ligo avatar  avatar Ci_ys avatar Ben Ahlbrand avatar  avatar Jean-Philippe Deblonde avatar Kaizheng Liu avatar LI Kezhou avatar İbrahim Serkan UYSAL avatar  avatar  avatar zhangf avatar

Watchers

GP Wang avatar swq0553 avatar  avatar Snow avatar  avatar Pyjcsx avatar  avatar  avatar

cwf's Issues

license incompatibility

Note that PQP has a license "academic only". I am not sure that this is compatible with the GPL. At least it means that the license of the combined work has the same restriction which is stronger than the GPL.

Compilation with C++17

Hello,
The problem with C++17 is the fact that you are using namespace std; here

If you remove this line and prefix string, vector, etc. with std:: avoids the ambiguity concerning byte. This forum article gave the hint.

Note that the upcoming release of CGAL requires C++17. Switching will also require some changes in CMakeLists.txt files, but that is another story.
Best,
Andreas

Decimation for textured models

Hi, thanks your excellent works!

I am wondering whether CWF can be applied to models with texture mappings and retain the uv parameterization. As far as I know, many feature-preserving decimation algorithms are remesh-based and can't reuse the texture mapping.

Thanks :)

Question about implementation vs paper details

Hi! Thanks for sharing the implementation of your paper. I have a few questions about some of your implementation details and how they match the paper:

Surface Projection

CWF/src/CVTLike/CVT.cpp

Lines 406 to 408 in bff182e

Point_T query(X(i * 3), X(i * 3 + 1), X(i * 3 + 2)); //project to base surface
Point_T closest = tree.closest_point(query);
auto tri = tree.closest_point_and_primitive(query);

You seem to be projecting the optimized coordinates onto the surface before computing the RVD (and later on use the chain rule to get the proper gradient). I think you only mention that in your abstract, but otherwise this detail is absent from the paper. In the LpCVT paper and other work from Bruno Levy I don't think they constrain the sites to be moving on the surface. I was wondering if you could comment on that, whether it the projection is necessary or not?

Weight Decay

eplison = eplison * decay;

It seems that the CVT weight is being decayed at the start of the callback function. This is surprising because I think it will also decay the CVT weight during the linesearch in each Newton step. Is this an oversight or am I reading the code incorrectly?

Stop Condition

Eq. (11) in the paper indicates that you stop the optimization when the CVT energy increases above a certain threshold. I tried to look for this condition in the code, but I am not seeing it. Can you point me to where it is being set in the code?

How to compile with DIY data

Thanks for your great work!

I am trying to use it for some DIY data

But find that it would not compile successfully, if I didn't provide the .xyz files (pointcloud files) in the /CWF/MAIN/main.cpp.
I am curious do I have to submit xyz files in order to run correctly?

Also the main.cpp in CWF/test folder could not compile successfully for finding BGAL

find_package(BGAL REQUIRED)
if(BGAL_FOUND)
include_directories(${BGAL_DIR})
endif()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.