# GLB Exporter has no textures if NullEngine is used

**URL:** <https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463>\
**Category:** Bugs\
**Tags:** glb, nullengine\
**Created:** [July 31, 2024, 8:54pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463 "2024-07-31T20:54:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuripourre](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuripourre/32/26111_2.png) [@yuripourre](https://forum.babylonjs.com/u/yuripourre)\
**Post date:** [July 31, 2024, 8:54pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/1 "2024-07-31T20:54:09Z")

</div>

Hello everyone,

I am trying to export my scene on server side, the exact same code works if the Engine is a regular engine but if I use a NullEngine, the textures are not exported.

I am not 100% sure if it’s a bug or by design but would be great to have it working without any workarounds.

Here is the playground:

> **[Babylon.js Playground](https://playground.babylonjs.com/#19KYV1%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

If you use a regular Engine, the produced glb file has 436KB with the NullEngine the file has only 88 bytes.

Thank you in advance 😃

---

<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:** [July 31, 2024, 9:26pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/2 "2024-07-31T21:26:07Z")

</div>

Unfortunately this is by design. NullEngine has no access to GPU to load textures.

One way to do it: [Running Babylon.js On A Server | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/setup/support/serverSide)

---

<div class="post-metadata">

**Author:** ![yuripourre](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuripourre/32/26111_2.png) [@yuripourre](https://forum.babylonjs.com/u/yuripourre)\
**Post date:** [July 31, 2024, 10:36pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/3 "2024-07-31T22:36:07Z")

</div>

Oh, no! I was hopping that was wrong with the code.

In that case, I probably have two options, right?

1 - Use puppeteer or similar solutions as was suggested in other threads

2 - Polyfill the methods to avoid the GPU calls, maybe load the texture from memory.

I will probably rethink the solution I want and go in a completely different direction.

Thanks for the answer, you just saved me a lot of time debugging!

---

<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:** [July 31, 2024, 11:09pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/4 "2024-07-31T23:09:28Z")

</div>

My pleasure!

---

<div class="post-metadata">

**Author:** ![luffyaprk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/luffyaprk/32/39786_2.png) [@luffyaprk](https://forum.babylonjs.com/u/luffyaprk)\
**Post date:** [September 2, 2024, 7:50am UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/5 "2024-09-02T07:50:16Z")

</div>

When can you support this feature? I think babylon.js needs to increase support on the server-side

---

<div class="post-metadata">

**Author:** ![luffyaprk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/luffyaprk/32/39786_2.png) [@luffyaprk](https://forum.babylonjs.com/u/luffyaprk)\
**Post date:** [September 2, 2024, 8:05am UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/6 "2024-09-02T08:05:25Z")

</div>

bro,have you solved the problem of material loss?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 2, 2024, 5:31pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/7 "2024-09-02T17:31:45Z")

</div>

You could use smthg like this: [Babylon.js docs](https://doc.babylonjs.com/features/featuresDeepDive/scene/renderRemoteScreenshot)

---

<div class="post-metadata">

**Author:** ![yuripourre](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/yuripourre/32/26111_2.png) [@yuripourre](https://forum.babylonjs.com/u/yuripourre)\
**Post date:** [September 3, 2024, 3:05am UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/8 "2024-09-03T03:05:59Z")

</div>

No, sir! I changed the logic to render client-side.

---

<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:** [September 3, 2024, 4:57pm UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/9 "2024-09-03T16:57:49Z")

</div>

This is not on us unfortunately. The node.js server does not provide the required method to decode images

---

<div class="post-metadata">

**Author:** ![kzhsw](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Post date:** [September 4, 2024, 1:45am UTC](https://forum.babylonjs.com/t/glb-exporter-has-no-textures-if-nullengine-is-used/52463/10 "2024-09-04T01:45:34Z")

</div>

> [@GLB export changes original image](https://forum.babylonjs.com/t/glb-export-changes-original-image/36777):
>
> OS: Windows 10 x64 Browser: ungoogled-chromium 108.0.5359.95 Babylon.js: 5.38.0 Playground: [Babylon.js Playground](https://playground.babylonjs.com/#ZPE9Q0) Expected: Exported GLB should contains the original image. Actual: JPEG-encoded image is converted to PNG. Image size goes from 8160 bytes to 112602 bytes. See the console.assert codes for detail.

Exporting the original texture image can bypass the use of gpu.
