COLLADA importer doesn't work

(motorsep) #1

Ok. I exported rigged and animated mesh from MAX to COLLADA 1.4
When I import it to Blender, I get whole bunch of errors and nothing is being imported. Why?
When are we going to have ability to bring animated meshes to Blender? :frowning:
Thanks.

0 Likes

(Hoehrer) #2

Same here, i think i get different errors though.

The script complains about a missing path, and i should update the .py file. When i do that it goes further but fails at the “import colladaImEx.cstartup” line i think.

Blender 2.43 WinXP

Werner

0 Likes

(EP1) #3

hi
I remember collada having a free parser that allows files to be “fixed” it works for the collada file exported by sketchup (in the kmz file). that was the only time i managed to import a functional collada file into blender. Check the refinery tool download at sourceforge.
E

0 Likes

(Hoehrer) #4

Nice tip, but that’s no help if the importer script in blender doesn’t even try to import the collada file :frowning:

Werner

0 Likes

(EP1) #5

I think the development of the import/export script is in hiatus so maybe someone should pick it up. Maybe I have to learn to program instead of passing the buck. anyway we all have our talents.

0 Likes

(bigkahuna) #6

The “Collada Blender” project has been dead since the latter part of last year. Cambo started working on a .FBX exporter, thread is here:

http://blenderartists.org/forum/showthread.php?t=92082

And OTEE (a game engine developer) has offered to finance the completed development of the script. So far, no takers, but Cambo’s work on the script so far has been pretty impressive.

0 Likes

(Hoehrer) #7

So if i read this right the collada exporter shipped with Blender 2.43 is non-functional then?

Good to know, another format next to md2 that is going to be a pain to use. :frowning:

What is this FBX … or rather: what has it to do with the collada format?

EDIT: i tried to fix collada importer already … strange thing is: my changes do not make it work. I don’t know enough python to fix that unfortunately :frowning: … i suspect it has something to do with API or Python-version changes.

Werner

0 Likes

(Hoehrer) #8

Guess what? The linux version of the script at least given me an interface for the importer. But now I guess I get the same errors as motorsep.

here they are:

./blender
guessing './blender' == '/games/blender/blender-2.43-linux-glibc232-py24-i386/./blender'
Compiled with Python version 2.4.
Checking for installed Python... got it!

FEEDBACK: Illusoft Collada 1.4 Plugin v0.2.65 started
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib/blender/scripts/bpymodules/BPyRegistry.py", line 252, in SaveConfigData
    f = file(filename, 'w')
IOError: [Errno 13] Permission denied: '/home/hunter/.blender/scripts/bpydata/config/collada.cfg'
Blender.Scene.getCurrent() is deprecated,
        use Blender.Scene.GetCurrent() instead.
Blender.Scene.getCurrent() is deprecated,
        use Blender.Scene.GetCurrent() instead.
Traceback (most recent call last):
  File "/usr/lib/blender/scripts/bpymodules/colladaImEx/cstartup.py", line 527, in ButtonEvent
    transl = translator.Translator(doImport,__version__,debug,fileName, useTriangles, usePolygons, bakeMatrices, exportSelection, newScene, clearScene, lookAt, usePhysics, exportCurrentScene, exportRelativePaths, useUV)
  File "/usr/lib/blender/scripts/bpymodules/colladaImEx/translator.py", line 58, in __init__
    self.__Import(fileName)
  File "/usr/lib/blender/scripts/bpymodules/colladaImEx/translator.py", line 64, in __Import
    documentTranslator.Import(fileName)
  File "/usr/lib/blender/scripts/bpymodules/colladaImEx/translator.py", line 198, in Import
    self.sceneGraph.LoadFromCollada(self.colladaDocument.scene)
  File "/usr/lib/blender/scripts/bpymodules/colladaImEx/translator.py", line 310, in LoadFromCollada
    self.objectNames[daeNode.id] = ob.name
AttributeError: 'NoneType' object has no attribute 'name'

0 Likes

(bigkahuna) #9

To be honest, I don’t know how far the developer (Illusoft) got with the script before stopping work. If you check his Collada Blender website, he promisses rigging and animation, but there hasn’t been any activity on the project in over 6 months. I haven’t tested the script that was included with 2.43, but I suspect it’s the last version that was released.

.FBX is supported by 3DS Max, Maya, Cinema 4D, Modo and a number of other 3D apps.

0 Likes

(Hoehrer) #10

Well as far as i researched the version that is shipped with blender (and which is kinda old by itself) even has a higher version number than the one from the illusoft or sourceforge page … i think that says a lot :-/

.FBX is supported by 3DS Max, Maya, Cinema 4D, Modo and a number of other 3D apps.
Sound nice, just too bad that I (and the original poster of the thread) need an importer for something max has exported (with bones+animations in my case) not the other way around. At least the FBX thread does not mention anything about that.

Anybody else got this problem? How could one solve this?

Werner

0 Likes

(Hoehrer) #11

Updates/News from the developer of the script:

http://colladablender.illusoft.com/phorum/read.php?2,86

Werner

0 Likes

(bigkahuna) #12

Thanks for that Werner, that’s certainly encouraging. FWIW, OTEE, prior to looking for someone to develop a .FBX plugin, offered to compensate Pieter for a completed Collada plugin. That was late last year, and as I’m sure you noticed, not much has happened since. Forum posts went unanswered for months and those of us who followed the plugin’s progress assumed the worst.

I understood that you’re interested in finding an path to import files from 3DS Max. I just thought that since there seemed to be more activity on the FBX plugin it might have been more likely to happen. But as far as I can tell, neither project is moving along very quickly anymore.

Another possible work-around might be through .X files or .LWO files. Have you tried either of these?

0 Likes

(Hoehrer) #13

@bigkahuna: Yes, unfortunately blender currently lacks any decent (as far as i searched that is) exchange format with bones support - especially for import.

If anybody disagrees would love to hear alternatives like bigkahuna did :slight_smile:

X+LWO: Thanks for the tip. And also for the hint to FBX … maybe I can get it to work that way for now :slight_smile: I’ll report here if it works of course.

Werner

0 Likes

(Hoehrer) #14

I finally had some time to dig into the code of the importer … please test this if you find time.

diff scripts/bpymodules/colladaImEx/original_translator.py scripts/bpymodules/colladaImEx/translator.py

310,311c310,312
<                       self.objectNames[daeNode.id] = ob.name
<                       ##sceneNode.ObjectFromDae(daeNode)
---
>                       if ob is not None:
>                               self.objectNames[daeNode.id] = ob.name
>                               ##sceneNode.ObjectFromDae(daeNode)

EDIT: the problem i now see is that the imported objects/meshes always seem to be empties :frowning:
EDIT2: Nevermind, the import of aniamtions/bones is broken even with this patch :frowning:

Werner

0 Likes

(Hoehrer) #15

is thios code still valid in blender 2.43?

    def CreateArmature(cls,objectName,armatureName, realArmatureName, daeNode):        
        armatureBObject = Blender.Object.New('Armature',objectName)
        armatureBObject.data.name = str(realArmatureName)
        armature = Armature(armatureBObject, daeNode)        
        armature.name = armatureName
        cls._armatures[armatureName] = armature
        
        return armature
0 Likes

(Hoehrer) #16

I think i’ve fixed armature import, but this might also break some mesh-stuff :frowning:

diff translator_original.py translator.py


860a861,862
>                       if (self.bMesh is None):
>                               return None
3389c3391,3392
<               self.objects[controllerID] = [bMesh, bMesh.name]
---
>               if not (bMesh is None):
>                       self.objects[controllerID] = [bMesh, bMesh.name]

diff helperObjects_original.py helperObjects.py


119c119,120
<               armatureBObject.data.name = str(realArmatureName)
---
>               data = armatureBObject.getData()
>               data.name = str(realArmatureName)

The problem is that i have no “known” file for import … just one a co-developer (thanks mattn) from the ufoai project made for me from Max: http://mattn.ninex.info/files/test.DAE … here i can import the armatures But no animation/NLA/whatever and no meshes (dunno if meshes are int he file though).
Does Collada (and the plugin) support NLA?

Feedback&help is welcome :slight_smile:

Werner

0 Likes

(bigkahuna) #17

Hi Werner,

I don’t think I have any apps that support Collada except Equinox 3D: http://www.equinox3d.com/ which only has very limited animation and Collada support. Maybe that will help.

0 Likes

(Hoehrer) #18

Ok, I can"t proceed any further with debugging since i know less and less about the code that gives the errors. All changes i made are in the zip file (3 modified files):

http://mattn.ninex.info/files/colladaImEx_0.3.146_modified.zip

This is still broken … i think you could skip the “collada” file to get at least armature import (the diff from above) to work, but I’m not sure.

Werner

0 Likes

(slow67) #19

I got a question for all of you. Are you looking for actual bone importing or would you be satisfied with just Baked point animations.

I realize that this thread is about the callada format in particular, but I only ask because I was thinking of extending the mdd import/export to support 3dsmax pointcache files.

this is of course limiting you to do all your animation in one application(at least per object). I recently tried working with bone export, and it is a royal pain to get right.

0 Likes

(Meta-Androcto) #20

thanks for trying to revive this script, it is actually very important to certain areas of Blender & some associated Programs, the sooner someone can get this fully functional the better.
Good luck.
M.A.

0 Likes