Understanding the OBJ file format

The goal of this project is to view 3D models in the Wavefront OBJ format. Before we begin coding, let's take a look at the file format. A reference can be found at http://www.fileformat.info/format/wavefrontobj/egff.htm.

As we know, 3D models can be represented as a mesh of X, Y, and Z vertices. Sets of vertices are connected to define a face of the mesh surface. A full mesh surface is a collection of these faces.

Each vertex can also be assigned a normal vector and/or a texture coordinate. The normal vector defines the outward facing direction at that vertex, used in lighting calculations. The UV texture coordinate can be used to map texture images onto the mesh surface. There are other features of the format, ...

Get Cardboard VR Projects for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.