# Access gltf/glb custom properties

**URL:** <https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040>\
**Category:** Questions\
**Created:** [March 21, 2019, 11:01am UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040 "2019-03-21T11:01:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricedoepke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mauricedoepke/32/1360_2.png) [@mauricedoepke](https://forum.babylonjs.com/u/mauricedoepke)\
**Post date:** [March 21, 2019, 11:01am UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/1 "2019-03-21T11:01:57Z")

</div>

Blender can export custom properties into a gltf/glb file. Is there any way to acess these in babylon?  
Mesh.metadata doesn’t contain them.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [March 21, 2019, 3:25pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/2 "2019-03-21T15:25:18Z")

</div>

Let me invoke our Blender Grandmaster @JCPalmer

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [March 21, 2019, 3:33pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/3 "2019-03-21T15:33:58Z")

</div>

Maybe @Vinc3r knows, but not actually a BJS question until they are actually in the file.

First, does gltf even have custom property / metadata storage?

If yes, then does the Blender implement it? For that I would go to the Blender / Khronos [repo](https://github.com/KhronosGroup/glTF-Blender-IO)

If yes, ask if / how it is implemented in the loader.

---

<div class="post-metadata">

**Author:** ![mauricedoepke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mauricedoepke/32/1360_2.png) [@mauricedoepke](https://forum.babylonjs.com/u/mauricedoepke)\
**Post date:** [March 21, 2019, 3:41pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/4 "2019-03-21T15:41:40Z")

</div>

@JCPalmer Blender does support this., the Khronos exporter as well.  
([Added support to export custom properties/extras. · KhronosGroup/glTF-Blender-Exporter@0835c60 · GitHub](https://github.com/KhronosGroup/glTF-Blender-Exporter/commit/0835c60fffb153a0c4563c35ab72044bc5830d37))

Would you be open to a pr for this if it is not implemented in the loader yet?

This would be very handy for e.g. storing information about collision shapes (whether its a box, sphere, etc) or physics data like the mass of an object.

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [March 21, 2019, 4:18pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/5 "2019-03-21T16:18:15Z")

</div>

I did not write the glft loader in BJS. Think @Deltakosh flagged me because of Blender, back to him.

@mauricedoepke, I would create a simple plane, add a value like ‘I AM ALIVE’ for the custom property, then export in the text format.

You could then post the tiny file here, and ask why not , or where this is in the loaded scene.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [March 21, 2019, 4:21pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/6 "2019-03-21T16:21:12Z")

</div>

Pinging @bghgary but I do think we expose it

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [March 21, 2019, 4:37pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/7 "2019-03-21T16:37:12Z")

</div>

[3dsmax export to .gltf with tags](https://forum.babylonjs.com/t/3dsmax-export-to-gltf-with-tags/686/11) links to a PG that adds a custom loader extension to read extras properties. You can do something similar for whatever extras you are exporting.

---

<div class="post-metadata">

**Author:** ![mauricedoepke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mauricedoepke/32/1360_2.png) [@mauricedoepke](https://forum.babylonjs.com/u/mauricedoepke)\
**Post date:** [March 21, 2019, 10:14pm UTC](https://forum.babylonjs.com/t/access-gltf-glb-custom-properties/2040/8 "2019-03-21T22:14:14Z")

</div>

Thanks, thats exactly what i needed.
