{"id":1456,"date":"2024-01-17T17:09:06","date_gmt":"2024-01-17T17:09:06","guid":{"rendered":"https:\/\/www.katsbits.com\/site\/?p=1456"},"modified":"2024-01-17T17:09:06","modified_gmt":"2024-01-17T17:09:06","slug":"export-o3d-convert-collada-files-advanced","status":"publish","type":"post","link":"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/","title":{"rendered":"Collada DAE To Open 3D O3D &#8211; Trouble Shooting"},"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-advanced\/#Unable_to_Import\" >Unable to Import<\/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-advanced\/#Check_your_file_paths\" >Check your file paths<\/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-advanced\/#Upper_lower-case_file_paths\" >Upper &amp; lower-case file paths<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/#Change_BAT_file_location\" >Change BAT file location<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/#Using_fx_shader_files\" >Using *.fx shader files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/#3DS_Max_specific_issues_with_O3D_files\" >3DS Max specific issues with O3D files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>As seen in the <a href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/\" title=\"Exporting Google &gt;8o3d files from Blender\" target=\"_self\" rel=\"noopener\">previous section of the O3D tutorial<\/a>, the process of converting Collada files into the Open 3D format is usually straight forward. There are however a few caveats that tend to be effected by the 3D application being used. They all however tend to follow or need the same set-up and or prepping process in order for the conversion to work properly.<\/p>\n<blockquote><p><b>Important<\/b>: Using Googles dae2o3d converter requires the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/directx\/default.aspx\" title=\"Download the DirectX SDK\" target=\"_blank\" rel=\"nofollow noopener\">DirectX SDK<\/a> be installed, which can be <a href=\"http:\/\/msdn.microsoft.com\/en-us\/directx\/aa937788.aspx\" title=\"Download the DirectX SDK\" target=\"_blank\" rel=\"nofollow noopener\">downloaded  from Microsoft here<\/a>.<\/p><\/blockquote>\n<p><a name=\"import\" id=\"import\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Unable_to_Import\"><\/span>Unable to Import<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The most common error when working with the O3D conversion process is &quot;failed to import&quot;, which is normally associated with the converter not being able to find what it&#8217;s looking for &#8211; very rarely is that error due to the mesh or model being &#8216;broken&#8217; or &#8216;corrupted&#8217; in some way (which would also usually prevent it being viewed in any 3D application).<\/p>\n<p><a name=\"checkpaths\" id=\"checkpaths\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Check_your_file_paths\"><\/span>Check your file paths<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Make sure all the assets to be used are in &#8216;sensible&#8217; locations &#8211; if you&#8217;re able to, store all the assets in the same folder. Additionally, make sure that the assets are using <b>&#8216;relative&#8217;<\/b> and not <b>&#8216;absolute&#8217;<\/b> paths. That means if you had a car in the following location;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:\\Models\\O3Dcarrace\\<b>car1<\/b>\\<\/p><\/blockquote>\n<p>And the textures in another;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:\\Models\\O3Dcarrace\\<b>cartextures<\/b>\\<\/p><\/blockquote>\n<p>Instead of doing the following when you load a texture assets into a material slot in your 3D app;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:\\Models\\O3Dcarrace\\<b>cartextures\\yellowpaintjob.tga<\/b><\/p><\/blockquote>\n<p>They have to be referenced in such a way that when exported to DAE files, the process sees the path associated with the texture as something similar to the following;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> ..\\<b>cartextures\\yellowpaintjob.tga<\/b><\/p><\/blockquote>\n<p>This is because the files are being looked at &#8216;<b>relative<\/b>&#8216; to the folder the assets are sitting in (as if they were being looked at from the point of view of the folder itself), as opposed to the &#8216;<b>absolute<\/b>&#8216; path based on the hard-drive (as if the asset was looking at itself from outside the folder, looking in). This is essential to make sure game engines don&#8217;t misinterpret asset locations when deployed by looking along, or for, a path that doesn&#8217;t physically exist.<\/p>\n<p>          <a name=\"uppercase\" id=\"uppercase\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Upper_lower-case_file_paths\"><\/span>Upper &amp; lower-case file paths<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Check your file paths. Make sure paths match in both the DAE file (it can be opened and edited in Notepad, Crimson Editor or similar) and your computers file system. This;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:\\<b>M<\/b>odels\\<b>O3D<\/b>carrace\\<b>CAR<\/b>1\\<\/p><\/blockquote>\n<p>Is not the same as this;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> <b>f<\/b>:\\<b>m<\/b>odels\\<b>o3d<\/b>carrace\\<b>car<\/b>1\\<\/p><\/blockquote>\n<p>Also check to make sure your forward or backward slashes are being addressed the same way. Again, this;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:<b>\\<\/b>Models<b>\\<\/b>O3Dcarrace<b>\\<\/b>CAR1<b>\\<\/b><\/p><\/blockquote>\n<p>Is not the same as this;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p> F:\/Models\/O3Dcarrace\/CAR1\/<\/p><\/blockquote>\n<p>The former generally refers to the actual file path of the asset in question, the latter is usually just a &#8216;reference&#8217; or &#8216;tag&#8217; used to pull that particular shader, material or assets onto a model when run in game.<\/p>\n<p>It&#8217;s also good practice to make sure that any file paths used only contain lower-case characters, as is generally the rule for game development and content creation.<\/p>\n<p>          <a name=\"location\" id=\"location\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Change_BAT_file_location\"><\/span>Change BAT file location<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If changing or checking the files paths still yields no results, try moving the *.bat file used to initialise the conversion process to the same folder as  o3dConverter.exe, this may mean changing the command line instructions slightly to compensate for the move. For example if the bat file originally read as follows;<\/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>\n          <\/p><\/blockquote>\n<p>It may need changing to the following upon being placed in the same folder as the converter exe;<\/p>\n<blockquote style=\"background-color: #E7FAEA; color: #000;\"><p><b>o3dConverter.exe <\/b> &#8211;base-path=<b>F:\\Models\\o3d<\/b> <b>F:\\Models\\o3d\\testmodel.dae<\/b><\/p><\/blockquote>\n<p>          <a name=\"fxshader\" id=\"fxshaders\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Using_fx_shader_files\"><\/span>Using *.fx shader files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>FX or *.fx files are in effect special DirectX (Direct3D) material shaders that make direct use of a graphics card processing unit. As such, their usability is subject to the hardware&#8217;s ability to process the shader instructions present in the *.fax file. With regards to Open 3D production, the same caveat as present as it is with any and all  3D production, namely  making sure the hardware being used supports what you&#8217;re trying to do.<\/p>\n<p>With that said, when trouble-shooting *.o3d models that have *.fx shaders applied to them as part of a material the first thing to try is to remove the references and in effect export a &#8216;flat&#8217; mesh. If that open into your O3D project then you know something is wrong with set up somewhere between the FX shaders and most likely the Collada file. It should then be a simple (but long-winded if there are a lot of FX files in use) process of elimination to find out where the problem is, loading and exporting one FX shader at a time.<\/p>\n<p>          <a name=\"maxo3d\" id=\"maxo3d\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3DS_Max_specific_issues_with_O3D_files\"><\/span>3DS Max specific issues with O3D files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Aside from the issues mentioned above, there are a couple of additional caveats specific to using 3DS Max as a production tool for making Open 3D content.<\/p>\n<p>Open 3D supports &#8216;standard&#8217; 3DS Max material slots, i.e. &quot;Diffuse&quot;, &quot;Specular&quot;, &quot;normal map&quot; and so on, just be sure to check you don&#8217;t export unnecessary slots &#8211; which may cause issues. If unsure about which slots can be used export the standard &#8216;diffuse&#8217; slot to Collada and keep adding slots to see which work and which don&#8217;t within the context of your project. <\/p>\n<p>The Collada exporter for Max also supports &#8216;Tangent&#8217; and &#8216;<a href=\"http:\/\/tech-artists.org\/wiki\/Binormal\" title=\"What is a 'Binormal'?\" target=\"_blank\" rel=\"noopener\">Binormal<\/a>&#8216; exported material settings, just be sure to have &#8216;checked&#8217; the appropriate export option in the Collada dialogue when exporting the objects. <\/p>\n<p>Make sure to <em>download and use the Collada exporter appropriate to the version of Max being used<\/em>. In addition to this, there may also be issues present when exporting to or using the &quot;Autodesk DAE&quot; export option instead of &quot;Collada DAE&quot; &#8211; as would be the case if you had more than one export script installed; there is a difference between the two that may be the source of some issues.<\/p>\n<p>          <a name=\"conclusion\" id=\"conclusion\"><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p> What you should end up with after processing a collection of assets is a special *.TGZ archive file, it&#8217;s special only in that its named &quot;<b>o3dtgz<\/b>&quot;, but for all intents and purpose its simply just an &#8216;archive&#8217; container (a &#8216;zip&#8217; or &#8216;tga&#8217;). This means that what&#8217;s being converted by the process are the raw assets, the *.dae model, *.dds or *.tga texture images, and any other material or shader settings files; you <b>do not<\/b> need to pack any assets up before hand into any form of archive as the converter itself does that.<\/p>\n<div class=\"subNav\">[<a href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files\/\" title=\"Converting Collada to O3D files\" target=\"_self\" rel=\"noopener\">1: converting to O3D<\/a> | <a href=\"https:\/\/www.katsbits.com\/site\/export-o3d-convert-collada-files-advanced\/\" title=\"Trouble shooting OD3 conversion\" 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,312,230,386,390,387,211,271,314,389,391,29],"class_list":["post-1456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-o3d","tag-o3dtgz","tag-3ds-max","tag-blender-2-4x","tag-collada","tag-convert","tag-dae","tag-dds","tag-export","tag-import","tag-open3d","tag-tgz","tag-tutorials"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1456","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=1456"}],"version-history":[{"count":2,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1456\/revisions"}],"predecessor-version":[{"id":1458,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/posts\/1456\/revisions\/1458"}],"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=1456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/categories?post=1456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.katsbits.com\/site\/wp-json\/wp\/v2\/tags?post=1456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}