From Blender

In which you learn how to export 3D models from Blender into a text format that your applications can read.

The models you've rendered so far have either been defined by parametric algorithms or by you typing numbers into arrays. The time has arrived for you to learn how to render models that were made in a 3D modeling program, such as Blender.

Game engines often let you import model files from the 3D modeling programs in their native format. Unless you have the time to study these proprietary formats, you're better off exporting models in a more recognized format. Here are a few common options:

The OBJ format is a good place to start for someone learning computer graphics. But even it has some complexities that make loading models difficult. Some of these complexities can be mitigated using Blender's export options. Follow these steps to export a model from Blender in a simplified OBJ format:

  1. Click File / Export / Wavefront (.obj).
  2. Expand the Geometry panel in the dialog that appears.
  3. If you plan on computing a mesh's normals yourself, uncheck Write Normals.
  4. Uncheck Include UVs. After you learn about textures, you will leave this checked.
  5. Uncheck Write Materials, which will prevent properties like albedo and shininess from being written to a companion file. Rendering models with materials is rewarding, but parsing the materials file is a lot of work. Your time is probably better spent learning to load a newer format like glTF.
  6. Check Triangulate Faces. The OBJ format allows models to contain quadrilaterals, pentagons, and arbitrary polygons. Since your renderers expect triangles, you will save time and effort by having Blender break up polygons into triangles.

Once the file is written, your application reads it in as plain text using fetch. Then you must parse the OBJ text.