RayLib and Blender Models

I have had success with LoadModelFromMesh(GenMeshCube...) but am now attempting to make some models in Blender and use them. I made some stairs in Blender and exporting to an .obj file but only one triangle of each face was rendering in my code. So i went backward and started with a basic cube and exported to an .obj file. Again, I am able to load it with success but when rendered, only a triangle of each cube face renders. Anyone have any insight?


  • Some noted differences between my .obj and the examples tower.obj:

    my .obj contains references to a .mtl file and tower.obj does not.
    my.obj contains no texture vertices and tower.obj does.
    faces in my .obj contain no middle number: ex. '2//5'.

    I suppose that I am not exporting the proper data config from Blender. Perhaps I will play more with exporting from the enigma of Blender to try to get an .obj that is similar to tower.obj with a .png texture that is appropriately mapped. Still not sure why only one of two tris which make a cube face is rendering with no texture set.
  • You should triangulate model on OBJ export.
  • Yes, thanks, that seemed to work. Got stairway rendered. I was experiencing some 'clipping' of sides but I assume this is because I made the model exactly 1.0000f^3 which is the size of all of my textured cubes as I draw. Scaling down slightly in blender seemed to solve that. Next I will try to texture. Thanks again. :)
Sign In or Register to comment.