COLLADA importer

I’ve seen the issue before that parts of the scene were not exported. Can you give me a (preferably small) .dae file that doesn’t work? Then I can look into fixing it.

I’m pm you that immediately

Please email instead. My PM box is full, as usual.

My e-mail address is available through the forum software.

Hmm, I looked at the files, and it’s a very weird problem.

Your materials have the transparency set to 1. Meaning, the converter makes it not visible. However, I have other models lying around with a transparency of 0, that are supposed to be visible too. Now I’m confused. :confused:

To work around, find this part in the resulting .egg file:

    <Scalar> blend { add }
    <Scalar> blendop-a { one_minus_constant_color }
    <Scalar> blendop-b { constant_color }
    <Scalar> blendr { 1 }
    <Scalar> blendg { 1 }
    <Scalar> blendb { 1 }
    <Scalar> blenda { 1 }

Entirely remove that part.

Hmm.

This hack work, true.
I’ve try to change/destroy all the transparent/transparency attribute I could on the dae but with no change on the resulting egg

I hope you can find a solution !

We had trouble with these files ( created by the collada plugins for maya) before :
we can’t referenced the node in these files from scene in another file, like we suppose to do ( and like we do with other collada files)
So the problem may be with the exporters plugin, I don’t know

good luck !

Actually, the problem was that google tools export stuff with inverted transparency in some modes. I’ve mainly tested transparency with sketchup models, so I ended up writing it inverting the transparency.
Your model did it the correct way. I’ve corrected it on CVS, this does break sketchup + googleearth models, but well, that’s google’s fault.

I didn’t fix the skeletal animations problem yet, I’ll probably have time for that after I get 1.6 out the door.

Hi !
with the 1.6.1 I’m retrying to use dae2egg in our pipeline.
I have problem with some meshes that we have created ourself.
dae2egg forgot a lot of triangle and place other incoherently.

but this mesh pass the collada coherency check ( and import in maya correctly using the collada importer)

the dae2egg doesn’t display any error. Any idea ?

Can you email me the .dae file? Also maybe a screenshot how it’s supposed to look?

Thanks for the model. It appears there was a bug with handling multiple types of primitives (triangles, tristrips) in the same mesh object.
Will be fixed in 1.6.2. If you want me to export your models for now, let me know.

Thanks for reporting the bug!

Hey… I haven’t seen anything more recent than this mentioning Collada in the forums. I’m wondering whether there has been any work on a non-FCollada importer, since FCollada seems to have been changed to closed-source since 3.05. (according to Feeling Software’s site it costs money now)

ThomasEgi mentioned in IRC that you might be working on a non-FCollada importer. Has there been any progress on this? If not, I was thinking that OpenCOLLADA might be a good basis for such a converter.

Yeah, we’ve been developing a whole new loader that is TinyXML-based on the 2.0 branch on CVS. The basic functionality is there already, although it is still far from being finished.

In the meantime, if you want a copy of the MIT-licensed 3.05B source code of FCollada, just send me an e-mail.

I actually just found a copy in an SVN repo somewhere online, and I put together a waf build system for it. (I had also found a zipped version with a Scons build system, but it failed to build and I couldn’t fix it) I’m having some issues getting makepanda to recognize it, though.

I have installed it to /usr/local, so the installed files are:
/usr/local/include/FCollada.h
/usr/local/include/FColladaPlugin.h
/usr/local/lib/libFColladaSD.so

However, when I run makepanda with --use-fcollada and --verbose, I get the following output:

$ python makepanda/makepanda.py --everything --no-ffmpeg --use-fcollada --verbose
Generating library cache...
Couldn't find library libAR
Couldn't find header file AR/ar.h
WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package fcollada, excluding from build
Couldn't find library libfftw
Couldn't find library librfftw
Couldn't find header file fftw.h
Couldn't find header file rfftw.h
WARNING: Could not locate thirdparty package fftw, excluding from build
Couldn't find library libOSMesa
WARNING: Could not locate thirdparty package osmesa, excluding from build
<snip>

Any ideas what could be wrong, or how to get more information on what’s failing?

I started adding prints all over the makepanda source to try and figure out where it was failing, and it seems to be failing on the ‘FCollada’ include. (not ‘FCollada.h’; that exists and is detected correctly)

Where should the ‘FCollada’ file come from?

I fixed it by installing FCollada.h and FColladaPlugin.h to both $PREFIX/include and $PREFIX/include/FCollada; now, makepanda seems to pick it up perfectly. I’ve uploaded a copy of my FCollada 3.05 source tree with the new wscript build system and a minor fix for building on x86_64 under Linux; it can be found at http://development.g33xnexus.com/fcollada-3.05.tar.bz2. It should also still be mostly usable to build under MSVC, since I left the project files in.

Ok, my FCollada doesn’t seem to actually be working. I’m going to email you about your copy of the FCollada source.

Ok, now that I’ve gotten the Collada import working, I have another question: How do I put tags in a .dae file so that they’ll import into Panda correctly? I need to be able to create colliders and entities correctly, and I haven’t found any information on how to store tags in a Collada file.

Also, if anyone knows how to populate that data from Blender 2.5, that would also be helpful to know… that’s becoming our model/level toolchain.

Hm, I could add that functionality. How does Blender 2.5 export properties in COLLADA? Using an tag?

As far as I can tell, it doesn’t export properties at all, which is pretty annoying… I’ve tried adding properties to everything I could think of, and nothing seems to ever make it into the Collada file. If looks like a good way to do it, though, I can always add those by hand until Blender’s exporter is changed to work.

rdb: If you could implement tag importing using the tag, that would at least give me a way to hand-edit Collada files to be useful as levels. From everything I’ve been able to determine, it looks like Blender doesn’t actually have any sort of mechanism for exporting properties to Collada.

If you get a chance, could you implement tag importing?

Thanks!

OK, I’ll get to it soon. My development environment doesn’t build with the FCollada-based exporter because of my work on the native loader, so it’s a bit inconvenient but I’ll get to it soon.