1
$\begingroup$

I downloaded wavefront obj model from this site http://tf3dm.com/3d-model/edward-kenway-23504.html.

The model I downloaded (According to this wikipedia article: http://en.wikipedia.org/wiki/Wavefront_.obj_file) has "Vertex/texture-coordinate/normal" face definitions. I use blender v2.66 to import and export the model. The problem is when I export the model its face definitions are different. For example:

Before import/export:

usemtl EdwardKenwayHead
s 1
f 15420/12835/15421 15421/12836/15422 15422/12837/15423
f 15422/12837/15423 15423/12838/15424 15420/12835/15421
f 15419/12839/15425 15420/12835/15421 15423/12838/15424
f 15423/12838/15424 15422/12837/15423 15424/12840/15426
f 15424/12840/15426 15425/12841/15427 15423/12838/15424

After import/export:

usemtl EdwardKenwayHead
s 1
f 1/1 2/2 3/3
f 4/4 1/1 3/3
f 5/5 1/1 4/4
f 4/4 3/3 6/6
f 6/6 7/7 4/4

Is there any way to export wavefronts with "Vertex/texture-coordinate/normal" face definitions in Blender? (v2.66) I already have C++ & OpenGL loader models with these faces.

By the way. Before export the model's size is 2.8KB and after export it is 1.8KB - good optimalization!

$\endgroup$

migrated from stackoverflow.com Dec 17 '13 at 1:03

This question came from our site for professional and enthusiast programmers.

1
$\begingroup$

There are several objects included in the one file, all vertices listed are numbered in the order they exist in the file, each object then uses a range of these vertices for it's faces.

You will find that the objects and it's related items in your exported file will be in a different order than the original, therefore each object uses a different range of vertices. You should find that the total number of vertex lines, face lines etc. should all match up, just that each object is using different numbers.

$\endgroup$
  • $\begingroup$ I see... but still... original file has 80837 lines of code and exported one only 62736. Also faces in original file have more info: x/x/x x/x/x x/x/x, while in the exported one they look like x/x x/x x/x. Info about normal index is gone. $\endgroup$ – John Doe Dec 17 '13 at 2:21
  • 1
    $\begingroup$ As per the wikipedia reference the face info is vertex/texture/normal - dropping the vertex normals might explain dropping 18000 lines. When exporting to obj there is an option to export normals, turning that on could make a difference. $\endgroup$ – sambler Dec 18 '13 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.