Comments (9)
Test objects mentioned above.
failobjs.zip
from seamawaredecimater.
from seamawaredecimater.
Triangulated the cylinder. Result:
decimater testcylindertris.obj percent-vertices 80 testcylindertris50.obj
Warning: readOBJ() ignored non-comment line 4:
o Cylinder
Loaded a mesh with 64 vertices and 124 faces: testcylindertris.obj
80% of 64 input vertices is 51 output vertices.
decimater: /home/john/projects/sl/SeamAwareDecimater/decimater.cpp:87: bool {anonymous}::decimate_down_to(const Eigen::PlainObjectBase<Derived>&, const Eigen::PlainObjectBase<DerivedTC>&, const Eigen::PlainObjectBase<DerivedCN>&, const Eigen::PlainObjectBase<DerivedTC>&, int, Eigen::MatrixXd&, Eigen::MatrixXi&, Eigen::MatrixXd&, Eigen::MatrixXi&, bool) [with DerivedV = Eigen::Matrix<double, -1, -1>; DerivedF = Eigen::Matrix<int, -1, -1>; DerivedT = Eigen::Matrix<double, -1, -1>; Eigen::MatrixXd = Eigen::Matrix<double, -1, -1>; Eigen::MatrixXi = Eigen::Matrix<int, -1, -1>]: Assertion `TC.cols() == 2' failed.
Aborted (core dumped)
from seamawaredecimater.
failobjs2.zip
Test files for above.
The triangulated cylinder is the Blender default cylinder triangulated with the default Blender triangulation. The attached image shows a valid triangulation.
Similar failure on a chair model. I can't get this program to work on anything but the provided "animal.obj".
from seamawaredecimater.
from seamawaredecimater.
Thanks.
Next problem:
This is the "minimal textured object file" from http://paulbourke.net/dataformats/obj/minobj.html used as a demo and test case.
The mesh reduction opens up a sizable gap in the mesh between the upper and lower halves of the object. Oops.
from seamawaredecimater.
I think I may have a solution -- a lot of OBJ files have 3 UVS. which is valid, though they actually seem to only use the first 2 values as the 3rd is always zero. In any case
-
Goto the ReadOBJ.cpp file, and to insert the line
Count = 2;
just before Line 131,
std::vector<Scalar > tex(count);
You need to do this because the decimation function requires the UVs to have exactly 2 columns and OBJ can legally have 3. By Explicitly setting it to 2 you are tossing the third value which appears to always be zero in files I’ve seen, anyway.
Similarly, OBJ files can legally have NO UVs but the library can't handle that, so make sure they have UVs assigned.
from seamawaredecimater.
Ah. Two years later, but good info.
from seamawaredecimater.
from seamawaredecimater.
Related Issues (18)
- Problem during make HOT 1
- i am getting error when i use HOT 1
- min cost edge is infinite cost, left nums of vertices:
- It is not working at all
- Microsoft C++ exception: std::out_of_range at memory location 0x0000000EE4576D90 HOT 1
- How do I reference texture when loading .obj to the decimator? HOT 1
- WARNING: decimate_down_to() returned false
- Question about the constrained quadratic problem
- fatal assertion failure in igl::circulation HOT 1
- decimater.exe has stopped working HOT 1
- Failed on an input with overlapped UV map.
- Crashing during priority queue preparation HOT 6
- Resulting OBJ should preserve MTL references HOT 3
- Build problem: "undefined reference to `pthread_create'" HOT 1
- collapse_edge_seam debug build fails
- Decimater fails on large obj file (35 Mb) HOT 2
- Mapping to original vertices HOT 2
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 seamawaredecimater.