Jump to content

How to import mesh from remote location


derekxw
 Share

Recommended Posts

Hi,

I'm new to Babylon and try to load my mesh from a remote address. I put it in my aws s3 bucket and public it on aws cloudfront. So it is accessible via http request. Can I stringify .babylon file as json file and feed it to SceneLoader? And load it to my scene via ImportMesh("","", "data:mydatahere", scene, onsuccess, progressCallBack, onerror)? or is there a better way?

Thanks,

Derek

Link to comment
Share on other sites

Hi Deltakosh,

Thanks a lot for your fast reply! 

The first parameter of importMesh should be object's name, but, hi, it works. :)

babylon.SceneLoader.ImportMesh("", "http://some.cloudfront.net/", "myfile.babylon", scene, (mesh)=>{})

The model loaded correctly. but I get myfile.babylon.manifest?1499536899448 404(Not found). What's that means?

Also, How to load texture files so that it can be detected by my .babylon file?

Does AssetManager work the same? I can do 

addMeshTask("task", "myfile.babylon","http://some.cloudfront.net/", sceneFilename)

 

Thank so much for your help!

Derek

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