edzis Posted January 10, 2018 Share Posted January 10, 2018 I am using Blender exporter to `.babylon` file format but lately am noticing more mentions of `.gltf` (and `.glb`) besides your support for others. What is your recommendation for my use case explained below or more generic rule of thumb on when to to use which format? My context: We make scenes in Blender with more than 100 smaller pieces with textures and expose those with BJS. We allow users to change textures and materials. We allow users to move objects. We do do not have any animations. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2018 Share Posted January 10, 2018 Hello and welcome In your case both formats will work. .Babylon file can contain almost everything you see in a scene but it is a babylon only format .glTF on the other hand is an open standard format supported by the Khronos Group. It contains less features but in your case it will be perfectly fine Quote Link to comment Share on other sites More sharing options...
edzis Posted January 10, 2018 Author Share Posted January 10, 2018 Thanks! Will give it a go in hopes for the binary format to reduce transport and decoding time - my `.babylon` currently weight 13 MB. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 10, 2018 Share Posted January 10, 2018 you can turn on gzip on your webserver: this will reduce the size drastically edzis 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 11, 2018 Share Posted January 11, 2018 Would be interested in the results. While a strict 4 bytes for a float might be good, I wonder about how the methods of building indexes between the 2 affect the results. FYI, look at the .log file for number of vertices exported for a .babylon. This number of vertices has a big impact, because it affects the # of positions, normals, UVs, vertex colors, matrix weights, matrix indexes, & shape keys (morph targets in BJS terminology). I thought .glTF was supposed to be non-lossy. @Deltakosh, does .glTF even index? The .babylon exporter rounds to 4 decimals prior to testing for equality, making it a lossy process. If .glTF is strict, very very small differences in values will cause it to export more vertices. This affects more than just the file size, it will also impact runtime performance. Many meshes are created with way more vertices than really required for a game. An example is the teeth mesh from MakeHuman. Unless you are doing a dentist scene ( @Pryme8 maybe), you do not need all that detail. FYI, Blender has a 'Limited dissolve' operator which can do a really good job of reducing with minimal impact. It takes a maximum angle, default 5%, to limit what it keeps. I have been doing it outside of the exporter, but then I really need to keep multiple versions of the .blend. Blender also has un-do capability inside of a script. I will be adding a custom property of 'dissolveAngle' for meshes. If not 0, it will: set an undo restore point do a limited dissolve of the mesh export the mesh perform an undo Now no more multiple versions of the .blend, and no more writing down the value you used. You can experiment with the value to use, undoing as you change. Once you have a good value, pop it in the field & save the .blend. This will increase export time, but I got it much faster than before anyway. 5 extra seconds is nothing. .glTF, unity, 3dsMax, & Maya exporters will not even get close in either vertex nor file size terms, once this is inplace (first quarter). Pryme8 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 11, 2018 Share Posted January 11, 2018 Also, I forgot since binary files cannot be zipped, for file size comparisons multiply the size of the .babylon file by 0.25 when comparing to .glTF GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
edzis Posted January 13, 2018 Author Share Posted January 13, 2018 @JCPalmer Thanks for the detailed insights. I will pass to my colleagues who are creating the models. 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.