# I am adding gltf2 support to Cinder

**URL:** <https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300>\
**Category:** CinderBlocks\
**Created:** [September 7, 2018, 4:18pm UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300 "2018-09-07T16:18:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [September 7, 2018, 4:18pm UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/1 "2018-09-07T16:18:41Z")

</div>

The code is here [https://github.com/jing-interactive/MeshViewer](https://github.com/jing-interactive/MeshViewer)  
Still in early stage, but it’s working.  
I should have it completed in this month (2018-Sept)

 ![screenshot_2375](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/ca9c9aec9274f9a958354eb4ffdc39488dc0cd7b.jpeg)

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [September 8, 2018, 10:07am UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/2 "2018-09-08T10:07:29Z")

</div>

I am so productive 🙂

![screenshot_2579](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex030/uploads/libcinder/original/1X/12d61b334078ec940fc2a8d366a9eef164f2b51b.png)

![screenshot_2073](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex030/uploads/libcinder/original/1X/eac9213644358c23eaac4497843928c66d1b7506.png)

![screenshot_1846](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex030/uploads/libcinder/original/1X/9e21adf00149c41e1ec359e2a9d727518ee686b8.png)

---

<div class="post-metadata">

**Author:** ![Malfunkn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/malfunkn/32/761_2.png) [@Malfunkn](https://discourse.libcinder.org/u/Malfunkn)\
**Post date:** [September 8, 2018, 9:05pm UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/3 "2018-09-08T21:05:47Z")

</div>

Very cool! It will be great to get the animation data working eventually too.

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [September 11, 2018, 8:14am UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/4 "2018-09-11T08:14:07Z")

</div>

More

 ![scene](https://canada1.discourse-cdn.com/flex030/uploads/libcinder/original/1X/8d13786558f1a4daee96e457c6158901b3ccf174.jpeg)

---

<div class="post-metadata">

**Author:** ![Malfunkn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/malfunkn/32/761_2.png) [@Malfunkn](https://discourse.libcinder.org/u/Malfunkn)\
**Post date:** [September 11, 2018, 10:33pm UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/5 "2018-09-11T22:33:06Z")

</div>

For anyone else getting three unresolved external symbols for tinyGltf::WriteImageData for png jpg and bmp.  
All you have to do is [add, TINYGLTF\_NO\_STB\_IMAGE\_WRITE to Preprocessor.Definition](https://github.com/jing-interactive/MeshViewer/issues/1#issuecomment-420487705).  
Thanks Jing! Great work and looking good!

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [September 14, 2018, 2:37am UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/6 "2018-09-14T02:37:38Z")

</div>

tiny\_obj\_loader based OBJ loading is also added in this project, Cinder’s obj loader is sometimes too slow ☹

---

<div class="post-metadata">

**Author:** ![notlion](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/notlion/32/11_2.png) [@notlion](https://discourse.libcinder.org/u/notlion)\
**Post date:** [October 13, 2018, 6:25pm UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/7 "2018-10-13T18:25:13Z")

</div>

@vinjn I’ve also been working on a utility for rendering GLTF2 files parsed with tinygltf. It has support for rigid animations and up to 4 blend shapes per mesh.

I wasn’t intending to release it since the implementation is pretty specific for my use case, but the code is up in a Gist. Feel free to use it verbatim or as reference:

> <https://gist.github.com/notlion/37f9ed06f0ec448057bd61e0fc88d996>
>
> There are more than three files. show original

ryan

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [October 18, 2018, 1:25am UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/8 "2018-10-18T01:25:48Z")

</div>

Looks promising, can you create a buildable project so that we can play with it?

---

<div class="post-metadata">

**Author:** ![vinjn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/vinjn/32/44_2.png) [@vinjn](https://discourse.libcinder.org/u/vinjn)\
**Post date:** [January 15, 2019, 5:54am UTC](https://discourse.libcinder.org/t/i-am-adding-gltf2-support-to-cinder/1300/9 "2019-01-15T05:54:00Z")

</div>

The code base is now split to a reusable lib and a sample.
