# Babylon graphic is no longer being rendered all of a sudden

**URL:** <https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656>\
**Category:** Bugs\
**Created:** [May 10, 2023, 11:55am UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656 "2023-05-10T11:55:52Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 11:55am UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/1 "2023-05-10T11:55:52Z")

</div>

My Babylon scene is no longer being rendered as of this morning. No changes have been made to the code base which rules out problems my end. This happens in all environments and on all browsers…

I am using the source code from [https://cdn.babylonjs.com/babylon.js](https://cdn.babylonjs.com/babylon.js)

Any advice on this would be appreciated!

Thankyou

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [May 10, 2023, 12:00pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/2 "2023-05-10T12:00:38Z")

</div>

It would be helpful to have more data.

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:04pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/3 "2023-05-10T12:04:03Z")

</div>

BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function () {  
if (document.getElementById(“custom-loading-screen-div”)) {  
// Do not add a loading screen if there is already one  
document.getElementById(“custom-loading-screen-div”).style.display = “initial”;  
return;  
}  
this.\_loadingDiv = document.createElement(“div”);  
this.\_loadingDiv.id = “custom-loading-screen-div”;  
this.\_loadingDiv.innerHTML = `@include('parts.renders.loading-screen-korniche')`;  
this.\_resizeLoadingUI();  
window.addEventListener(“resize”, this.\_resizeLoadingUI);  
document.body.appendChild(this.\_loadingDiv);  
};

```
BABYLON.DefaultLoadingScreen.prototype.hideLoadingUI = function(){
    document.getElementById("custom-loading-screen-div").style.display = "none";
    console.log("scene is now loaded");
}

var canvas = document.getElementById("renderCanvas");

var startRenderLoop = function (engine, canvas) {
    engine.runRenderLoop(function () {
        if (sceneToRender && sceneToRender.activeCamera) {
            sceneToRender.render();
        }
    });
}

var engine = null;
var scene = null;
var sceneToRender = null;

var createDefaultEngine = function () {
    return new BABYLON.Engine(canvas, true, {
        preserveDrawingBuffer: true,
        stencil: true,
        disableWebGL2Support: false
    });
};

```

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:05pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/4 "2023-05-10T12:05:01Z")

</div>

I’m new to this forum, and to Babylon js, so please forgive me if I don’t give appropriate info right away.

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:07pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/5 "2023-05-10T12:07:10Z")

</div>

In the console in the browser dev tools it is telling me the “scene is now loaded” but it is showing nothing.

This happens in all environments

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [May 10, 2023, 12:10pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/6 "2023-05-10T12:10:43Z")

</div>

You did nothing wrong, CGlass1982. You are welcome. 🙂

We have a [playground](https://www.babylonjs-playground.com/) where you can sketch your problem so that we can help you better.

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [May 10, 2023, 12:12pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/7 "2023-05-10T12:12:25Z")

</div>

I miss in your code where your scene is loaded “scene = createSzene();”

```auto
       let engine = new BABYLON.Engine(canvas, true, {
            preserveDrawingBuffer: true,
            stencil: true
        });
        let scene = createScene();

        engine.runRenderLoop(function () {
            if (scene) {
                scene.render();
            }
        });

```

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:13pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/8 "2023-05-10T12:13:28Z")

</div>

Sorry, here is where createScene is fired

window.initFunction = async function () {

```
    var asyncEngineCreation = async function () {
        try {
            return createDefaultEngine();
        } catch (e) {
            console.log("the available createEngine function failed. Creating the default engine instead");
            return createDefaultEngine();
        }
    }

    window.engine = await asyncEngineCreation();
    if (!engine) throw 'engine should not be null.';
    startRenderLoop(engine, canvas);
    window.scene = createScene();
};
initFunction().then(() => {
    sceneToRender = scene
});

```

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [May 10, 2023, 12:18pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/9 "2023-05-10T12:18:57Z")

</div>

May be you should test older versions of babylon.js

[Load an older Version of babylon in LoadingScript? - Questions - Babylon.js (babylonjs.com)](https://forum.babylonjs.com/t/load-an-older-version-of-babylon-in-loadingscript/16283)

---

<div class="post-metadata">

**Author:** ![CodingCrusader](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/codingcrusader/32/29857_2.png) [@CodingCrusader](https://forum.babylonjs.com/u/CodingCrusader)\
**Post date:** [May 10, 2023, 12:20pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/10 "2023-05-10T12:20:58Z")

</div>

You can find the version in the browser’s inspector, too:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/7/47bad068761ccceeec4a63df33cd4c20357f4d6c.png)

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:34pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/11 "2023-05-10T12:34:44Z")

</div>

How do I specify a version when importing?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/6/2699aac59bdb20606673598f1ba09d615accd722.png)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [May 10, 2023, 12:39pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/13 "2023-05-10T12:39:58Z")

</div>

You don’t. I don’t think we have access to previous versions (but I could be wrong, may be this has changed). I guess the easiest at this moment would be to download it and feed it from your server.

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 12:44pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/14 "2023-05-10T12:44:48Z")

</div>

So I have found a fix…

Babylon 6.2.0 must have breaking changes…

You can find previous versions here:

> **[cdnjs - The #1 free and open source CDN built to make life easier for developers](https://cdnjs.com/libraries/babylonjs)**
>
> Simple. Fast. Reliable. Content delivery at its finest. cdnjs is a free and open-source CDN service trusted by over 12.5% of all websites, serving over 200 billion requests each month, powered by Cloudflare. We make it faster and easier to load...

Version 6.1.0 works for me!

Thank you to all who contributed 🙂

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [May 10, 2023, 12:52pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/15 "2023-05-10T12:52:29Z")

</div>

> [@CGlass1982](#):
>
> find previous versions here:

nice find. Not sure I would use it in production as of just now but it’s a nice link to have. Thanks for sharing and have a great day 🕶

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [May 10, 2023, 1:13pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/16 "2023-05-10T13:13:13Z")

</div>

There shouldn’t be anything breaking in 6.2 so if you could share your createScene in a Playground [Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/) it would be immensely helpful for the team to understand what’s going on 😃 If you have any external meshes in your scene here’s a link explaining how you can use them on a PG: [Using External Assets In the Playground | Babylon.js Documentation (babylonjs.com)](https://doc.babylonjs.com/toolsAndResources/thePlayground/externalPGAssets)

---

<div class="post-metadata">

**Author:** ![CGlass1982](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@CGlass1982](https://forum.babylonjs.com/u/CGlass1982)\
**Post date:** [May 10, 2023, 2:33pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/17 "2023-05-10T14:33:06Z")

</div>

I’ve copied the code into a playground although I removed some external models that I am unable to share.

It renders in playground!

So maybe the issue lies when importing external models?

The models I am importing are stl files.

I use SceneLoader.Append to import them.

The link to the playground:

[Lantern | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#X3NC2C#1)

Hope this helps!

---

<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:** [May 10, 2023, 6:04pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/18 "2023-05-10T18:04:57Z")

</div>

@CGlass1982 could you share the code in PM with @carolhmj ? I am really afraid that we slipped a regression in ☹

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [May 10, 2023, 6:26pm UTC](https://forum.babylonjs.com/t/babylon-graphic-is-no-longer-being-rendered-all-of-a-sudden/40656/19 "2023-05-10T18:26:35Z")

</div>

Yup we’d really like to understand what’s going on, I tried loading some test stls and they didn’t have any problem, but there might be something different with your files?
