O'Reilly logo

Cardboard VR Projects for Android by Matt Schoen, Jonathan Linowes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required