{"id":1467,"date":"2024-01-17T17:21:30","date_gmt":"2024-01-17T17:21:30","guid":{"rendered":"https:\/\/www.katsbits.com\/site\/?p=1467"},"modified":"2024-01-17T17:21:30","modified_gmt":"2024-01-17T17:21:30","slug":"export-o3d-convert-collada-files","status":"publish","type":"post","link":"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/","title":{"rendered":"Convert DAE To O3D using O3Dconverter"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/#Export_from_Blender_to_Collada_dae\" >Export from Blender to Collada *.dae<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/#Converting_Blender_3D_models_into_O3D\" >Converting Blender 3D models into *.O3D<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><a id=\"introduction\" name=\"introduction\"><\/a><\/p>\n<p>Googles &#8216;Open 3D&#8217;, *.o3d, isn&#8217;t a file format in of itself in the same way that say, an *.ase or *.tga file is; whilst those two are actual media files, *.o3d is more akin to *.zip files in that it&#8217;s essentially a &#8216;container&#8217; within which other assets are held. This means that it&#8217;s generally not possible to simply export files to Open3Ds *.o3d format from 3D applications like Blender without using some sort of third party converter.<\/p>\n<p>It&#8217;s also unfortunately not possible to simply create a ZIP file and then rename it (as can be done with other formats (renaming ZIP to PK3 for instance), because O3D is a <b><i>binary format<\/i><\/b> it has to be &#8216;compiled&#8217; or the result of a &#8216;conversion&#8217; won&#8217;t work correctly in Open 3D applications. The following tutorial will discuss the process of doing just that, converting a Blender 3D modeled asset into an O3D file &#8211; or more correctly an <b>*.o3dtgz<\/b> file.<\/p>\n<blockquote><p><b>Important<\/b>: Using Googles dae2o3d converter requires the <a title=\"Download the DirectX SDK\" href=\"http:\/\/msdn.microsoft.com\/en-us\/directx\/default.aspx\" target=\"_blank\" rel=\"nofollow noopener\">DirectX SDK<\/a> be installed, which can be <a title=\"Download the DirectX SDK\" href=\"http:\/\/msdn.microsoft.com\/en-us\/directx\/aa937788.aspx\" target=\"_blank\" rel=\"nofollow noopener\">downloaded from Microsoft here<\/a>.<\/p><\/blockquote>\n<p><a id=\"exporting-to-collada\" name=\"exporting-to-collada\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Export_from_Blender_to_Collada_dae\"><\/span>Export from Blender to Collada *.dae<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The process of exporting models from Blender 3D for the purpose of using them within Open 3D projects requires them to be exported out to Collada&#8217;s DAE format. Below is an example of a mesh that contains a mesh object that&#8217;s has materials assigned, is UVW mapped and textured, along with two light entities.<\/p>\n<div class=\"content_images\">\n<p><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-o3d-export-models-objects.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-o3d-export-models-objects_sml.jpg\" alt=\"Mesh object in Blender ready for export to Collada dae\" width=\"640\" height=\"400\" border=\"0\" \/><\/a><br \/>\nMesh object in Blender ready for export to Collada dae\n<\/div>\n<p>Assuming the model has been propped and is ready to go, simply select it and\/or the assets that need to be exported (making sure that at least one of them is selected as the &#8216;parent&#8217; object &#8211; outlined a lighter pink by default), then from the &#8220;<b>File<\/b>&#8221; menu, select &#8220;<b>File &gt;&gt; Export &gt;&gt; Collada 1.4<\/b>&#8221; as shown below. make sure to select version 1.4.<\/p>\n<div class=\"content_images\">\n<p><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-file-export-dae.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-file-export-dae_sml.jpg\" alt=\"Exporting to Collada *.dae from Blender 3D\" width=\"640\" height=\"400\" border=\"0\" \/><\/a><\/p>\n<p>Exporting to Collada *.dae from Blender 3D<\/p>\n<\/div>\n<p>This will open the Collada export interface. In here, if exporting <i>a selection of objects<\/i> from a scene instead of a complete scene and all object it contains, as is the example above, then be sure to click &#8220;<b>Only Export Selected<\/b>&#8220;. Browse and\/or edit the &#8220;<b>Export File<\/b>&#8221; text field so it shows the &#8216;save name&#8217; (the name the file will be called on saving) and location to where the resulting dae file will be saved and then click &#8220;<b>Export and Close<\/b>&#8220;. A message will pop up letting you know export was completed and a Collada *.dae file has been saved to the location chosen (as shown below). That&#8217;s it for this part of the process. Next the exported Collada *.dae file needs to be converted to O3D.<\/p>\n<div class=\"content_images\">\n<p><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-export-options.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/collada-export-options_sml.jpg\" alt=\"Blender 3D to Collada export options\" width=\"640\" height=\"400\" border=\"0\" \/><\/a><\/p>\n<p>Blender 3D to Collada export options<\/p>\n<\/div>\n<p><a id=\"converting-to-o3d\" name=\"converting-to-o3d\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Converting_Blender_3D_models_into_O3D\"><\/span>Converting Blender 3D models into *.O3D<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Converting 3D assets into *.O3D requires the use of a converter, as Googles is the proprietor of Open 3D they have provided <a title=\"Googles o3dconverter\" href=\"http:\/\/code.google.com\/apis\/o3d\/docs\/artdesignerguide.html\" target=\"_blank\" rel=\"nofollow noopener\">a &#8216;sample&#8217; O3D converter <\/a> for the purposes of allowing third party compiling of the necessary files into O3D. Download and install it.<\/p>\n<p>The easy way to do this conversion process is to use something called a &#8220;bat&#8221; or &#8220;batch&#8221; file, this is simply a text file with a couple of lines of &#8216;code&#8217; that can be executed from where ever the batch file is located, and providing the file paths and syntax are correct, it&#8217;ll run the compiler and automatically save the required *.o3dtgz file.<\/p>\n<p>Copy\/paste the following text into NotePad or similar <i>text only<\/i> editor;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p><b>D:\\GAMES\\o3D_converter\\o3dConverter.exe <\/b> &#8211;base-path=<b>F:\\Models\\o3d<\/b> <b>F:\\Models\\o3d\\testmodel.dae<\/b><\/p><\/blockquote>\n<p>Edit the file paths (to match the asset and converter paths on your system) and save it as a &#8220;<b>*.bat<\/b>&#8221; file; &#8220;<b>od3convert.bat<\/b>&#8221; for example. Once the bat file is created, make sure all the assets used by the mesh are in their correct locations and double click to execute bat file; depending on the size and\/or complexity of the model a command prompt screen similar to the image shown below pop up for a few seconds or minutes.<\/p>\n<p>As soon as it disappears the conversion process will be done resulting in a file with the extension &#8220;<b>*.o3dtgz<\/b>&#8221; added to the end of it. Once you&#8217;ve got that, that&#8217;s it, you&#8217;re done converting a Collada *.dae file into an Open 3D *.o3d package ready for use in a web based 3D application.<\/p>\n<div class=\"content_images\">\n<p><a href=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/o3dconverter-collada-dae-o3d.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.katsbits.com\/images\/tutorials\/blender-export-convert-o3d\/o3dconverter-collada-dae-o3d_sml.jpg\" alt=\"CMD\/DOS promtp showing the results of the Collada to o3d conversion process\" width=\"640\" height=\"400\" border=\"0\" \/><\/a><\/p>\n<p>CMD\/DOS prompt showing the results of the Collada to o3d conversion process<\/p>\n<\/div>\n<p><a id=\"conclusion\" name=\"conclusion\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The process of converting itself is <i>usually<\/i> straightforward, however, there are generally a number of preparatory steps that need to be taken to make sure the process goes as smoothly as possible. It should always be kept in mind that because Open 3D is ostensibly web based interactive media, content should ideally be optimised in that context, i.e., models should have low polygon count, smaller texture sizes should be used along side the appropriate compressed texture formats; errors that crop up during the conversion process are more than likely going to be as a result of something to do with the prepping process.<\/p>\n<div class=\"subNav\">[<a title=\"Converting Collada to O3D files\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/\" target=\"_self\" rel=\"noopener\">1: converting to O3D<\/a> | <a title=\"Trouble shooting OD3 conversion\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/\" target=\"_self\" rel=\"noopener\">2: trouble shooting<\/a>]<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1459,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[388,392,197,230,386,387,271,389,315,29],"class_list":["post-1467","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-o3d","tag-o3dtgz","tag-ase","tag-blender-2-4x","tag-collada","tag-dae","tag-export","tag-open3d","tag-text-editor","tag-tutorials"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/comments?post=1467"}],"version-history":[{"count":2,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1467\/revisions"}],"predecessor-version":[{"id":1469,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1467\/revisions\/1469"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media\/1459"}],"wp:attachment":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/media?parent=1467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/categories?post=1467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/tags?post=1467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}