Jump to content
  • Advertisement
Sign in to follow this  
JoshuaWaring

Models are missing half their triangles.

This topic is 1926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I created a .OBJ loader and it loads correctly, I've matched the vertices to the ones in the file.

I load the vertices into a vertex buffer and draw it to the screen.

I export my model with Auto desk 3DSMAX 2013 and I have triangulated them.

I've been playing with this for a while now, but nothing seems to bring back my triangles :(

 

 

My source code is here:

https://docs.google.com/document/d/13bAxQgHXOjM0GtPLUt_As4EASpgr9FJ0EX7EgsFhzYI/edit?usp=sharing

My .Obj is here:

https://docs.google.com/document/d/1KToZx-iYCUVMzMeiLfuDP5bQc7M-CTo1fhC-SvtM9IY/edit?usp=sharing

Share this post


Link to post
Share on other sites
Advertisement

What half seems to be missing? What does it look like when you render the vertex buffer? Can you post a screenshot?

Share this post


Link to post
Share on other sites

It looks like all the vertices are there as you say. The thin parts in the image suggest that degenerate triangles are being drawn between verts on a ring around the taurus.

 

Is the image you showed drawing as a list, strip or fan? If you change to the others, does the image look any different?

Share this post


Link to post
Share on other sites

The screen shot is in a Strip

 

here's a list

https://docs.google.com/file/d/0B20ZnQ-9hBC3TnJPUGh3ZVZWdGs/edit?usp=sharing

and here's a fan

https://docs.google.com/file/d/0B20ZnQ-9hBC3UnNDUmd0Wm5rU1k/edit?usp=sharing

 

I'm going to try changing the offset, maybe they're starting at the wrong vertex.

EDIT: Just screwed it up, making sense now because the color would be in the position.

Edited by Joshhua5

Share this post


Link to post
Share on other sites

The problem is my understanding of how a .OBJ file works, I thought that what's listed under v are the vertex's in their position and format of the shape, when really they declare a vertex when later under 'f' it defines the faces using the defines vertices. Well sorry for the waste of time.

Share this post


Link to post
Share on other sites

In your source code I don't see anywhere where you parse face indices in the OBJ file which seems a bit unusual, this is important as face indices encourage the re-use off positions within a mesh. As your OBJ is missing faces also it's got me wondering weather 3DS has exported your model correctly in the first place. As a sanity tip, try re-importing the OBJ file you exported back into 3DS, that is an easy way to see if the exporting process worked in the first place.

 

Tip: old versions of 3DS are notorious for being a pain when it comes to OBJ exporting, that is why our team moved to Blender a year ago. If the exporter you are using doesn't do the job, try looking at your mesh again first, then try another exporter (there are a few I think you can get for 3DS), then if all fails give Blender a try :)

 

Aimee.

Share this post


Link to post
Share on other sites

I now use Blender. It really was useful for exporting. but actually using it D: almost harder than this

I found lots of issues which have been resolved, caused with an array's index starting at 0 but the vertex's start at 1.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!