# Incorrect display of glb model

**URL:** https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703
**Category:** Questions
**Created:** [September 17, 2019, 5:07pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703 "2019-09-17T17:07:33Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 17, 2019, 5:07pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/1 "2019-09-17T17:07:33Z")

</div>

Hello, I load the glb model on the [sandbox.babylonjs.com](http://sandbox.babylonjs.com/) page, everything is displayed normally.  
But when I try to load it into the game, I get this result. help me please  
I use this code here. babylon js and babylonjs-loaders installed via npm  
[![](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6086e5a75428b2dfb4a0865991fef5a6e9011af3.png) ](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6086e5a75428b2dfb4a0865991fef5a6e9011af3.png)  
[![](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/97da54a214c2a8bcfa9f0b0dcc5e9b995d956f96.png) ](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/97da54a214c2a8bcfa9f0b0dcc5e9b995d956f96.png)  
 ![girl%20err](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/0/0d167c87fde26a5efff8ba0c1f07a8c661677b18.png)

---

<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 17, 2019, 5:20pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/2 "2019-09-17T17:20:03Z")

</div>

Which result did you get? Errors in the console?

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 17, 2019, 5:27pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/3 "2019-09-17T17:27:07Z")

</div>

No, there are no errors in the console. The result is shown in the third picture.Something similar to what was in this post, the model is black, apparently due to the lack of light, but these are trifles. [Wrong export babylon sandbox](https://forum.babylonjs.com/t/wrong-export-babylon-sandbox/5688/4)

---

<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 17, 2019, 6:08pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/4 "2019-09-17T18:08:21Z")

</div>

Did you make sure to add environment ? This is mandatory when using gltf because of PBR materials

You can use shortcuts like here though:  
[https://www.babylonjs-playground.com/#BVK9I0#13](https://www.babylonjs-playground.com/#BVK9I0#13)

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 17, 2019, 6:42pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/5 "2019-09-17T18:42:30Z")

</div>

Created, the result is almost the same, only some colors appeared. I combine Babylon.js and Pixi.js. And for some reason, now this flag does not work this.scene.autoClear = false; I can throw off the glb file so that you try downloading it from yourself.

---

<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 17, 2019, 8:14pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/6 "2019-09-17T20:14:31Z")

</div>

Please create a playground to show us the problem 🙂  
We are shooting in the dark here without having a repro

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 18, 2019, 9:39am UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/7 "2019-09-18T09:39:24Z")

</div>

ok, I’m trying)

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 18, 2019, 5:18pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/8 "2019-09-18T17:18:42Z")

</div>

I can share the code through ngrok, I tried to build the application in codesandbox but the model from the remote resource is not loaded there. By the way, the model without combining with pixijs loads fine, and only when I need to combine scenes do problems arise

---

<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 19, 2019, 4:22pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/9 "2019-09-19T16:22:23Z")

</div>

Please rebuilt it in the playground (you can use that doc to load external assets: [Using External Assets - Babylon.js Documentation](https://doc.babylonjs.com/resources/external_pg_assets))

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 21, 2019, 11:48am UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/10 "2019-09-21T11:48:34Z")

</div>

[https://www.babylonjs-playground.com/#1QJHY3](https://www.babylonjs-playground.com/#1QJHY3)  
Hi) The first time it does not start, you need to click the start button. That’s something like this it works for me)

---

<div class="post-metadata">

### Author: ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)
#### Post date: [September 22, 2019, 2:57pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/11 "2019-09-22T14:57:49Z")

</div>

It works when you comment the line:

`if (pixiRenderer) pixiRenderer.render(stage);`

So there’s a conflict between PIXI and Babylon, but I can’t tell more, I don’t know what PIXI is doing.

Note that as soon as your display is screwed up, even commenting the line won’t make the playground works! You have to reload the page and comment the line before starting the replay.

Also, you get an error the first time because you should wait for the script to be loaded before trying to access PIXI.

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 22, 2019, 3:11pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/12 "2019-09-22T15:11:57Z")

</div>

Useful notes, thanks)

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 23, 2019, 1:47pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/13 "2019-09-23T13:47:35Z")

</div>

[https://www.babylonjs-playground.com/#1QJHY3#6](https://www.babylonjs-playground.com/#1QJHY3#6)  
Fixed the error “PIXI not defined”

---

<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 23, 2019, 3:12pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/14 "2019-09-23T15:12:03Z")

</div>

This is not a problem with pixi:  
[https://www.babylonjs-playground.com/#1QJHY3#7](https://www.babylonjs-playground.com/#1QJHY3#7)

glb file seems broken:  
[https://www.babylonjs-playground.com/#1QJHY3#8](https://www.babylonjs-playground.com/#1QJHY3#8)

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 23, 2019, 4:47pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/15 "2019-09-23T16:47:48Z")

</div>

Why? I followed the links and I have a model, and there and there it was successfully displayed

---

<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 23, 2019, 4:59pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/16 "2019-09-23T16:59:02Z")

</div>

Pinging @bghgary for more info

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 23, 2019, 5:14pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/17 "2019-09-23T17:14:43Z")

</div>

Thank )

---

<div class="post-metadata">

### Author: ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)
#### Post date: [September 23, 2019, 5:55pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/18 "2019-09-23T17:55:08Z")

</div>

[https://www.babylonjs-playground.com/#1QJHY3#9](https://www.babylonjs-playground.com/#1QJHY3#9) - Candle is better, but looks very strange while moving it.

Babylon logo cube [https://www.babylonjs-playground.com/#1QJHY3#10](https://www.babylonjs-playground.com/#1QJHY3#10)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/d/d9d3e569c1da31926512b394587797a20edf904a.png)

There is definitely some conflict between rendering scripts, cannot say more at the moment.

---

<div class="post-metadata">

### Author: ![MartynovOleg](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/martynovoleg/32/4466_2.png) [@MartynovOleg](https://forum.babylonjs.com/u/MartynovOleg)
#### Post date: [September 23, 2019, 5:58pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/19 "2019-09-23T17:58:35Z")

</div>

Thank)

---

<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: [September 23, 2019, 10:10pm UTC](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703/20 "2019-09-23T22:10:11Z")

</div>

The glb has vertex colors which are being multiplied with the material’s base color.

Turning off vertex colors makes it look right.  
[https://www.babylonjs-playground.com/#1QJHY3#11](https://www.babylonjs-playground.com/#1QJHY3#11)

It looks like this model was converted from an FBX using FBX2glTF. As FBX is not always well-specified how attributes are supposed to be interpreted, it’s not FBX2glTF’s fault either. I suggest fixing the source FBX to not include vertex colors.

[Next page](https://forum.babylonjs.com/t/incorrect-display-of-glb-model/5703.md?page=2)
