STATUS: Discontinued.
I worked on this project for my personal rendering engine, and simply just for fun. I don't have as much free time anymore, so now I simply go for the awesome TinyGLTF Loader for my projects.
Tiny3DLoader is an open source headers-only library aiming to load some 3D formats.
Supported Formats:
- glTF
- vertices, normals, texcoords and indices
- transforms
- obj
- vertices, normals, texcoords and indices
Tiny3DLoader is greatly influenced by libraries such as assimp, tinyobjloader, or tinygltfloader
- Simple integration. The code consists of two header files
tiny-3D-loader.hpp
andjson.hpp
(from this repository) - Simple data-structure. Loaded data are saved in an easy-to-use tree structure discribed in the Data Layout section.
- Lightweight. Created to handle only few of the most common 3D format.
The loader is also memory leaks free. We use Valgrind for sanity check, and only the still reachable blocks from the STL are reported.
Both files to include are located in the includes
directory.
In order to use Tiny3DLoader, you just need to add:
#define TINY3DLOADER_EXCEPTIONS // Only needed if you allow exceptions to be thrown
#include "tiny-3D-loader.hpp"
...
to the files in which tou want to handle the loading.
Do not forget to enable C++11 compilation when compiling your code (required by the json.hpp library).
Supported compilers:
GCC 4.9.3
or newerClang 3.6.0
or newer
Use CMake to build and run the tests:
$ mkdir build && cd build
$ cmake .. && make check
$ cd bin && ./bin/check
- All
- optimize loading by removing std::string use
- add triangulation step for non-triangulated primitives
- split declarations and definitions to simplify library usage
- glTF
- vertices, normals, texcoords, indices
- transforms
- materials
- animations
- binary format
- obj
- vertices, normals, texcoords
- materials
Contributions are appreciated. You can submit PR on the develop branch, that will later be merged to the master branch. We also use the GitHub issues tracker for bugs and requests, feel free to post your questions/recommandations on it.