Search code examples
3dvertices

Understanding faces of an object files


I downloaded an object files with vertices in below format v 10.7732 58.0762 288.7190 then faces in the below format f 2618/3145/721 2646/3174/721 2683/3219/721 2619/3146/721 Now, i;m confused on how the face format works, will someone interpret this for me?


Solution

  • Yes.

    • Each vertex has a vector which is indexed i=1..n and it defined by

      v X Y Z
      

      where each X, Y, Z are the real coordinates of the vertex.

    • Similarly with normal vectors

      vn X Y Z
      
    • And with texture vectors (2 coordinates)

      vt X Y
      
    • And with parameter vectors (? coordinates)

      vp X ...
      
    • Each face has 4 triplets of indexes

      • V is the three vertexes of the face defining a triangle, using the vector index. So 1/2/3 defines a triangle with coordinates v(1), v(2) and v(3).
      • VT for each vertex of the face this is the texture vector. So 1/2/3 defines three vectors vt(1), vt(2) and vt(3).
      • VN for each vertex of the face this is the vertex normal. So 1/2/3 defines three vectors vn(1), vn(2) and vn(3).
      • VP for each vertex of the face this is the parameter vector. So 1/2/3 defines three vectors vp(1), vp(2) and vp(3).
    References: