FreakTheMighty Posted November 28, 2017 Share Posted November 28, 2017 Is there any way to export a babylonjs scene as a gltf rather than the ".babylon" format? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 28, 2017 Share Posted November 28, 2017 From where ? if from 3dsmax it is fully integrated. Quote Link to comment Share on other sites More sharing options...
FreakTheMighty Posted November 29, 2017 Author Share Posted November 29, 2017 I'd like to export from babylon.js. For example, the babylonjs editor allows users to export a babylon scene file, instead I'd like to export a gltf. Quote Link to comment Share on other sites More sharing options...
hunts Posted November 29, 2017 Share Posted November 29, 2017 you'll need a gltf serializer then. unfortunately, i'm no expert of gltf Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted November 29, 2017 Share Posted November 29, 2017 Without ever having worked with or used the format, I guess you should be able to reverse the gltf loader to create a export function. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 29, 2017 Share Posted November 29, 2017 This does not exist currently in Babylon but is a nice idea. Somebody fancy creating a pull request ??? FreakTheMighty and RaananW 2 Quote Link to comment Share on other sites More sharing options...
FreakTheMighty Posted November 29, 2017 Author Share Posted November 29, 2017 Thanks @Sebavan , I had a feeling that was the answer. Can you point me to an entry point in the code that handles the current scene export? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 29, 2017 Share Posted November 29, 2017 Here it is: https://github.com/BabylonJS/Babylon.js/tree/master/serializers/src currently only supporting obj Quote Link to comment Share on other sites More sharing options...
FreakTheMighty Posted November 29, 2017 Author Share Posted November 29, 2017 @Sebavan thanks, but what handles the ".babylon" export format that I see the the http://editor.babylonjs.com/? Also, I've created a github issue here: https://github.com/BabylonJS/Babylon.js/issues/3247 . I'm afraid I don't have much to contribute ATM, but I figure its worth getting the ball rolling with an issue. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 29, 2017 Share Posted November 29, 2017 The scene serializer handles it: https://github.com/sebavan/Babylon.js/blob/master/src/Tools/babylon.sceneSerializer.ts and as gltf only support a subset, you can recreate the same as https://github.com/BabylonJS/Babylon.js/blob/master/serializers/src/OBJ/babylon.objSerializer.ts Also if you prefer C# you can rely on https://github.com/BabylonJS/Exporters/blob/master/3ds Max/Max2Babylon/Exporter/BabylonExporter.GLTFExporter.cs which convert babylon to gltf for the 3dsmax exporter. Quote Link to comment Share on other sites More sharing options...
Ravi Posted February 27, 2018 Share Posted February 27, 2018 Please check above thread. .babylon to .gltf serialization is working properly for me. Hope this will also help you 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.