Menu

#11 Vertex Normal issues

open
5
2013-11-01
2012-10-26
No

If i try to export an .obj to a .ctm I am experiencing -what looks to me like - vertex normal issues.
Is it possible that duplicate vertices are the reason and if yes why?

http://threever.org/demos/problem/webgl_loader_ctm2.html
http://threever.org/demos/problem/assimpobj.png
obj
http://threever.org/demos/problem/sphereDAEtoOBJ_ASSIMP.obj

Discussion

  • Matthias Guntrum

    converted ctm

     
  • jozxyqk

    jozxyqk - 2013-11-01

    I've been experiencing issues with normals during obj to ctm conversion. I suspect it's to do with the way obj can use separate indices for position/normal. I created a small python script to generate unique vertex/normal pairs within the obj and the normals came out just fine afterwards.

     

    Last edit: jozxyqk 2013-11-01
    • Valentin K

      Valentin K - 2015-10-08

      Could you post a link to your script please???

       
      • jozxyqk

        jozxyqk - 2015-10-09

        Had a look for it but can't find it sorry. The basic idea was as follows:

        Faces (with "f" at the start of the line) specify indices for each vertex such as '3/4/5'. I just kept a dictionary of these combinations, creating new vertex/texture coord/normals every time I found a new combination, replacing the face's vertex with indices of all the same number (the index of the combination in the dictionary).

         

Log in to post a comment.