Closed lukkio88 closed 5 years ago
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?
And one more question... I'm not 100% sure, but why is the image of the checkboard like shifted (from your original tool)?
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.
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.
I've accidentally closed the issue... sorry...
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.
So despite not being aligned, you would say the parameterization is still correct.
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.
I was more referring, in general. The UV look different to me, so there might still be something to sorted out.
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 -
Right, but you can just get rid of the "add" function and directly return "A + B" and "A - B" in the appropriate operators.
Fair point.
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.
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).
Hi, there's some issue with my wrappers and I'd like to know if I've implemented corretly the Eigen equivalent of some of the cholmod routines, the documentation doesn't say much.
For example you've implemented:
My eigen equivalent, which actually I'm not sure anymore, is:
Where
SpMat
is defined as:Is my conversion correct? There're similar function throught in
SparseMatrix.inl
I guess the interpretation of the inputs must be the same.But I've not clear why you have
alpha,beta
as vectors with two entries.What I'm currently getting is something like:
While originally is supposed to generate: