[RELEASED] COLLADA Exporter v1.1 now available

With this Unity extension to the editor’s ‘file’ menu, you can take your work from Unity to any COLLADA (.dae format) importing application, such as Apple’s Preview or iBook, Photoshop, Autodesk Max or Maya, Google Earth, SketchUp, (even back into Unity!) as well as most digital content creation tools, including your own COLLADA importing applications.

This extension to the Unity file menu allows you to export COLLADA (.dae) files from Unity. It is very easy to set up and use. Thorough documentation is included in this $15 package you can find at Collada (.dae) Exporter for Unity 4, not 5 | Utilities Tools | Unity Asset Store

Changes in v1.1:
Added Terrain export, including trees.
Cleaned up texture PNG export options.
Added ‘convert names to XML’ option.

  • minor fixes/typos

Already supports animation, skinning, export of individual models or entire scenes.
Questions? Send email to rita@fl4re.com for more info

It seems that the package content is empty in Asset Store. Or am I missing something?

Just what I needed!

Is the source avaliable or is it a DLL?

It is a DLL.

The package has been updated and is available again on the Asset Store.

Any chance for a open source version? I could really use this, but I myself won’t buy binary packages, I’ve been burned by them before.

Regarding the low price of this plugin and the big interest I have in it, I’ve bought it to test its features.

My main interest is to import existing animated characters that work with Unity into Blender 3D to slightly modify their mesh and to add or modify some animations.

Like most models used with Unity are provided on FBX format, I’ve previously tried to import them into Blender 3D using the AutoDesk FBX to collada exporter, but without success (errors when importing animations from *.dae into Blender 3D).

On a side note, the actual default Blender 3D Collada importer works very well with animated characters from Mixamo (no more need on third party importer).

So, I’ve tested your Collada exporter for Unity with the main character of the AngryBot demo and the walking mine enemy. The integration into the editor is very well and the selection works both on Project and Hierarchy window (good point). I’ve exported my selection to a Collada file and imported it into the latest version of Blender 3D (2.63a with default Collada importer).

The result let me puzzled. With my first try, the mesh was correct, but the animation seems to have scale problems and coordinate problems.

After trying to change animation export settings with your tool, I’ve got several error messages like “index out of range” and “NullReferenceException”

NullReferenceException
COLLADA_Export.AddObjectToDAE (UnityEngine.Transform t, System.Collections.Generic.List`1 ln, System.Collections.Generic.List`1 lp, System.Collections.Generic.List`1 lg, System.Collections.Generic.List`1 lm, System.Collections.Generic.List`1 le, System.Collections.Generic.List`1 li, System.Collections.Generic.List`1 lc, System.Collections.Generic.List`1 ll, System.Collections.Generic.List`1 la, System.Collections.Generic.List`1 lcc, CreateTransforms createTransforms)
COLLADA_Export.AddObjectToDAE (UnityEngine.Transform t, System.Collections.Generic.List`1 ln, System.Collections.Generic.List`1 lp, System.Collections.Generic.List`1 lg, System.Collections.Generic.List`1 lm, System.Collections.Generic.List`1 le, System.Collections.Generic.List`1 li, System.Collections.Generic.List`1 lc, System.Collections.Generic.List`1 ll, System.Collections.Generic.List`1 la, System.Collections.Generic.List`1 lcc)
COLLADA_Export.Export ()
COLLADA_Export.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)

Your tool seems very promising and I’m highly interested by it. Feel free to contact me (patmail # aftermoon.net) for more detail about crashs and export settings.

I’ve attached some collada files produced with your tool from animated models of the AngryBots demo. If some experienced users of Blender 3D or other 3D tools want to try them, I would be happy to have more advice.

1028178–38152–$AngryBots_export_dae.zip (3.79 MB)

I apologize for the delay. It seems the forum did not send me your comment even tho I am subscribed to this thread. Frustrating! Please email us at contact@fl4re.com to discuss licensing source.

Thanks for the feedback.

I use preview on a Mac (simply double-click on the .dae, push ‘play’ to check the animations). This is the best free COLLADA importer/viewer I have yet seen. It is also very strict, so a COLLADA file that is not correct will be rejected with a simple error message saying preview does not recognize the file.

On the PC I do not know of a good viewer, but the same verification code included in preview is available there - COLLADA Refinery - Browse /COLLADA Coherency Test/Collada Coherency Test 1.3 at SourceForge.net . Source code is available as well as pre-compiled for windows, linux and mac. I understand there is also a validator that is part of the openCOLLADA distribution, I have not used it yet myself.

With those tools you can first check the validity of a COLLADA document, this helps to first check the document when having a import problem. Hopefully there is no such problems with the Unity COLLADA exporter. I will of course fix any such problem ASAP.

All your attached files open fine in preview, with the animations, except for mech_bot.dae that had some vertices projected at infinity.
One thing I had to do though, is to replace the PNG textures with PNG24, removing the transparency so I can see the diffuse color correctly. This is one of the options of the exporter.

I noticed that the matrix on the top of the scene id a 0.01 scaled 90 degree rotation over X. Removing this matrix (deleting the first line after the <visual_scene> in the file with a text editor) solves the problem for preview.

I am puzzled how you got a scale in there, as I located and exported all 3 instanced of mech_bot from the angrybot demo and did not have a scale exported.

Another way to look at the exported models is to try to import them back into Unity, grab and drop a COLLADA model in the ‘project’ window trigger FBX to import the COLLADA document. FBX does a decent job at importing COLLADA at least since 3.5. The models import well but the animations don’t import correctly. I am not sure what the issue is since it works fine in Mac preview but I should investigate.

I am not sure if any of this will help you in regards to Blender, but it seems that Blender importer is having problem with importing animations. Best is to provide the Blender community with an exported model that works fine in preview and ask them to look into the issue. I’ll contact you by email to see how I can help with that.

Now, you definitely found a bug in the exporter - the ‘index out of range’ crash is abnormal. It would be great if you could reproduce the issue and let me know what options you had selected. Maybe you can take a screen shot of the COLLADA export option panel before pushing ‘export’ ?

Question:
I import my models into unity place/scale/rotate them around and compose the level, now i want to export the whole scene with the correctly placed models to other programs for tweaking of geometry/lightmapping etc.
Is this process possible with your tool?

Thank you!

Yes, that is one use model for the tool :slight_smile:

[RELEASED] COLLADA Exporter v1.1.1 now available!
Changes in v1.1.1:
Added 'Animation Clips option’
Added ‘fix names to valid’

  • minor fixes/typos

BTW, this was tested with Blender and works okay but the Blender importer does not seem to keep multiple clips information.
s

Thank you!
Purchased!
Working perfectly >> Thanks!

So can i use this extension to export the entire scene created in unity to third party application to create lightmaps and get it back !

Yes, that is the idea! Please let me know if something doesn’t work as expected. Thanks.

When exporting a full scene I get many black png textures, any idea what causes this?

I am guessing that you are running into a Unity bug that has been reported many times already. Google for ‘16 bit format doesn’t work with getpixels’. Could you see if the black images are 16 bits?

An easy way to deal with this is for you to take the original image and use another software to convert it to 16 bits png, or any other format you want to take advantage off.

Workflow would be to first export the scene with the option to save all the images, manually fix the images that conversion did not work, and for subsequent exports, to make sure you select ‘do not export images’ (and keep a copy of the blessed images).

In future version of the exporter I will detect this, emmit a warning and not save the png file at all. That is until Unity fixes the bug.

Some of them were PSD 16 bit indeed, but others were 8 bit PSD and also some were already PNG and then exported again to 24 bit PNG gives black.

Thanks for looking into this issue

No problem. Please send me one or two of these problematic images (contact @ fl4re dot com) and we’ll take a look at them.