Page MenuHome

Collada crash after import
Closed, ArchivedPublic

Description

Collada file with Camera animation from Softimage2012.5:
Blender >= 2.60(incl. 2.63RC1) -> Imports fine, but crashes when scrubbing the timeline/trying to save/select anything
Blender <= 2.59 -> Imports fine with keyframes, but all keys are 0, thus no animation (see consoleoutput below)

It is always discussed how Blender can find its way into professional studios. IMHO that would be by making it able to interact with other packages, so that it can be part of a pipeline. After spending many hours of my worktime today trying to get cameradata into Blender (without success...the experimantal fbx-importer didn't work as well)), I can not see how I could recommend Blender to anybody. All the cool features that Blender has are worth nothing in a modern production environment without a solid IO. Cameradata should be the absolute minimum, but it isn't working.

The provided Collada-file is from Softimage, but an export from 3dsMax gives the same results.

Blender-Build: Official blender from 2.58a till 2.63RC1
OS: Win7 64, Fedora 16 x64 (same results)
RAM: 16GB / 4GB
CPU: some fast i7 stuff? / Intel Core 2 Duo @ 2.0 GHz
GFX: nVidia Quadro FX 4000 / some nvidia mobile Geforce

Some Linux console output:
2.6+ gives a segmentation fault
2.5x:
----------
Camera.translate (binding 0): UNKNOWN animation class
Camera.translate (binding 1): UNKNOWN animation class
Camera.translate (binding 2): UNKNOWN animation class
Camera.rotate (binding 0): UNKNOWN animation class
Camera.rotate (binding 0): UNKNOWN animation class
Camera.rotate (binding 0): UNKNOWN animation class
....
....
removed 6 unused curves
------------

If you need more info/examples please contact me.
Thx, and sorry for the rant, but it was really annoying today....

Details

Type
To Do

Event Timeline

Gaia, can you please check this?

I could not get it to crash here, but did see this error in the console which is probably the same thing, and seems to indicate some problem with fcurve memory:

Memoryblock free: pointer not in memlist
Memoryblock FCurve: double free
Memoryblock free: pointer not in memlist
Memoryblock FCurve: double free
Memoryblock free: pointer not in memlist
Memoryblock FCurve: double free
Memoryblock free: pointer not in memlist
Memoryblock FCurve: double free
Memoryblock beztriple: double free
Memoryblock FCurve: double free
Memoryblock beztriple: double free
Memoryblock free: pointer not in memlist
Error: Not freed memory blocks: -5

On Blender 2.63 on Windows i get this on the console:

AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for ROTATE transformation.
AnimationClass 0 is not supported for ROTATE transformation.
AnimationClass 0 is not supported for ROTATE transformation.
removed 6 unused curves

All imported items are displayed as empties and as soon as i try
to select one item, blender crashes. I believe that i have seen very
similar behaviour with various dae files, even with dae files which have
been originally exported by Blender itself.

Blender crashes as soon as i try to select one of the imported items.

Fixed crash in svn, thanks for the report, closing.

Note that our collada import/export is indeed not in a good shape, we try to find a team to maintain this but in the end there doesn't seem to be a developer who is really actively interested in working on this. For google summer of code this year we'll have Collada and FBX importer projects, hopefully they can improve the situation.

I can verify that there is no crash anymore (on windows 7)
But there is also no Camera animation in the imported scene.
Is that expected ?

Nope, there should be animation in it. It's fine that it doesn't crash anymore, but I'm still not able to get my camera-data into Blender.
Shall I open a new ticket for it?
As for the GsoC Collada and FBX stuff, I can provide testfiles if needed.

please can you provide a file that does exactly the following:

in your 3D editor (Softimage2012.5) do:

- Setup just a camera
- Put the camera at location <0,0,0>
- Set rotation angle to <0,0,0>
- Create a keyframe at frame 0
- Move the camera to another location along one axis, e.g. to <10,0,0>
- Create another keyframe at frame 30

now export the camera object to .dae and import it with blender revision 46223 or newer.
Do you now see the expected animation information ?
I made the exact same setup in blender and i could reimport the exported .dae without issues.

if the setup does not work with your export from your other 3D editor, then please provide the .dae.


if the above setup works for you, then go ahead and make the scene more complex until the blender import no longer works for you. Then provide the last .dae where blender imported the animations sucessfully and the .dae where blender fails. And please provide some description about what change caused the failure.

Will do that, as soon as a r46223 build pops up on graphicall. Can't build on windows, and my linux-box is save at home....
Stay tuned, and thanks for the work!

Ok, just checked with r46223:
Export from Blender -> import into Blender: works
Export from Blender -> import into Softimage: works
Export from Softimage -> import into Softimage: works
Export from Softimage -> import into Blender: FAIL!
error is the old one: AnimationClass 0 is not supported for TRANSLATE....and so on (see above)
Strangely I cannot attach another file to this thread, but the one already provided is as simple as it can get and should work perfectly well as a test scene.
Anything else I can do?

The problem is that Softimage writes the animation data in a way that OpenCollada doesn't understand, so probably the fix will need to be made there.

So to get this right:
+ Collada and OpenCollada are not compatible?
+ OpenCollada can only read .dae files that are created with OpenCollada?
+ Blender can not be modified to read (regular) Collada?
+ At this point there is no way to get my camera from SI into Blender? (since fbx isn't working either)

It seems that there are plugins for Maya and Max ( http://opencollada.org/download.html ), but at least in the case of Maya it is not uptodate and Softimage is non existent. So it would be unwise to rely on a third party to get the communication between the packages done. It shouldn't be too hard to get (regular) Collada read by Blender, right?

Please can you provide at least the very same scene as .blend
so that i can see what your camera SHOULD do ? If you can not
attach the blend file here, then maybe paste it to pasteall.org and
publish the link here ?

Then i could try to track down what is actually different in the dae file.

@Brecht: Is it possible to get information about the location
in the dae file where blender finds troubles ? That would help to track
down (future) issues with Collada much easier. I fear that incompatibility
issues will show up frequently. So it would probably help every involved
party to fix upcoming problems of this type.

Here is a .dae from Softimage: http://dl.dropbox.com/u/29093372/SI_Cam_30frames_xyz_translation.dae
Frame x,y,z
1 0 , 0 , 0
10 10 , 0 , 0
20 10 , 10 , 0
30 10 , 10 , 10

Forgot to link to some information for Softimage (XSI) Collada... maybe it's outdated, but I think it hasn't changed the last years:
https://collada.org/mediawiki/index.php/Softimage_XSI_extensions

Gaia: this particular error occurs at AnimationImport.cpp:513, where the error message is printed. binding->animationClass is set to UNKNOWN_CLASS, meaning OpenCollada couldn't understand it.

Thomas: OpenCollada is a library we use for reading Collada files, it's not a separate file format or standard. It should read regular Collada files, so this may either be a bug in that library, or a bug in Softimage writing non-standard Collada files. I'm just noting down here for other developers where to look for the issue, in this case making the file load would require a change in OpenCollada, not Blender itself.

The collada-output generated by softimage seems to violate the Collada 1.4.1 specifications:

According to the collada specifications from http://www.khronos.org/files/collada_spec_1_4.pdf (see page 3-7) :

The common <param> (core) name attribute for animation translations may contain a <param> with name="X|Y|Z" wich specify the 3 cartesian coordinates.

Blender uses name="X|Y|Z" according to the specifications:

<animation>
<source>
<technique_common>
<accessor>
<param name="X|Y|Z" />
</accessor>
</technique_common>
</source>
</animation>

Softimage uses name="VALUE" for all 3 coordinates:

<animation>
<source>
<technique_common>
<accessor>
<param name="VALUE" />
</accessor>
</technique_common>
</source>
</animation>

thus the most important information (which coordinate shall we use) has been corrupted.

However i believe that softimage has added a lot of <extra> information enclosed in <technique profile="XSI"> and it looks very much like the true animation data is provided in this extra datablock. I guess that Blender does not support the XSI profile ?

====

Proof :

1.) I have modified the softimage dae file by replacing the 3 occurances of name="VALUE" by name="X", name="Y" and name="Z" respectively. this imports into blener and the animation is intact.

2.) I have tried to import the original collada file from softimage into meshlab. That failed.

3.) have tried to iport the original collada file from Blender into meshlab. That worked.

@brecht: Do you think we can change the error message such that it tells something like this:

Invalid declariation <param name="VALUE">
Expected a value of "X", "Y", or "Z" in this context.

or like this:

Invalid declariation in line 178:25: <param name="VALUE" type="float"></param>
value "VALUE" not compliant to the Collada specifications

This is actually good information! At least I know how to modify that file to get it into Blender.
The 3dsMax collada looks even different: http://dl.dropbox.com/u/29093372/max_collada.DAE

I don't think it will be possible to convince Autodesk, to change their exporter in a short term (I will report it though).
What could work on the Blender side, is to check the authoring-tool inside the collada-file and eventuall change "Value" to X,Y, or Z depending on the source-ID section it is in. I can fully understand if this is too much of a feature-request, since there isn't anything wrong inside Blender.
The only way to get professionals to work with Blender, is to make it possible to get their stuff from other applications into Blender....unfortunately the other applications are mostly Autodesk :/
Anyway, thanks for the work!
How can I get in touch with the FBX-team?

cheers,
Thomas

Back again with some new information. There was a small discussion on the Softimage mailinglist ( https://groups.google.com/forum/?fromgroups#!topic/xsi_list/00AinthD5gk ), and it seems that the problem could be solved on Blenders side.
The important part:
-- snip
If Blender only supports name="X|Y|Z", then it might be their(or OpenCollada's) limitation.
For <sampler> elements in COLLADA, you can see from the specs page 136, the param name should not matter.
The X and Y values should be processed from the INPUT and OUTPUT semantics rather than whatever the name attribute is.
-- snap
The pdf he is referring to is this: http://www.khronos.org/files/collada_spec_1_4.pdf

cheers,
Thomas

That doesn't really explain why the softimage.dae fails equally well in meshlab.

Thomas,

I'm the guy working on improving fbx support this summer. So far there's nothing you could try since I'm currently dabbling with some prerequisite work, but soon there'll be testable builds available on Graphicall.

To stay updated, please check by:
http://blenderartists.org/forum/showthread.php?249973-GSoC-Blender-FBX-Importer&s=1c7ce3c12394dda68116c82397be75c2&p=2142052#post2142052

Any testing will be very helpful :-)

Hi Dan,

Without wanting to come off sounding like an ass with my first post, is it a given that Meshlab's Collada support is faultless?

Like I said, I'm not trying to stir, I'm just asking out of genuine curiousity....

Dan.

Hi again.

To my somewhat untrained eye; having skimmed through the section of the specs that he mentions, I'd say that Min Rui makes a pretty convincing case...

For clarity, I'm referring to this post on the Softimage mailing list:

https://groups.google.com/forum/#!msg/xsi_list/00AinthD5gk/0E5iSR7adiYJ

Any devs able to make a comment on this?

Collada Import bugs will be investigated for Blender 2.65

For this reason this Report has been set as \'Closed/Todo\' and linked from our wiki page.

http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Import_Export#OpenCollada

This tracker item can still be updated with useful info and closed (removed from the page above) when fixed.

Gaia Clary (gaiaclary) closed this task as Archived.Sep 12 2012, 4:22 PM

Hi there. I'd still like to hear the opinion of any devs on this point! (Two posts up...)

So one year later I'm still not able to get my camera data into Blender.
AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for TRANSLATE.
AnimationClass 0 is not supported for ROTATE transformation.
AnimationClass 0 is not supported for ROTATE transformation.
AnimationClass 0 is not supported for ROTATE transformation.
AnimationClass 0 is not supported for SCALE.
AnimationClass 0 is not supported for SCALE.
AnimationClass 0 is not supported for SCALE.
....