Wings3D .obj file -> OpenGL problem

Member
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.

G
Quote this message in a reply
Hog
Member
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
Member
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

Flash!
Quote this message in a reply
clapton541
Unregistered
 
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
Member
Posts: 281
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
Luminary
Posts: 5,125
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
Moderator
Posts: 1,552
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: http://72.14.253.104/search?q=cache:zCpP...cd=4&gl=ca
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Alpha Channel Problem Moganza 1 1,449 Jan 19, 2013 08:25 AM
Last Post: sealfin
  Simple OpenGL ES problem soulstorm 3 3,348 May 14, 2009 03:53 PM
Last Post: AnotherJake
  Opengl picking problem (zip file) papillon68 1 3,751 Mar 1, 2009 08:49 PM
Last Post: chronus
  Problem with SOIL in OpenGL RingoEST 12 7,950 Aug 12, 2008 09:30 PM
Last Post: RingoEST
  Mysterious openGL problem AndyKorth 12 4,953 Feb 15, 2008 02:57 PM
Last Post: Skorche