Skip to content
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

Robustness to bad inputs #108

Open
dvicini opened this issue Jul 1, 2024 · 0 comments
Open

Robustness to bad inputs #108

dvicini opened this issue Jul 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dvicini
Copy link
Member

dvicini commented Jul 1, 2024

Hello,

I've been trying to export some scenes that I did not make myself. I encountered two issues that would be nice to fix:

  1. The exporter fails if a mesh does not have any material assigned to it. This can happen if you have a complex scene that was created by combining many different assets. In that case, I think it would be reasonable to just export a black diffuse material. This should be easy to fix - it manifests as an indexing error on the Python side.
  2. The exporter is quite sensitive to bad meshes. In particular, I've found my scene to often trigger an "invalid normals!" error (in blender.cpp). I think this happens with (some) zero area faces or other degenerate faces. While some of this can be cleaned up using various tools in Blender, I think it would be better if the exporter was a bit more robust to those. Could we in this case create some dummy normal? Or maybe compute the normal from valid neighbors? Not sure what's the best solution here.

I've attached a test scene with two cubes. One is an example of problem 1, and the other has problem 2.

blender_exporter_debug.blend.zip

@dvicini dvicini added the bug Something isn't working label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant