syoyo / Tinygltfloader
Header only C++ Tiny glTF loader.
Stars: ✭ 223
Labels
Projects that are alternatives of or similar to Tinygltfloader
Code Vr
🐍 Program and explore real applications with virtual reality! Learn how to program, compete to build apps, and even collaborate with other people in realtime, in game or not!
Stars: ✭ 131 (-41.26%)
Mutual labels: gltf
Minimal Gltf Loader
A minimal, engine-agnostic JavaScript glTF Loader.
Stars: ✭ 148 (-33.63%)
Mutual labels: gltf
Gltf To Usdz Research
Research and proof of concept of converting glTF to USDZ for AR Quick Look (iOS 12+).
Stars: ✭ 164 (-26.46%)
Mutual labels: gltf
Gltf Asset Generator
Tool for generating various glTF assets for importer validation
Stars: ✭ 103 (-53.81%)
Mutual labels: gltf
Dem.net
Digital Elevation model library in C#. 3D terrain models, line/point Elevations, intervisibility reports
Stars: ✭ 153 (-31.39%)
Mutual labels: gltf
Model viewer.dart
A Flutter widget for rendering interactive 3D models in the glTF and GLB formats.
Stars: ✭ 134 (-39.91%)
Mutual labels: gltf
Gltf Transform
glTF 2.0 SDK for JavaScript, TypeScript, and Node.js.
Stars: ✭ 174 (-21.97%)
Mutual labels: gltf
Claygl
A WebGL graphic library for building scalable Web3D applications
Stars: ✭ 2,365 (+960.54%)
Mutual labels: gltf
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+523.77%)
Mutual labels: gltf
Meshoptimizer
Mesh optimization library that makes meshes smaller and faster to render
Stars: ✭ 2,930 (+1213.9%)
Mutual labels: gltf
Stereokit
An easy-to-use mixed reality library for building HoloLens and VR applications with C# and OpenXR!
Stars: ✭ 195 (-12.56%)
Mutual labels: gltf
Gltf2usd
command-line utility for converting glTF 2.0 models to USD
Stars: ✭ 182 (-18.39%)
Mutual labels: gltf
Tiny glTF loader, header only C++ glTF 1.x parsing library.
TinyGLTFLoader
is a header only C++ glTF 1.x https://github.com/KhronosGroup/glTF parsing library.
TinyGLTFLoader is deprecated. Please go https://github.com/syoyo/tinygltf for glTF 2.0 parser/serializer
Features
- Portable C++. C++-03 with STL dependency only.
- Moderate parsing time and memory consumption.
- glTF specification v1.0.0
- [x] ASCII glTF
- [x] Binary glTF(https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_binary_glTF)
- Buffers
- [x] Parse BASE64 encoded embedded buffer fata(DataURI).
- [x] Load
.bin
file.
- Image(Using stb_image)
- [x] Parse BASE64 encoded embedded image fata(DataURI).
- [x] Load external image file.
- [x] PNG(8bit only)
- [x] JPEG(8bit only)
- [x] BMP
- [x] GIF
Examples
- glview : Simple glTF geometry viewer.
-
writer : Simple glTF writer(serialize
tinygltf::Scene
class) - alembic_to_gltf : Simple Alembic to glTF converter.
- cyhair_to_gltf : Simple CyHair(hair curves) to glTF converter.
TODOs
- [ ] Write C++ code generator from json schema for robust parsing.
- [ ] Support multiple scenes in
.gltf
- [ ] Parse
skin
- [ ] Compression/decompression(Open3DGC, etc)
- [ ] Support
extensions
andextras
property - [ ] HDR image?
License
TinyGLTFLoader is licensed under MIT license.
TinyGLTFLoader uses the following third party libraries.
- picojson.h : Copyright 2009-2010 Cybozu Labs, Inc. Copyright 2011-2014 Kazuho Oku
- base64 : Copyright (C) 2004-2008 René Nyffenegger
- stb_image.h : v2.08 - public domain image loader - http://nothings.org/stb_image.h
Build and example
Copy stb_image.h
, picojson.h
and tiny_gltf_loader.h
to your project.
// Define these only in *one* .cc file.
#define TINYGLTF_LOADER_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#include "tiny_gltf_loader.h"
using namespace tinygltf;
Scene scene;
TinyGLTFLoader loader;
std::string err;
bool ret = loader.LoadASCIIFromFile(scene, err, argv[1]);
//bool ret = loader.LoadBinaryFromFile(scene, err, argv[1]); // for binary glTF(.glb)
if (!err.empty()) {
printf("Err: %s\n", err.c_str());
}
if (!ret) {
printf("Failed to parse glTF\n");
return -1;
}
Running tests.
Setup
Python 2.6 or 2.7 required. Git clone https://github.com/KhronosGroup/glTF-Sample-Models to your local dir.
Run test
After building loader_example
, edit test_runner.py
, then,
$ python test_runner.py
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].