Wavefront and Java3D .obj FormatThe Wavefront .obj file format is a standard 3D object file format created for use with Wavefront's Advanced VisualizerÖ and available for purchase from Viewpoint DataLabs, as well as other 3D model companies. Object Files are text based files supporting both polygonal and free-form geometry (curves and surfaces). The Java 3D .obj file loader supports a subset of the file format, but it is enough to load almost all commonly available Object Files. Free-form geometry is not supported. The following text is close to the description of the .obj file format in the Sun Java3D documentation. The Object File tokens currently supported by the JavaView loader are listed below. Unknown tokens are skipped without affecting the reading process.
The example file sample.obj is given below (it is a cube): v 1 1 1 v 1 1 -1 v 1 -1 1 v 1 -1 -1 v -1 1 1 v -1 1 -1 v -1 -1 1 v -1 -1 -1 f 1 3 4 2 f 5 7 8 6 f 1 5 6 2 f 3 7 8 4 f 1 5 7 3 f 2 6 8 4 |