# Copy textures to output must be checked

**URL:** <https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061>\
**Category:** Bugs\
**Created:** [January 16, 2020, 2:03am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061 "2020-01-16T02:03:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunda1986](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Thunda1986](https://forum.babylonjs.com/u/Thunda1986)\
**Post date:** [January 16, 2020, 2:03am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/1 "2020-01-16T02:03:54Z")

</div>

Whenever I export a glb, it won’t export correctly unless “copy textures to output” is checked, and it generates a bunch of copies of the assigned textures to the exported folder. I would like to embed the textures into the glb without generating these textures. An example of what happens if it isn’t checked is textures won’t show up at all, and the mesh will appear white.

---

<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:** [January 16, 2020, 5:01pm UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/2 "2020-01-16T17:01:30Z")

</div>

Pinging @Drigax

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [January 16, 2020, 5:57pm UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/3 "2020-01-16T17:57:09Z")

</div>

This is in Maya, correct?

Looking at this, the behavior is somewhat strange.

I think at the very least, we shouldn’t write the individual texture files to disk when exporting to .glb. Disabling it only seems to work for .babylon export, as gltf and glb export appears to ignore this setting.

> <https://github.com/BabylonJS/Exporters/issues/733>
>
> See:
> https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061
> A simple scene to reproduce this:
> During glb and binary babylon export, we should not write the texture files to disk when...

---

<div class="post-metadata">

**Author:** ![Thunda1986](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Thunda1986](https://forum.babylonjs.com/u/Thunda1986)\
**Post date:** [January 17, 2020, 12:21am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/4 "2020-01-17T00:21:41Z")

</div>

Yeah this is in Maya 2019.

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [January 17, 2020, 1:06am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/5 "2020-01-17T01:06:05Z")

</div>

Great! our texture export code is…messy to put it lightly, but I think I’ll have a fix soon. I just need to validate that I haven’t broken any paths we use for exporting glTF textures.

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [January 17, 2020, 2:53am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/6 "2020-01-17T02:53:59Z")

</div>

Fix is checked in 😊

---

<div class="post-metadata">

**Author:** ![Thunda1986](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Thunda1986](https://forum.babylonjs.com/u/Thunda1986)\
**Post date:** [January 17, 2020, 2:57am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/7 "2020-01-17T02:57:30Z")

</div>

Awesome!

---

<div class="post-metadata">

**Author:** ![Thunda1986](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Thunda1986](https://forum.babylonjs.com/u/Thunda1986)\
**Post date:** [January 28, 2020, 11:39pm UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/8 "2020-01-28T23:39:58Z")

</div>

I think the last change may have broken something. I am making content for the new Adobe Aero app on ios, and while the glb’s exported with your latest update look fine in Babylon sandbox viewer, they do not work in Adobe Aero, and load with “missing texture” checker patterns on them. Older animations exported with past versions of Babylon still have their textures so I don’t think it is the Aero app. Something has changed where it isn’t recognizing the textures. I will revert to an older Aero app to see if it fixes anything.

Update: Older stabler versions of Aero do not fix the problem. Some data is being lost with the newer version of Babylon.

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [January 28, 2020, 11:59pm UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/9 "2020-01-28T23:59:08Z")

</div>

Can you help by diffing a working gltf vs a non-working one? I assume that Aero may be stumbling over relatively pathing to the same directory for a GLTFImage.

---

<div class="post-metadata">

**Author:** ![Thunda1986](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@Thunda1986](https://forum.babylonjs.com/u/Thunda1986)\
**Post date:** [January 29, 2020, 12:14am UTC](https://forum.babylonjs.com/t/copy-textures-to-output-must-be-checked/8061/10 "2020-01-29T00:14:39Z")

</div>

I reverted to babylon version 20191108.5 from november 8th 2019 somewhat arbitrarily and it worked, the glb exported with all the generated textures again, and the app has them.
