How to fix bad Collada produced by FBX?

Posted by David on Game Development See other posts from Game Development or by David
Published on 2011-04-13T15:21:00Z Indexed on 2011/11/29 18:04 UTC
Read the original article Hit count: 381

Filed under:

I tried to use the FBX SDK (2011.3.1) to load FBX files and save them as Collada files in order to be able to import FBX files in Panda3D. Unfortunately the resulting Collada files are not usable for several reasons, among them:

  • There's a Maya specific extra technique

diffuse

<diffuse>
    <texture texture="Map__2-image" texcoord="CHANNEL0">
        <extra>
            <technique profile="MAYA">
                <wrapU sid="wrapU0">TRUE</wrapU>
                <wrapV sid="wrapV0">TRUE</wrapV>
                <blend_mode>ADD</blend_mode>
            </technique>
        </extra>
    </texture>
</diffuse>
  • It assigns a texcoord channel name that isn't referenced anywhere else in the file (in the previous code sample, no geometry uses "CHANNEL0"...)

  • Every polygon is exported twice, a first time with a basic material (only diffuse color, specular color, etc.) and a second time with a textured material --> this doubles the number of polygons of each model without any valuable reason

Anyway, the resulting Collada file cannot be opened correctly either with OpenCOLLADA or Panda3D's "dae2egg".

Anyone has any experience on how to "fix" it and make it understandable by common and well-reputed Collada importers such as OpenCOLLADA?

© Game Development or respective owner

Related posts about collada