-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draco_encoder: Segmentation fault while encoding a simple OBJ file (52 vertices, 100 triangles) #57
Comments
Thanks for the report. Can you please try it again using the latest version in the master branch? There were some updates and fixes pushed in today. I could not reproduce the error on my end. If it still crashes, please let us know your OS / compiler setup. Thanks. |
Ondrej, it is better now, thanks. No crashes. However, there is still a problem. I converted original OBJ model to DRC and back. Original model has point normals but does not contain triangles normals, while the output model does both. And all the normals are the same, which is quite strange. See for yourself (again, remove .txt extension and make it .obj) - model_mesh_out_obj.txt |
And as for this part:
Generally, one can make 0 as default value in SetExplicitMapping() call. So making Another idea could be using a map instead of a vector for indices_map_ or just checking for kInvalidAttributeValueIndex before compression. Thanks! |
The problem actually is that the .OBJ has defined vertex normals but they are not assigned to any points on the faces. In this case the normals should be completely ignored and we are going to fix this. Otherwise, as far as I know, there is no concept of per-face (triangle) normals in .OBJ files.. all the vertex normals defined as
|
My point is to have normals (vn ...), but to have it apart from triangles, just in the same order as points. So in this way normals are associated with points sequentially. So normals should be preserved as values, but with no assignment to faces. Generally, we have point normals and triangle normals, the later being different from the former. OBJ file can contain much more normals than points, so faces are associated with high order normals (which numbers are more then the point count). Currently we omit triangle normals for simplicity, however, we'd like to preserve point normals. |
I'm not sure if we are going to add support for such a special use case ourselves (unless there is a broader demand), but in general Draco library should be able to handle this (you can for example add multiple attributes of type |
I close this issue while making the separate question about normals. |
./draco_encoder breaks down while encoding 'model_mesh.obj' with default options.
OBJ file is attached here (remove .txt extension and make it .obj) - model_mesh_obj.txt
Here is the stack trace:
The text was updated successfully, but these errors were encountered: