ramkrishna Posted October 11, 2018 Share Posted October 11, 2018 Hello All, I am trying to save scene after editing using scene serializer. Below are the things i have achieved till now. 1. I am able to edit meshes under scene 2. I am able to download edited scene successfully. Below are problems i am facing 1. When i clone scene (using double click) i am not getting exactly same replica of required mesh. 2. When i try to play downloaded scene under sandbox new scene showing with no light. Below is the link to example play ground. http://playground.babylonjs.com/#1W8WP0 For dowload refer: https://ramkrishnautpat.github.io/platform/platform/Edit.html Edit.html Quote Link to comment Share on other sites More sharing options...
Guest Posted October 11, 2018 Share Posted October 11, 2018 Hello, pinging @kcoleyfor more info. Lights are not yet exported to the gltf file (but this is on the work: https://github.com/BabylonJS/Babylon.js/issues/4387) Quote Link to comment Share on other sites More sharing options...
ramkrishna Posted October 12, 2018 Author Share Posted October 12, 2018 Hello @Deltakosh, Thanks for reply. Is there any other way to clone you mesh as is and to download edited mesh. Any workaround will work. Thanks Quote Link to comment Share on other sites More sharing options...
kcoley Posted October 12, 2018 Share Posted October 12, 2018 Hi @ramkrishna , you can launch the inspector from the playground, go to the glTF tab and select "Export GLB" after editing your scene. Quote Link to comment Share on other sites More sharing options...
ramkrishna Posted October 14, 2018 Author Share Posted October 14, 2018 Hello @kcoley, Thank for reply and apologies for delayed replay. I have tried implementing suggestion provided by you and below are my findings. 1. I could able to download edited scene in ".glb" format. 2. However. when i try to render the downloaded scene in sandbox i get attached error, any mistake i made or route me to right way to download scene. I have question in continuation with your suggestion. 1. How can implement same mechanism in my code (refer Edit.html) so that i can make generic logic. So whenever user wants to save he will get download of file in same way. Thanks Quote Link to comment Share on other sites More sharing options...
kcoley Posted October 15, 2018 Share Posted October 15, 2018 Hi @ramkrishna. 2. The error is currently a bug in sandbox, which has been flagged here: https://github.com/BabylonJS/Babylon.js/issues/5360 3. You can trigger an event where you serialize your scene to gltf or glb based on the docs here: https://doc.babylonjs.com/extensions/gltfexporter Something like this: BABYLON.GLTF2Export.GLBAsync(scene, "fileName").then(function(glb) { glb.downloadFiles(); }); Let me know if have further questions on this. Quote Link to comment Share on other sites More sharing options...
ramkrishna Posted October 16, 2018 Author Share Posted October 16, 2018 Hello @kcoley, Thanks for reply. I will check and get back to you if i have any further questions. Thanks Quote Link to comment Share on other sites More sharing options...
kcoley Posted October 18, 2018 Share Posted October 18, 2018 @ramkrishna no problem! Btw, the sandbox bug should be fixed now. ssaket 1 Quote Link to comment Share on other sites More sharing options...
ramkrishna Posted October 19, 2018 Author Share Posted October 19, 2018 @kcoley, Yes i can play downloaded .glb file on sandbox now. kcoley 1 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.