Implement Basic Geometry File Loading Into OpenGL's Standard.
As we all know geometry has vertices, normals, textures, etc as part of the basic mesh, and there are many file formats out there today people work with importing and exporting to and from various content authoring/editing tools.
Many formats now cram extra information such as scene, camera, and animation information into the file formats and also make overly bulky and uneccessarily complicated systems such as XML based formats.
When you compare a basic format such as an OBJ to a DAE or LWO file you see a huge difference, however, the most basic information needs are the same for the most common programming tasks, and many of the standard file formats have been around so long now and useful today, it's kind of ironic that OpenGL hasn't by default already included in the spec functions which handle the basic loading and exporting of such formats all these years, and we know JPG's, BMP's, and PNG's have been around a really longtime.
The basic needs and core data remains the same, and an internal Universal Mesh Format could be applied the information is loaded into and processing performed on much as the current VBO and VAO's etc., but a step simpler, assuming that the standard mesh to be imported and exported is the standard triangular mesh, and a future addition might include converting such meshes into 2D graphical pixels stored in arrays.
The OBJ file format is perhapes the best example of such implementable simplicity that would eliminate the repetitive and complicated random mistakes when always needing to code importers and exporters.
DirectX is already a technology which has been implementing even their own file format, but it's not really another external file format we need, it's we need the optimized import and export capabilities built into the existing spec from the start.
And this is what I'd like to see in a future addition.
Example of the Wavefront OBJ File Format:
Even if the importing and exporting was added to the OpenGL spec and data was in a universal format stored internally, we always have the option to do things manually and make changes, but let's face it, the OBJ file format has been around a longtime and doesn't change very often if at all.
However, formats such as Collada more advanced, but as it's XML based unless you really know what you're doing with node handling, coding the importer and exporter can be a challenge and developers will often make a bunch of programmatic mistakes along the way which impacts performance as well, and since OpenGL is a high performance graphics standard, it might enhance development of both content and applications if the such base functionality were included.
The below is really what basic standard meshes boil down to and have for a very longtime.
The Basic Mesh Format (Triangular Mesh):
Name (User/Program Supplied Mesh Name for This Mesh/Geometry Object)
InternalMeshName (Mesh Base Name)
Vertices (Physical Points of the Geometry)
Normals (For Standard Mesh Lighting)
UvTextureCoordinates (For Applying Textures To Surfaces)
Indices (Describes Surfaces/Faces of Geometry Vertices and for Optimizing)
Materials (To Apply Vertex Colors and Textures Onto Geometry Surfaces)
Textures (Assigned to Materials and Applied to Surfaces)
Very simple optimizations and simplification of texture loading:
When textures loaded to prevent duplicate loading of existing loaded textures into memory you simply check texture names in a hashtable or vector array during load and reuse storing the ID's/Names.
Most all the standard data should load in the background like textures and use OpenGL's optimized functions already. Today there's other things such as shading technique's, but this is usually applied secondary in the form of post processing techniques that modifies coloring and the outer shell appearence.
Last edited by Knight Chat X; 09-29-2012 at 07:29 PM.
Reason: Basic Mesh Description Added