Animation of bones not exported properly #38259

Closed
opened 2014-01-17 12:18:09 +01:00 by Iqbal Hassan · 11 comments

System Information
OS: Windows 8
Graphic card: Nvidia Geforce 650M

Blender Version
Broken: 2.69.0 r60995
Worked: (optional)

Bones that do not inherit their parent's rotation is wrongly exported. In Start_FIle-02.blend file the torso bone is one such bone, but when exported to Collada it inherited the parent's(hip) rotation.

It seems that in the function "AnimationExporter::create_4x4_source" the lines

enable_fcurves(ob->adt->action, NULL);
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL);
BKE_pose_where_is(scene, ob);

need to be evaluated regardless of the POSE_CHAIN condition. I'm a newbie to Blender so please excuse me if this is not a bug at all.

**System Information** OS: Windows 8 Graphic card: Nvidia Geforce 650M **Blender Version** Broken: 2.69.0 r60995 Worked: (optional) Bones that do not inherit their parent's rotation is wrongly exported. In [Start_FIle-02.blend](https://archive.blender.org/developer/F69660/Start_FIle-02.blend) file the torso bone is one such bone, but when exported to Collada it inherited the parent's(hip) rotation. It seems that in the function "AnimationExporter::create_4x4_source" the lines ``` enable_fcurves(ob->adt->action, NULL); BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL); BKE_pose_where_is(scene, ob); ``` need to be evaluated regardless of the POSE_CHAIN condition. I'm a newbie to Blender so please excuse me if this is not a bug at all.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @diefaust

Added subscriber: @diefaust

Added subscriber: @mont29

Added subscriber: @mont29
Gaia Clary was assigned by Bastien Montagne 2014-03-18 16:34:24 +01:00

Gaia, care to check this one? Thanks! :)

Gaia, care to check this one? Thanks! :)

Added subscriber: @faerietree

Added subscriber: @faerietree

Anyone who can resolve this would be my (& wildfiregames') hero. :) We have troubles with pose bone rotation yet still not could narrow it down enough to file a bug report.

Will do inspecific vertex weight and pose bone tests with a basic cube as soon as possible. Any step forward to the already greatly improved COLLADA im-/exporter 'd be so brilliant.dude-prop_point_90deg_off_wrong_axis_z-up_y-up.jpg
Y-Up vs. Z-Up ? Is Bone rotation transformed to Z-Up during blender import?
dude-local_coords_bone_y-up_vs_remainder_z-up.jpg
I'm not certain if that is allrelated, so I thought until we have more specific and elaborate details, it'd be better to post in here instead of stretching Gaia too much. No rush! We are happy for everything!!
I guess this could make 3DSMax and blender compatible - currently we get good results for each animation toolchain/program (blender & max), but once we combine them, we get ... well, see yourself:
dude_4.jpg
Though the movements of the animation as is plays okay, here a .gif image. We are not sure yet if it's a coordinate system or vertex weight problem; or a bone order thing (then it would not even be related to blender).
dude-walking_dae_animation-slowmotion.gif

Just wanted to mention it and provide some pictures just for the case it might help.
dude-walking_dude_dae_embedded_animation.gif In the last .gif it's seen that even though we parented the prop points to the bones and tried every combination of clearing and setting the origin, somehow every prop (shield, cloak, ...) seems off by somewhat 90 degree rotated around an axis.
dude.blend

System Information
Ubuntu 12.04RTS, but facing the same on all platforms.
2 Cores.

Blender Version
Broken: 2.70, 2aff243 .

Hope you are not angry for me posting it here. See it as a hint only until we figure out more. .. :/
There are some more related github links (with line .dae numbers, still not very helpful though ): http://blenderartists.org/forum/showthread.php?330494-Why-blender-treats-empties-separately-gt-Propping-problems-COLLADA-example-given&p=2599954#post2599954

Anyone who can resolve this would be my (& wildfiregames') hero. :) We have troubles with pose bone rotation yet still not could narrow it down enough to file a bug report. Will do inspecific vertex weight and pose bone tests with a basic cube as soon as possible. Any step forward to the already greatly improved COLLADA im-/exporter 'd be so brilliant.![dude-prop_point_90deg_off_wrong_axis_z-up_y-up.jpg](https://archive.blender.org/developer/F81726/dude-prop_point_90deg_off_wrong_axis_z-up_y-up.jpg) Y-Up vs. Z-Up ? Is Bone rotation transformed to Z-Up during blender import? ![dude-local_coords_bone_y-up_vs_remainder_z-up.jpg](https://archive.blender.org/developer/F81728/dude-local_coords_bone_y-up_vs_remainder_z-up.jpg) I'm not certain if that is allrelated, so I thought until we have more specific and elaborate details, it'd be better to post in here instead of stretching Gaia too much. No rush! We are happy for everything!! I guess this could make 3DSMax and blender compatible - currently we get good results for each animation toolchain/program (blender & max), but once we combine them, we get ... well, see yourself: ![dude_4.jpg](https://archive.blender.org/developer/F81730/dude_4.jpg) Though the movements of the animation as is plays okay, here a .gif image. We are not sure yet if it's a coordinate system or vertex weight problem; or a bone order thing (then it would not even be related to blender). ![dude-walking_dae_animation-slowmotion.gif](https://archive.blender.org/developer/F81732/dude-walking_dae_animation-slowmotion.gif) Just wanted to mention it and provide some pictures just for the case it might help. ![dude-walking_dude_dae_embedded_animation.gif](https://archive.blender.org/developer/F81736/dude-walking_dude_dae_embedded_animation.gif) In the last .gif it's seen that even though we parented the prop points to the bones and tried every combination of clearing and setting the origin, somehow every prop (shield, cloak, ...) seems off by somewhat 90 degree rotated around an axis. [dude.blend](https://archive.blender.org/developer/F81738/dude.blend) **System Information** Ubuntu 12.04RTS, but facing the same on all platforms. 2 Cores. **Blender Version** Broken: 2.70, 2aff243 . Hope you are not angry for me posting it here. See it as a hint only until we figure out more. .. :/ There are some more related github links (with line .dae numbers, still not very helpful though ): http://blenderartists.org/forum/showthread.php?330494-Why-blender-treats-empties-separately-gt-Propping-problems-COLLADA-example-given&p=2599954#post2599954
Author

faerietree, you can change the blender source code as a temporary fix:
File: blender/source/collada/AnimationExporter.cpp

//BKE_scene_update_for_newframe(G.main,scene,scene->lay);
enable_fcurves(ob->adt->action, NULL);
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL);
if (bone) {
 if (pchan->flag & POSE_CHAIN) {
	*enable_fcurves(ob->adt->action, NULL);*BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL);
	BKE_pose_where_is(scene, ob);
 }
 else {
	//BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1);
	BKE_pose_where_is(scene, ob);
 }

I haven't tested with other files except the one I posted so I can't guarantee anything.

*Tested with your file dude.blend, the result was terrifying.

faerietree, you can change the blender source code as a temporary fix: File: blender/source/collada/AnimationExporter.cpp ``` //BKE_scene_update_for_newframe(G.main,scene,scene->lay); enable_fcurves(ob->adt->action, NULL); BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL); ``` ``` if (bone) { ``` if (pchan->flag & POSE_CHAIN) { *enable_fcurves(ob->adt->action, NULL);*BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, ctime, ADT_RECALC_ALL); BKE_pose_where_is(scene, ob); } else { //BKE_pose_where_is_bone(scene, ob, pchan, ctime, 1); BKE_pose_where_is(scene, ob); } I haven't tested with other files except the one I posted so I can't guarantee anything. *Tested with your file dude.blend, the result was terrifying.

Hey thank you!
It's no problem if it doesn't work. Our issues are probably rather related to
https://developer.blender.org/T38660 .

But thank you very much for the fix. Perhaps it's easier for Gaia to fix it now too! Well done!
(I hope I did not pollute this topic too much, now that it seems more related to the REST POSE scale, what Gaia already fixed for Maya ... brilliant dude!!)

Hey thank you! It's no problem if it doesn't work. Our issues are probably rather related to https://developer.blender.org/T38660 . But thank you very much for the fix. Perhaps it's easier for Gaia to fix it now too! Well done! (I hope I did not pollute this topic too much, now that it seems more related to the REST POSE scale, what Gaia already fixed for Maya ... brilliant dude!!)

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

We are sorry, but we currently have no maintainer for Collada area, and there is no point in keeping opened reports that no one will tackle any time soon.

We only intend to maintain basic support for SecondLife export, but it is very unlikely to get any more real work done here (even the OpenCollada library we use in Blender is a rather… quite project since some time now).

We are sorry, but we currently have no maintainer for Collada area, and there is no point in keeping opened reports that no one will tackle any time soon. We only intend to maintain basic support for SecondLife export, but it is very unlikely to get any more real work done here (even the OpenCollada library we use in Blender is a rather… quite project since some time now).

No prob, it's fixed for us. Our art department got a rig working - now can add new unit animations. Yay! That's a big benefit.

The new COLLADA export is great.
We have added Testudo and Syntagma animations. Without blender this were not possible. We try to teach and promote the foundation wherever possible.

No prob, it's fixed for us. Our art department got a rig working - now can add new unit animations. Yay! That's a big benefit. The new COLLADA export is great. We have added Testudo and Syntagma animations. Without blender this were not possible. We try to teach and promote the foundation wherever possible.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#38259
No description provided.