Vaxar Posted May 24, 2017 Share Posted May 24, 2017 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); light.intensity=0.7; 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); ground.material=matGround; 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; }); } Quote Link to comment Share on other sites More sharing options...
gryff Posted May 25, 2017 Share Posted May 25, 2017 @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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.