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

Normal index 12868 is out of bounds #243

Open
congtong opened this issue Jul 15, 2020 · 5 comments
Open

Normal index 12868 is out of bounds #243

congtong opened this issue Jul 15, 2020 · 5 comments

Comments

@congtong
Copy link

When I execute this command node obj2gltf/bin/obj2gltf.js -i model.obj -o box.gltf

An error like this occurs: Normal index 12868 is out of bounds

@lilleyse
Copy link
Contributor

@congtong can you upload the obj model so we can help debug?

@congtong
Copy link
Author

@lilleyse thanks!

model.zip

@lilleyse
Copy link
Contributor

lilleyse commented Aug 6, 2020

@congtong there's a few nan's in the obj which is causing the parser to skip those lines

vn 0 -0.00000023035368 1
vn nan nan nan
vn -0.17363405227661 0 -0.98481023311615
vn -0.63710129261017 -0.63440746068954 0.43775460124016
vn -0.34200474619865 0 -0.93969821929932
vn nan nan nan
vn -0.5000251531601 0 -0.86601090431213
vn -0.50270861387253 -0.61126267910004 0.61126267910004
vn -0.64278835058212 0 -0.76604384183884
vn -1 -0.00000000000086 0
vn -0.76603543758392 0 -0.6427983045578
vn nan nan nan
vn -0.00016898373724 -0.70710676908493 0.70710676908493
vn -0.86602908372879 0 -0.49999359250069

Are you using Vectorworks? I saw a similar bug report in assimp: assimp/assimp#2428

@bennlich
Copy link

It looks like assimp decided to coerce NaNs to 0s: assimp/assimp#2429

@uc-asa
Copy link

uc-asa commented Jun 21, 2023

I'm also facing the same with but with a bit different message 'Normal index 47 is out of bounds'

edsu added a commit to sul-dlss-labs/3d-eval that referenced this issue Nov 7, 2023
There were a few obj files that contained some instructions which
obj2gtfl was not able to recognize, which then through off the vertex
indexing and caused the conversion to fail with an error:
"Normal index ___ is out of bound"

- hs903fr5133
- kn073qt9437
- pr756nc2659
- vr966cz0421
- vx600rw8369
- yg363gd9984

I found some information about it at CesiumGS/obj2gltf#243

To remediate the converter first creates a copy of the original .obj
file, and edits "nan" values to "0.0" in the copy. This copy is then
used to run the obj2gltf program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants