hen Posted January 15, 2016 Share Posted January 15, 2016 Im am actually working on some MMO level editor wich was originally created with three.js and is now running with babylon (wich seems to be a wise decision so far). We did develop this app over 2 years and switching to babylon tooked just 6 weeks, wich was amazing. One important feature of this app is that the designers can upload opencollada assets wich the assetserver (ubuntu) converts in to a runtime asset format, that was GLTF when we used three.js. So normally i would just use the asset pipeline with gltf like we did before, but the loader is not working right at the moment. The babylon GLTF loader is able to load meshes, but doesnt work with Physics and transforms. Reason is that the mesh is imported with the z axis up. The loader (or GLTF) adds a parentnode to this meshes wich has some matrix applied to deal with that problem. But either if i leave that parentnode or remove it, the mesh moves in to wrong directions when changing the scale, position or applying physics. Another problem is loading meshes with skeleton and animation where the animation is disorted with some assets. Question is if there is maybe another runtime asset format for babylon wich supports to convert from collada files on linux systems? This is really a big problem here, the editor works, but im not even able to add our player characters Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 15, 2016 Share Posted January 15, 2016 @Luaacro will soon be here to help you! Quote Link to comment Share on other sites More sharing options...
Temechon Posted January 15, 2016 Share Posted January 15, 2016 2 hours ago, hen said: We did develop this app over 2 years and switching to babylon tooked just 6 weeks, wich was amazing. DK right now : Did you try to use mesh.bakeCurrentTransformIntoVertices : http://doc.babylonjs.com/classes/2.2/Mesh#baketransformintovertices-transform-rarr-void Otherwise, @Luaacro is the gltf master GameMonetize and julien-moreau 2 Quote Link to comment Share on other sites More sharing options...
hen Posted January 15, 2016 Author Share Posted January 15, 2016 2 minutes ago, Temechon said: DK right now : Did you try to use mesh.bakeCurrentTransformIntoVertices : http://doc.babylonjs.com/classes/2.2/Mesh#baketransformintovertices-transform-rarr-void Otherwise, @Luaacro is the gltf master Yes, actually it works with static meshes when you set scale -1, flip normals and bake transforms. But this doesnt work with meshes that have skeleton and animation. Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted January 16, 2016 Share Posted January 16, 2016 Hey Hen, I just saw your private message, unfortunately I didn't find the problem for the bones For all the glTF scenes I tested, they all contained a node named "Y_UP" to make the Y axis the up axis. Here, with Babylon, the up axis is Y, while with Three.js the up axis is Z: The reason why it worked well on three.js. The problem is if I apply a transform on all meshes for your case, they would be broken for others that will have the "Y_UP" node. I think you should apply the transform or add the node in your conversion stage (from COLLADA to glTF) @Deltakosh, for bones, the problem seems to come from : (the model Hen sent me did not work with the Babylon exporter as well) Quote Link to comment Share on other sites More sharing options...
hen Posted January 16, 2016 Author Share Posted January 16, 2016 Hey Luaacro, just let me share here what i wrote to you with my last pm. Its right that every gltf mesh has a parentnode named "Y_UP" to deal with the axis problem. That works for some more simple scene or presentation wich is just rendering the model. But once it comes to physics and or tricky transformations this doesnt work at all, like explained with my first post. The problem is that all gltf models converted from opencollada have this axis problem. We did several tests exporting from maya and 3ds max, wich is y and z up. After conversion to gltf it had always the "Y_UP" node added. It really doesnt matter what the up axis of the source file was. Perfect example is our character source i sent you in 3ds max format. Whatever i tried with it (max, maya, motionbuilder), there was no way to generate a gltf file that works with babylon physics and transforms. As well when loading it without any physics applied there is the issue with animations wich i reported earlier. Cheers Hen Quote Link to comment Share on other sites More sharing options...
hen Posted January 17, 2016 Author Share Posted January 17, 2016 15 hours ago, Luaacro said: they would be broken for others that will have the "Y_UP" node. Does gltf really export meshes with y-up? It seems to be z up per default to me. If yes... would it might be possible to have a axis conversion option in the loader? As example the three colladaloader works that way. Quote Link to comment Share on other sites More sharing options...
julien-moreau Posted January 25, 2016 Share Posted January 25, 2016 I add it in my TODO list as well GameMonetize 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.