Game Development Community

Blender and Torque 3D - DONT USE 2.58 OR 2.59

by Joshua Cearley · in Artist Corner · 08/09/2011 (5:35 am) · 7 replies

Currently, Blender 2.58 and 2.59 have some regressions in the Collada support which cause invalid files to be exported and Torque isn't happy with it. In 2.58 the animation targets were altered which causes problems with animation (it won't import without manual intervention) and in 2.59 it was further worsened by the skinning values changing. This causes imported models to be completely distorted.

The blender team is aware of the issue and there is a patch coming down in a future version, but in the interim using 2.57 seems to produce both properly skinned and animated models in some of my tests.

Previously...
I've been trying to export from Blender for a few days now and keep running in to troubles. Blender 2.5x seems to work as far as getting a static mesh out complete with support for the images and even animations but still explodes with the bones.

If I use the global animation timeline and animate objects on their own through that, it seems to import in to Torque just fine. If I put an armature in, rig it, parent it and do animations in Blender it seems to break. For one, the bones come out looking strange and malshaped and for two the animation simply fails to load. I assume the malshaped is a scaling issue and that I haven't fully rigged some of the test meshes, since the last one I exported I did rig the head and it showed up on the bones. The following unfortunately does happen when trying to import the mesh:

Warning: Failed to resolve animation target: Armature_Head/rotationX.ANGLE
Warning: Failed to resolve animation target: Armature_Head/rotationY.ANGLE
Warning: Failed to resolve animation target: Armature_Head/rotationZ.ANGLE
Warning: Failed to resolve animation target: Armature_Head/location

It looks like the latest blender is mostly usable except the collada targets for bone animation are coming out wrong, and I haven't been able to find proper docs on what these targets should be in order to do a find/replace in the interim.

Edit - 8/9/2011 6:20pm: I tried the mentioned trick of using empties and it does work, albiet I tried an offchute of that. I put the empties in the right spots for bones and used constraints to animate them for me, then used the bake action tool to avoid manually doing it. This did produce visual motion (the angles were off, but that's more a fault of the constraints I think). I decided to pop open the semi-working Collada file and it looks like when Blender is working in global space it's using euler positions, whereas armature space is using angle motion. Torque doesn't seem to know what to do with the angular motion, but I think it should be possible to patch collada files in to a way torque likes.

About the author

Recent Threads


#1
08/09/2011 (6:52 am)
Check the resources section, there was a list of Blender fixes not so long ago.
#2
08/09/2011 (2:45 pm)
I had luck exporting a collada rigged character from the current blender build. I dont know if it was a bone_headed way to do it but I got it to export and not blow up like my previous attempts. The skeletal rig wasnt made for stock animations just my user created stuff.
Well anyways I set up an armature and parented it to the mesh with auto bone weights. Then I created a second skeleton with empties. I followed all bone names and parent relationship to the empty rig. When I animated the mesh with the armature I would also animate my empty rig to follow with key framing. When I export this and open it up in Torque it brings in both skeletons. Then I just deleted the root bone of the armature and everything worked fine. Like I said its probaly not the best solution but it worked.
#3
08/23/2011 (5:02 pm)
The problem seems to be that Blender doesn't export the animation tags properly; if you edit the file manually, do a find & replace, and remove the prefixed armature name from the animation tags, it seems to import. This is an annoying manual step but it's less annoying than having to mimic everything with empties.

On my end this solved one issue but not the other: I can get bone animations in, and static meshes, but rigged meshes seem to have completely wrong skinning.
#4
08/23/2011 (7:16 pm)
I see in the property panel and the right pop up panel in the 3d viewport ("N" key) you can choose to set the rotation mode (of bones when in pose mode or object mode) and there are alot of options, I personally dont understand all that so i stick with the default, but would that change what is written in the actual Collada file?
#5
08/24/2011 (4:08 am)
Changing the rotation mode doesn't seem to do much (if anything) as I've tweaked with it a handful of times, and Blender converts it to Axis/Angle in the collada file.

I can deal with manually renaming bones for now, but the skinning on the meshes is still unusably butchered :(
#6
08/24/2011 (2:49 pm)
You sound like your very capable with Blender and I hope this question doesnt sound silly but have you touched up your weights in the paint weight mode. I am just asking because that seems to be one of the only things thats worked pretty solid in Torque 3D.My imported meshes seemed to animate nice when my weights were on point. And you mentioned doing some renaming, so is that causing any issues with makeing sure your vertex groups are named like your bones.
#7
08/24/2011 (3:41 pm)
I've tracked it down to be something with the files output by 2.58 and 2.59 versions of Blender. I downgraded to 2.57 which someone else here was using, and it started working perfectly for me. I let the blender folks know about it so it should be getting a fix when they start wrapping up the Google Summer of Code addons.