jonnenauha / obj-simplify

Object File (.obj) simplifier
MIT License
132 stars 16 forks source link

fatal error while processing file invalid syntax #5

Closed jkuri closed 6 years ago

jkuri commented 6 years ago

hi @jonnenauha! first of all, thanks for this tool. looks great and fast.

I encountered an issue with this tool throwing fatal error

[FATAL] line:381459 Found invalid number from "-1.#IND00 -1.#IND00 -1.#IND00": strconv.ParseFloat: parsing "-1.#IND00": invalid syntax

when trying to simplify the object. note that I am not very knowledgeable about the .obj format or any other 3d format. I bought model of my Mazda6 and got obj file with lines like:

vt  0.673680 0.303679 0.000000
vt  1.000000 0.303948 0.000000
vt  0.250000 0.661712 0.000000
vt  0.250000 0.161712 0.000000
vt  -1.#IND00 -1.#IND00 -1.#IND00
vt  0.205604 0.321078 0.000000
vt  0.794396 0.321078 0.000000
vt  0.481795 0.692745 0.000000
vt  0.329577 0.631309 0.000000

so I am not sure if there's a problem with obj-simplify tool or with my .obj file. Also, note that this file can be opened with the online 3dviewer or tools like blender. I would appreciate any help on this one, thanks!

jkuri commented 6 years ago

got it working, converted with fbx converter tool and .obj file did not include lines like -1.#IND00.

jonnenauha commented 6 years ago

Yeah, I think its best for my tool to report the problem and line number and let the user fix how he thinks is best. Silently ignoring or doing some other special stuff would be imo worse than just fataling out. Warnings can be and most likely will be ignored by users :)

Good that you got it figured out.