3
$\begingroup$

I have created a model in blender in which I wish to use in my openGL application. Before exporting I expected the obj file to look something similar to this.

enter image description here

However when I exported the file I got something like this

enter image description here

I started to ponder on whether I had exported it wrong or not, as this is the first time I have used blender. I am currently using blender version 2.70.

Thanks

$\endgroup$
6
  • $\begingroup$ gandalf, I think you put the screenshots backwards $\endgroup$
    – Justin
    Jun 13, 2014 at 20:03
  • $\begingroup$ @Justin Whoops, good catch. thanks :) (no wonder I was so confused after editing it..) $\endgroup$
    – gandalf3
    Jun 13, 2014 at 20:04
  • 1
    $\begingroup$ Looks like you somehow managed to strip all newlines? Maybe Unix line endings on Windows system. $\endgroup$
    – ideasman42
    Jun 13, 2014 at 20:23
  • $\begingroup$ @ideasman42 is there anyway to solve this problem, or will I just have to read it into my application as is? $\endgroup$ Jun 13, 2014 at 21:06
  • 2
    $\begingroup$ @DorkMonstuh If you open up the file in Notepad++, it should look like the Wikipedia example you provided. It shouldn't really make a difference, though. $\endgroup$
    – Justin
    Jun 13, 2014 at 21:20

1 Answer 1

6
$\begingroup$

The problem is (as guessed by ideasman42) that Blender exports .obj-files always (at least I tested it on windows and Linux) with Linux line endings (that means there are only LF and no CR characters).

If you use a better editor than the standard Notepad you can often see the file correct even on Windows (for example with Notepad++). There should be no problems using this file as it is, because I think most Programs can work with both line ending types. If it doesn't work it's easy to convert the line endings (as well with something like Notepad++).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .