Wings3D .obj file -> OpenGL problem

Posts: 22
Joined: 2006.04
Post: #16
Thanks for the help -

i discovered the 0 index thing earlier when my spitfire's wings where attached to the tailplane...

I made a cube from scratch in blender and exported it and my display looks right (I've looked at so many odd displays it's hard to be definitely sure any more). My theory is that blender winds the polys correctly if the models actually created in the package. I was mainly using a spitfire model that I got from the net with only vertex and face info - then using blender to import and export it with normals. I think it's not rewinding the polys for export. But if it can display ok, it must be possible.

I'll try the dot product of the vertex normals with the face normal stuff this afternoon... I might just stick to models with consistent winding though.

Quote this message in a reply
Posts: 151
Joined: 2002.09
Post: #17
To make sure the culling is correct in blender you can uncheck the "double sided" option in the "mesh" "editing panel" of the "buttons window". If the culling is wrong you can change it in editing mode by selecting the vertices and choosing mesh->normals->...

P.S.: does anyone know any easy to use format to export to which supports BTN space (.obj doesn't seem to) and maybe also objects with armatures (with weights)?
Quote this message in a reply
Posts: 22
Joined: 2006.04
Post: #18
I disabled 'double sided' and it revealed the components of the model that were the wrong way round and I'm going through flipping them over now. I discovered I'd severely crippled the precision of the depth buffer which hadn't been helping.

Lo and behold... the bits that were wrong are rendering correctly in my own program now and I can show my supervisor a screen shot of a ~25000 vertex spitfire instead of some awful thing of my own creation.

Thanks Smile

Quote this message in a reply
Post: #19
I added the obj loader to my project and it didnt work. It said it couldn't find the file when I added the file to my project and it was also in the documents folder. I was using a wings export. Does anyone have any suggestions.
Quote this message in a reply
Posts: 283
Joined: 2006.05
Post: #20
The paths are usually relative to the application bundle, so try putting your object file next to the application bundle (in the build/Debug folder) rather than in the project folder. That catches everyone out.
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #21
maximile Wrote:The paths are usually relative to the application bundle

Not true.

Search the boards for the full answer.
Quote this message in a reply
Posts: 1,563
Joined: 2003.10
Post: #22
Site seems to be down, but here's a Google cache link to the answer to the "where's my file" question:
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Alpha Channel Problem Moganza 1 5,797 Jan 19, 2013 08:25 AM
Last Post: sealfin
  iPad, OpenGL ES, and XCode Instruments problem! Bandit 0 5,326 Dec 13, 2010 01:21 PM
Last Post: Bandit
  OpenGL global and local coordinate problem. mikey 4 6,598 May 26, 2009 08:48 AM
Last Post: mikey
  Simple OpenGL ES problem soulstorm 3 6,526 May 14, 2009 03:53 PM
Last Post: AnotherJake
  Opengl picking problem (zip file) papillon68 1 6,471 Mar 1, 2009 08:49 PM
Last Post: chronus