Jump to content

Can't load my meshes created in Blender


Recommended Posts

Hi guys.

I am very new to BabylonJS.

I was about to import my character from Blender but it didnt work.

It says  Error status: 0 - Unable to load /design/char.babylon in the browser console.


can somebody help?


Here is my code :

if (!BABYLON.Engine.isSupported()) {
    window.alert('Browser not supported');
} else {  
            var canvas = document.getElementById("canvas");
              var engine = new BABYLON.Engine(canvas, true);
         //scene setup
          var scene = new BABYLON.Scene(engine);
          var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 0, BABYLON.Vector3.Zero(), scene);
          camera.setPosition(new BABYLON.Vector3(0,15,-10));
          camera.attachControl(canvas, false);
          var light = new BABYLON.HemisphericLight("light", new BABYLON.Vector3(0, 1, 0), scene);
            var ground= BABYLON.Mesh.CreateGround("ground1",100,100,2,scene);
            var matGround=new BABYLON.StandardMaterial("ground1",scene);
              matGround.diffuseTexture=new BABYLON.Texture("grass.jpg",scene);

 BABYLON.SceneLoader.ImportMesh("","/design/", "char.obj", scene, function(char){
        var m=char[0];
     var bone = BABYLON.Mesh.CreateBox("box1",2,scene);
     bone.visibility = 0;
     char.parent  = bone;



Link to comment
Share on other sites

@Vaxar : Hi, and welcome to the forum :)

Are you trying , to export of your character from Blender using  the Babylon Blender Exporter (BBE)?

Or are you trying to export your character as an .OBJ file using Blender's own .obj exporter, then import the .obj file into Babylon?

No experience with the latter method.

cheers, gryff :)

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...