|
My 3D Studio file loader is written in object oriented C++ and uses SDL_RWops for the loading of the data. This way you can load the 3ds file not only from a file stored on disk but also directly from memory. You can also use the zziplib library and obtain an SDL_RWops structure to load the 3ds file from a zip archive. At the moment the file loader is capable of reading *.3ds files and extracting some, but not all, of the contained information. The loader can extract the following information: - Triangular Mesh
The loader reads the triangular mesh, the face-material associations, smoothing group data, edge flags and mapping coordinates. - Calculation of per vertex normals
With the smoothing group information the loader can calculate per vertex normals which are necessary for smooth shading of rounded surfaces like the surface of a sphere. - Material and texture map info
The loader reads the material block information contained in the 3ds file and extracs the most important material and texture map information. - Light info
The light information block is read and the information about lights is extraced.
The reading of material and light information can still be extended. At the moment the loader cannot read the camera information and the Keyframe chunk for the animation. The loader also hasn't got much of documentation yet. |