Jump to content

Importing mesh does not work because of a manifest error


skalibran
 Share

Recommended Posts

Hey there,

 

after a long break I started to play with Babylon.js again. 

I want to import a mesh I created with blender (scene.babylon) and the babylon.js exporter.

When I try to call it, I get the error

GET http://perditio.com/scene.babylon.manifest?1440183275871 403 (Forbidden)b.checkManifestFile @ babylon.js:11b @ babylon.js:11b.ImportMesh @ babylon.js:14createScene @ index.html:107(anonymous function) @ index.html:125babylon.js:3 BJS - [20:54:35]: Valid manifest file not found. Scene & textures will be loaded directly from the web server.

and a white screen:

http://perditio.com/babylontest/blendertest/index.html

 

The code for calling the mesh:

var SCENE_MODEL;			BABYLON.SceneLoader.ImportMesh("scene", "./../../", "scene.babylon", scene, function (meshes) {    				var m = meshes[0];    				m.isVisible = true;    				m.scaling = new BABYLON.Vector3(0.5,0.5,0.5);    				SCENE_MODEL = m;			});			SCENE_MODEL.position.y = 1;			SCENE_MODEL.position.x = 1;

What did I wrong?

 

Thanks for reading! :)

Link to comment
Share on other sites

Hi, you got a white page not because of manifest error, you have other javascript errors. 

It's not a problem if you haven't manifest file. Default BABYLONJS try to load your files from manifest, and if you don't have one, it'll load your files directly from server.

 

Try 

BABYLON.SceneLoader.ImportMesh("", "./../../", "scene.babylon", scene, function (meshes) { //without scene as first param

It looks like you have no meshes there.

Link to comment
Share on other sites

Thanks for the fast answers. @bulisor: Unfortunetaly, if I replace the code snippet it still has the same problem. If i remove the whole function for loading the mesh, the I no longer have a whitescreen and the basic scene I created without external programs. If I change the file path, it also gives me a 404-Error for that object, so it seems like it finds it the way I did it.

 

@elkyu: If I put the .babylon-file there I see the square I "created" with blender, so everything seems to be okey.

Link to comment
Share on other sites

You have a "403 forbidden" error, access to the file is forbidden. your link is "./../.."  try to put your babylon file and the manifest in the same folder as the javascript file , just to test ^_^  

 

I don't know at all if it will solve the problem. But the error 403 says that a file is not accessible, then ..

Link to comment
Share on other sites

I took a look on your website, you use an old version of Babylon.js (Yes, 11-02-2015 it's old for Babylon.js ^_^ )

If you look here :  http://doc.babylonjs.com/whats-new a list of all the updates for each version of Babylon. 

And for the version 2.1 : "No more error when a manifest is not found"

 

So, you can try to update your babylon.js version, you can find the current version (2.2) right here : http://www.babylonjs.com/babylon.js

 

This should fix the error 403. Maybe other errors too .. 

Link to comment
Share on other sites

Have you try to put all the file in the same folder ? scene.babylon , scene.babylon.manifest and your html document , set the full permissions don't work sometimes. try to check, if the problem comes from the permissions or not

Link to comment
Share on other sites

I should have nothing to do with the manifest file.

var SCENE_MODEL;BABYLON.SceneLoader.ImportMesh("scene", "./../../", "scene.babylon", scene, function (meshes) {    var m = meshes[0];    m.isVisible = true;    m.scaling = new BABYLON.Vector3(0.5,0.5,0.5);    SCENE_MODEL = m;});SCENE_MODEL.position.y = 1;SCENE_MODEL.position.x = 1;

About your code: if you want to set the position of your imported mesh, you should do that within the callback function. If you keep it like this it probably won't work because the model is loaded asynchronously. That's means you start loading the model but before it's done you already to to set a position for it.

 

That might not be the actual problem why you don't see you mesh though. I think you have to specify the name of the mesh that you want to load from that file. Where you have BABYLON.SceneLoader.ImportMesh("scene",... you should try to replace "scene" with the name that mesh has in Blender.

 

If you want to load the whole scene you should check out the SceneLoader.Load function insted: http://doc.babylonjs.com/classes/2.2-alpha/SceneLoader

 

If you still don't get any result you can provide you babylon file here and we can try to play around with it and find a solution :)

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.

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

Loading...
 Share

  • Recently Browsing   0 members

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