Jump to content

[SOLVED] Any Idea Why One .babylon Scene Loads and the Same .babylon Scene Doesn't


Recommended Posts


I have a test scene which loads fine but is a complete mess. So I cleaned it up today, and the .babylon file won't load no matter where I place it. The messy scene that loads fine is:



However, I cleaned the scene up to show, and the .babylon file cannot be loaded no matter where I place it - here is the scene:


I also get the following console message:


babylon.max.js:sourcemap:6714 BJS - [17:02:27]: Unable to load from baloon.babylon: importScene of baloon.babylon from Blender version: 2.78 (sub 0), exporter version: 4.6.1
        Name: Lamp, type: Point
Tools._ErrorEnabled @ babylon.max.js:sourcemap:6714

The .babylon file and code are exactly the same. This has been a hell of a week, so I just don't know if it's me right now - but I can't see what the heck is different. It claims it cannot load the point light in the exact same .babylon file.


Link to comment
Share on other sites


i can't see what i'm missing... If you can show me, I'll fix it. I'm at this job to set up other things. But I still shouldn't have so much difficulty as I've been building scenes since 2014. I just don't get it. Alzheimers?





var createScene = function(){

    var canvas = document.getElementById('renderCanvas');
    var engine = new BABYLON.Engine(canvas, true);
    var scene = new BABYLON.Scene(engine); 

    BABYLON.SceneLoader.Load("", "baloon.babylon", engine, function (newScene) {

        newScene.executeWhenReady(function () {
            for(var i = 0; i < newScene.meshes.length; i++){
                let mesh = newScene.meshes;
                mesh.isVisible = true;
                    case "Blimp_body":
                    case "engine":
                        mesh.scaling = new BABYLON.Vector3(1,1,1);
                        mesh.rotation = new BABYLON.Vector3.Zero();
                    case "prop":
                        mesh.scaling = new BABYLON.Vector3(1,1,1);
                        mesh.rotation = new BABYLON.Vector3.Zero();
                        mesh.setPivotMatrix(BABYLON.Matrix.Translation(0, 0, 10));
                    var mesh_prop = mesh
            newScene.clearColor = new BABYLON.Color3(1, 1, 1);

            //camera.attachControl(canvas, true);
            newScene.activeCamera.minZ = 0.001;
            newScene.activeCamera.maxZ = 10000;
            newScene.activeCamera.position = new BABYLON.Vector3(90,0,0);
            var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0,1,0), newScene);
            var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", newScene);
                skyboxMaterial.backFaceCulling = false;
                skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("./assets/skybox/TropicalSunnyDay", newScene);
                skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
                skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
                skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
            var skybox = BABYLON.MeshBuilder.CreateBox("skyBox", {size:1000.0}, newScene);
                skybox.material = skyboxMaterial;
            scene = newScene;
            engine.runRenderLoop(function() {

        scene.registerBeforeRender(function () {
        if (mesh_prop) {
            mesh_prop.rotate(BABYLON.Axis.Y, Math.PI / 64, BABYLON.Space.LOCAL);

window.addEventListener('resize', function(){
  return scene;




Link to comment
Share on other sites

Hey @Dad72, @Deltakosh, @RaananW, @davrous, and everyone else who has answered a post from me the past couple of weeks. I suppose I was still in shock after my house burned; but that's no excuse I can really quantify. I looked back at my questions the past couple of weeks, and realized that they were all stupid procedural errors - in which I've been using all procedures for years now - as looking at these, it's so obvious what the problem is - just nonsensical garble.

So I'm not certain what happened, but I just sat down yesterday and created several scenes in about an hour which I was having issues with - all except the pivot rotate function - as I've never used this before. Suddenly, I can write scenes from scratch once again, and they work first time. So I wanted to apologize for wasting everyone's time as there was never a real problem; the problem was that I simply couldn't write a damn thing correctly.

Already this morning, I'm close to delivering most of what I am scheduled to deliver for the day. So perhaps it was shock, stress, whatever - but everything appears fine now. I just need to get my Wife back from looking after her Mother in Thailand next week, and my life should have some order once again. But as far as babylon.js, I don't appear to have any issues now, and am transitioning into ES6 much more.

I just wanted you to know, as I couldn't look at a script and make any sense of it whatsoever. Totally weird.



Link to comment
Share on other sites

@Pryme8, @Deltakosh, and all -

We all might get a pass from time to time, but that was just some real dumb stuff. But I appreciate the understanding that we all go a little nuts sometimes. Honestly, I just starred at the screen, and had absolutely no idea what I was looking at. And I would still try and fix it without any clue as to what I was writing. It's something I never want to experience again; as I could feel myself losing my mind...:wacko: No joke.

Anyway, thanks again. I'll try an put in some extra time on the forum to make up for it.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...