[SOLVED] Missing faces with ofxAssimpModelLoader.

Hello, I tried to load several models with ofxAssimpModelLoader but they’re drawn with missing faces(?).
I’ve tried with .3ds and .obj, all with the same result

Any idea how to fix this?

Screenshot: http://d.pr/i/2CpW
Small video: http://d.pr/v/1vfj

could be your normals?
also try triangulating your mesh before export.

At first glance it looks like you haven’t enabled the depth buffer?

oh good tip!
I forgot to do that on iOS and it took me hours of debugging before remembering it wasn’t enabled.

I tried to enable the depth buffer, “glEnable(GL_DEPTH_TEST);”, in ::setup() and ::draw(), and got the same result.

The models are triangulated and I used some in a small engine I made that uses Assimp with success, so the problem doesn’t seem to be with the models.

This (https://gist.github.com/8920f97b2a4de0014326/) is the code I’m using to draw if you’d like to take a look.

I should warn it’s the first time I’m using openFrameworks and this is probably some rookie mistake.

EDIT: I’ve uploaded the models to (http://d.pr/f/yxV1).

the glEnable won’t work without setting up a depth buffer in main.mm


	ofAppiPhoneWindow * window = new ofAppiPhoneWindow();  
	ofSetupOpenGL(window, 1024,768, OF_FULLSCREEN);			// <-------- setup the GL context  

in main.mm

hope that helps!


Yes! It works! Thank you Theo and thank you SiW. You’re awesome!

Yeah, wasted time has a habit of making you spot the signs easily :wink: