Drawing a 3D model with shadows from a .ply file

Hello. I did a basic shape on blender:

image

I exported it as .ply file. Then, on code I did:

ofMesh mesh;
mesh.load(“mesh.ply”);

then added a light and this is the result:

image

There is something missing as it looks like the faces are transparent. ¿How can I solve this?

thank you!

Can you try ofEnableDepthTest() ? By default in OF depth testing is turned off since it makes sense for 2d graphics — this looks like the kind of view you’d get if that was the case

Thank you! that was the problem.

image

Now I would like to make it looks more like the blender version, I mean, each face with a certain amount of light. May I learn more about shaders? Could you give me a hint for where could I start?

Hey I did it.

It was a matter of export settings on blender:

image