0

I'm trying to load an Obj file into my scene. I used an online tutorial.

I took the entire Model_OBJ class as it is without changing it but for some reason when I try to draw the model this is what I get. I also tried taking the Display function and the initialize function so it should have been almost entirely the same..

Does anyone have any thought as to why it comes out like this? I'd paste my code but it really is just a copy of the website's Model_OBJ class

Cessna model

1
  • If the model is the same, and the load code is the same, the only thing left is your draw code. Can we see it? Commented Sep 5, 2015 at 20:31

2 Answers 2

1

Looks like inconsistend face winding across the mesh. When drawing the primitives in a mesh it is expected that for all the front facing faces, when projected onto the screen all the vertices of each primitive end up in either clockwise or counterclockwise order for all vertices. Your model looks like there is no consistency in the winding order.

Sign up to request clarification or add additional context in comments.

1 Comment

but I used the same model he used in the tutorial and his model appears fine :\
-1

So apparently my problem was that I didn't triangulate the obj. Downloaded Blender and triangulated and now it works.

Thanks everyone

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.