ders Posted March 6, 2018 Share Posted March 6, 2018 I've made a mesh in Blender and I've exported it to a .babylon file. I've also tried exporting the mesh as a .obj file but the problem persisted. I've checked my network tab in Chrome (on Mac OS btw) and I can see that the file has been downloaded so it's not a wrong path. Also, I get errors that the system couldn't find the .manifest file but I've found that that's not the issue. This is the error: Unable to import meshes from ./testObject.babylon: 0 This is the code I've been using: var loader = new BABYLON.AssetsManager(scene); house = loader.addMeshTask("pillar", "", "./", "testObject.babylon"); house.onSuccess = function (task) { console.log('---> DONE', task) task.loadedMeshes.forEach(function (m) { console.log('added'); m.position = BABYLON.Vector3.Zero(); m.scaling = new BABYLON.Vector3(0.2, 0.2, 0.2); shadowGenerator.getShadowMap().renderList.push(m); }); } house.onError = function() { console.log('ERROR', arguments); } loader.load(); Quote Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2018 Share Posted March 6, 2018 does this object work in the sandbox? If yes I will need a repro case to help more Quote Link to comment Share on other sites More sharing options...
ders Posted March 6, 2018 Author Share Posted March 6, 2018 Yes, it worked just fine. Tried .obj as well, imported as well. None of those worked in my own scene. Here's a zip with everything you need to see it happen BabylonMesh.zip Quote Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2018 Share Posted March 6, 2018 can you create a page online where I can test? Quote Link to comment Share on other sites More sharing options...
ders Posted March 8, 2018 Author Share Posted March 8, 2018 Ok, so I was hosting it on my server and checking if everything was working to put the link here, and it seems that my problem is resolved by hosting everything. I wasn't hosting my original files since I just wanted to work on it locally. Is there a reason why this happens? And shouldn't this be better described in the error since it doesn't really say anything and isn't very "Google-able" Quote Link to comment Share on other sites More sharing options...
Guest Posted March 8, 2018 Share Posted March 8, 2018 This is a security constraint from the browsers. To protect your computer you need to serve your files from a web server and not directly from the file system 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.