====== Blender COLLADA export script updates ====== **Provided updated scripts are NOT OFFICIAL bug fixes. Use at your own risk!** ==== August 11, 2009 fixed Blender 2.49 COLLADA export for Skin/Bone animation ==== * Complete do over of Bone/Skin animation export [[http://cast3d.org/demos/blenderfix/translator_2-49.zip| Download COLLADA export script update for Blender 2.49 ]] == History == ---- 2009.08.11 by dynabyte ( cast3d@gmail.com, www.cast3d.org): - Fixed skeleton/bone and animation. (export only). Brief change log: - Fuction Controller.SaveToDae : INV_BIND_MATRIX composition as = (bArmatureObject.matrixWorld * Bone.matrix['ARMATURESPACE']).invert() - Fuction ArmatrureNode.SaveToDae : - mutliple root bones handling added - return argument as list - Fuction ArmatrureNode.BoneToDae : - local bone matrix composition as = Bone.matrix['ARMATURESPACE'] * parent_bone.matrix["ARMATURESPACE"].invert() - bone's action IPOs compiled in to list - removed redundant function arguments - Fuction Animation.SaveToDae : - new impementation - removed unused getEulerAnimation() function - function takes IPOs list as input argument - new function getLocalPoseMatrix added - Fuction SceneNode.SaveSceneToDae : - Added creation of Armature node as parent of Skeleton nodes - Controler transforms cleaned up - Node animation handling fixed ---- ==== November 15, 2008 Additional bug fixes ==== * Animation rotation keys ( quaternion) to Euler angles conversion fixed. Used to be literal addition of Euler angles from Animation keys and BONESPACE used. Fixed version converts quaternion to Matrix and then multiplies with BONESPACE matrix, and then converts to Euler angles. * Armature root bone animation fixed. The issues showed itself if any motion applied to a root bone. Before that it was moving in wrong directions. Fixed version added an extra 'armature node' to decouple animation keys and initial transformations of armature object. Apparently, Blender v 2.45 , 2.46, 2.47 and 2.48a have few bugs in COLLADA export that do not allow to produce correctly built Skin/Bone animation Dae files. I did some research and found and fixed a number of bugs to make export work right. Also I submitted [[http://projects.blender.org/tracker/?func=detail&atid=125&aid=17427&group_id=9|ticket in Blender Bug-Tracker system]], so I hope those bugs will be fixed in upcoming Blender release soon. ====What's fixed? ==== - Skin IDREF_Array joint id string values containing '.' character converted to '_'. For example, id value 'Foot_L.001' will be replaced with 'Foot_L_001'. The same way PyCollada library converts ids for 'id' attribute. Due to this bug skinning process fails to find Bone nodes. - Skin joints pose matrix calculations are updated to take into account rotations(local orientation) of a bone. Used to be only bone Head Positions. Most of exported animations were incorrect before that fix. - Some animation keys got removed from export. The issue was with check condition on summary rotation equals to 0. Which in some cases may be full rotation or back and forth rotation. - Weird animation artifacts, like, stretching of an animated character shoe noses during the walk, because skin joint weights were evenly distributed instead of using joint weight values from Blender core objects. ==== Download ==== [[http://cast3d.org/demos/blenderfix/translator_2-49.zip| COLLADA export script update for Blender 2.49 ]] [[http://cast3d.org/demos/blenderfix/translator_2-48a.zip| COLLADA export script update for Blender 2.48 ]] [[http://cast3d.org/demos/blenderfix/colladaImEx_2-46.zip| COLLADA export script update for Blender 2.46 and 2.47]] [[http://cast3d.org/demos/blenderfix/translator_2-45.zip| COLLADA export script update for Blender 2.45 ]] ==== How to Install ==== - unpack content of the zip file in to temporary storage. - copy files to /.blender/scripts/bpymodules/colladaImEx. You may want to save original files just in case. and you are ready to do Collada export. Also see readme.txt file in each zip file for instructions.