Comments (14)
By the way, the client app I'm using is:
#include <Bff.h>
#include <MeshIO.h>
#include <iostream>
int main(int argc, char** argv) {
if(argc != 3) {
std::cout << "Usage : UnitTestDewrinkling <input-filename>.obj <output-filename>.obj" << std::endl;
return 1;
}
std::string input_filename = argv[1];
std::string output_filename = argv[2];
Mesh test_mesh;
std::cout << "Loading mesh from " << input_filename << "..." << std::endl;
if(!test_mesh.read(input_filename))
std::cout << "Reading problems!" << std::endl;
std::cout << "Initializing flattening module..." << std::endl;
BFF flattening_module(test_mesh);
EigenDenseMatrix boundaryData(flattening_module.data->bN);
std::cout << "Flattening (generating uv)" << std::endl;
flattening_module.flatten(boundaryData,true);
std::cout << "Flattening done, now storing into " << output_filename << "..." << std::endl;
test_mesh.write(output_filename,false,false);
std::cout << "Output stored!" << std::endl;
return 0;
}
Maybe there's some other setting I'm before starting the flattening. For example I noticed you have something like:
// flatten
if (type == BoundaryType::automatic) {
removeVertexHandles();
DenseMatrix u(bff->data->bN);
bff->flatten(u, true);
performPCA();
update();
}
In your Viewer.cpp
, maybe I need to call removeVertexHandles
and PerformPCA
somehow?
from boundary-first-flattening.
And one more question... I'm not 100% sure, but why is the image of the checkboard like shifted (from your original tool)?
from boundary-first-flattening.
You can probably just get rid of the alpha and beta (this is cholmod specific) and return "refA + refB". It seems like your client app is alright, there is no need to call/implement "removeVertexHandles" and "performPCA" - these are called for visualization purposes.
from boundary-first-flattening.
There was an issue with my initialization function in my Dense/Sparse classes now I'm getting the following outputs (normalized and not normalized)
The second picture is quite close to what your tool provides (not the same though, this might be actually Eigen at this point). However I don't understand why the texture mapping doesn't align the texture with the orientation of the mesh.
from boundary-first-flattening.
I've accidentally closed the issue... sorry...
from boundary-first-flattening.
You'll have to translate, rotate and/or scale either the texture image or the uvs to get them to align the way you want them to. The "Show UV Tex Param" option in Meshlab lets you see the current alignment.
from boundary-first-flattening.
So despite not being aligned, you would say the parameterization is still correct.
from boundary-first-flattening.
Its difficult for me to say, I'd print out the uvs from the BFF tool and your implementation and see the error between them to check if your implementation is correct.
from boundary-first-flattening.
I was more referring, in general. The UV look different to me, so there might still be something to sorted out.
from boundary-first-flattening.
You can probably just get rid of the alpha and beta (this is cholmod specific) and return "refA + refB". It seems like your client app is alright, there is no need to call/implement "removeVertexHandles" and "performPCA" - these are called for visualization purposes.
I don't think I can get rid of the two constants, since you use them in your overload of the operator -
from boundary-first-flattening.
Right, but you can just get rid of the "add" function and directly return "A + B" and "A - B" in the appropriate operators.
from boundary-first-flattening.
Fair point.
from boundary-first-flattening.
Hi again, Is there some special setting you do in your cholesky factorization? If you compare my output against yours you can see the top right corner distorted (in mine). Is there maybe some special setting I should be aware of?
I have the feeling the Eigen solver has stability issues, but I might be complete wrong.
from boundary-first-flattening.
In my experience, Cholmod is a more stable solver than Eigen. Eigen has wrappers around multiple external solvers such as Cholmod (see here: http://eigen.tuxfamily.org/dox/group__TopicSparseSystems.html), it might be worth giving them a try to see if the results improve (and to make sure the problem is solver related).
from boundary-first-flattening.
Related Issues (20)
- Cannot open <cblas.h> HOT 4
- seeking surface model with holes HOT 3
- Port to wasm for web
- Mesh has isolated vertex HOT 1
- Include GLFW as Dependency HOT 2
- Concepts in the project HOT 1
- Compile with emscripten question HOT 2
- UV Overlapping problem? HOT 2
- AdjacencyTable uses a slow data structure HOT 1
- `std::vector<bool>` has unfortuante and unexpected implementation HOT 1
- Half edge mesh operations cannot be inlined HOT 1
- Mesh has non manifold vertices HOT 2
- Mac Command Line error - Access Denied HOT 2
- non-manifold edges warning when holes/multiple components HOT 1
- README needs an update for the C++ interface HOT 2
- Asymmetric result after flattening HOT 7
- Vector subscript is out of range exception. PolygonSoup.cpp. HOT 4
- About flattening to a rectangle with specified aspect ratio HOT 3
- How to output area distortion from an app HOT 2
- feat: Export error/quality measures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boundary-first-flattening.