i writing python converter takes in .obj file , outputs in format. i've noticed .obj files have lot of duplicate vertices, , lot of faces refer these duplicates.
so wrote script add vertex once , ignore duplicates, , if face references duplicate vertex, re-direct correct index.
i check dupes using dictionary keys x,y,z values , value "1" can add entry. check whether key exists determine whether vertex in question dupe or not.
but there reason why obj files have duplicate vertices? resulting model different if decided take out duplicate entries? have particular obj file 2849 vertices except 845 of them duplicated.
you should use set()
instead of dictionnary store unique vertices, won't need anymore use dummy value it.
about duplicated vertices, seems "bug" of model maker software or "bug" of software developper (have here)
Comments
Post a Comment