Collada export removes action names #48449

Closed
opened 2016-05-16 10:46:44 +02:00 by Trent Gamblin · 16 comments

System Information

  1. Windows 10, GTX 980 ti
  2. Ubuntu 14.04, Intel HD 4000

Blender Version

2.77a

Short description of error

Action names aren't preserved in Collada export, making it near impossible to use with game engine tools (e.g., writing a tool to convert Collada to a game engine-specific format will not preserve animation names, which are important so a game engine knows what each animation is.)

Exact steps for others to reproduce the error

The attached model has 2 actions called Arm and Leg that move the arm and leg (example model...) File->Export as Collada exports something with cryptic and unusable names in the library_animations section of the exported data. <library_animations> and <library_animations> (not even a consistent naming). Re-loading the .dae file loads it with two actions called MeshAction and ModelAction. I also note that in the outliner, the original blender file has both actions located as children of the mesh which is a child of the armature, however after import, one animation is a direct child of the armature (not sure yet what this means...)

It would be useful if export preserved action names for use within a game engine. As Collada is intended to be used as an intermediate format, my intention is to parse Collada files to create a custom game-specific format, but I'd like it to work with Blender or other tools (Blender alone would be good enough though.)

guy3.blend

**System Information** 1) Windows 10, GTX 980 ti 2) Ubuntu 14.04, Intel HD 4000 **Blender Version** 2.77a **Short description of error** Action names aren't preserved in Collada export, making it near impossible to use with game engine tools (e.g., writing a tool to convert Collada to a game engine-specific format will not preserve animation names, which are important so a game engine knows what each animation is.) **Exact steps for others to reproduce the error** The attached model has 2 actions called Arm and Leg that move the arm and leg (example model...) File->Export as Collada exports something with cryptic and unusable names in the library_animations section of the exported data. <library_animations><animation id="Mesh_*"> and <library_animations><animation id="Mesh_pose_bones__*"> (not even a consistent naming). Re-loading the .dae file loads it with two actions called MeshAction and ModelAction. I also note that in the outliner, the original blender file has both actions located as children of the mesh which is a child of the armature, however after import, one animation is a direct child of the armature (not sure yet what this means...) It would be useful if export preserved action names for use within a game engine. As Collada is intended to be used as an intermediate format, my intention is to parse Collada files to create a custom game-specific format, but I'd like it to work with Blender or other tools (Blender alone would be good enough though.) [guy3.blend](https://archive.blender.org/developer/F312401/guy3.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @goobliata

Added subscriber: @goobliata

Added subscribers: @GaiaClary, @Sergey

Added subscribers: @GaiaClary, @Sergey
Gaia Clary was assigned by Sergey Sharybin 2016-05-17 09:59:50 +02:00

@GaiaClary, are we still considering current collada implementation supported?

@GaiaClary, are we still considering current collada implementation supported?
Member

@Sergey The current collada module is supported until someone deletes it from the Blender source. However bug treatment is going slow at the moment. If nobody else fixes this issue, then i will look into this in about 10 days. (It might be an easy fix)

@Sergey The current collada module is supported until someone deletes it from the Blender source. However bug treatment is going slow at the moment. If nobody else fixes this issue, then i will look into this in about 10 days. (It might be an easy fix)

Added subscriber: @DavidJeske

Added subscriber: @DavidJeske

FYI - Using blender FBX export and importing into Unity yields 3 animations... (Model|Arm, Model|Leg, and Mesh|Arm). The first two are the Arm/Leg animations as expected. The third one is empty, and occurs because somehow your guy.blend file has an empty animation named "Arm" hanging off the mesh object. (I don't know how this got there. You can outliner right click unlink to remove it.)


What game engine are you loading the dae into?

I loaded an exported dae into Unity. It shows the model with one animation, labeled "Take 001", a name which does not appear anywhere in the dae export. So changing those names you see wouldn't affect what they are named after import into Unity. The "Take 001" animation spins the leg 360 degrees, and doesn't match any animation in the guy.blend.

I don't know enough about dae and Unity's dae support to who is doing what wrong here.

It does seem like a problem that exporting to dae and re-importing into blender results in those weird names, and that blender is oddly appending "Action" to the imported names. However, I wouldn't trust blenders collada import any more than it's export, so it's not clear what is being done wrong on which end.

In case it's relevant -- In the blender exporter code, the mesh animation id and name appear to be coming from here:

https://github.com/jeske/blender_hacking/blob/particle_emitter_collisions/source/blender/collada/ControllerExporter.cpp#L213

FYI - Using blender FBX export and importing into Unity yields 3 animations... (Model|Arm, Model|Leg, and Mesh|Arm). The first two are the Arm/Leg animations as expected. The third one is empty, and occurs because somehow your guy.blend file has an empty animation named "Arm" hanging off the mesh object. (I don't know how this got there. You can outliner right click unlink to remove it.) ---- What game engine are you loading the dae into? I loaded an exported dae into Unity. It shows the model with one animation, labeled "Take 001", a name which does not appear anywhere in the dae export. So changing those names you see wouldn't affect what they are named after import into Unity. The "Take 001" animation spins the leg 360 degrees, and doesn't match any animation in the guy.blend. I don't know enough about dae and Unity's dae support to who is doing what wrong here. It does seem like a problem that exporting to dae and re-importing into blender results in those weird names, and that blender is oddly appending "Action" to the imported names. However, I wouldn't trust blenders collada import any more than it's export, so it's not clear what is being done wrong on which end. In case it's relevant -- In the blender exporter code, the mesh animation id and name appear to be coming from here: https://github.com/jeske/blender_hacking/blob/particle_emitter_collisions/source/blender/collada/ControllerExporter.cpp#L213
Author

I figured out the extra animation on the mesh already actually. I'm still not 100% sure about it, I even asked about it on stackexchange: http://blender.stackexchange.com/questions/52744/what-do-these-animation-objects-in-outliner-represent

but the answer was not entirely clear (though helpful.)

I've moved on from collada to the DirectX exporter -- which I had some minor problems with as well. For now I just modified the exporter to suit my needs. So collada working isn't a high priority for me anymore really. I was going through the formats to find one that would work. It's my own custom engine so how Unity works isn't important to me.

Thanks for the detailed response. I'm not sure how other software handles naming of animations but it could be relevant to see and maybe match. It does seem important though, if you were to use the format... unless you want to do more work in renaming or hard-coding values in your game.

I figured out the extra animation on the mesh already actually. I'm still not 100% sure about it, I even asked about it on stackexchange: http://blender.stackexchange.com/questions/52744/what-do-these-animation-objects-in-outliner-represent but the answer was not entirely clear (though helpful.) I've moved on from collada to the DirectX exporter -- which I had some minor problems with as well. For now I just modified the exporter to suit my needs. So collada working isn't a high priority for me anymore really. I was going through the formats to find one that would work. It's my own custom engine so how Unity works isn't important to me. Thanks for the detailed response. I'm not sure how other software handles naming of animations but it could be relevant to see and maybe match. It does seem important though, if you were to use the format... unless you want to do more work in renaming or hard-coding values in your game.

I don't think there is anything more to do here. However, here is some more data..

The bundle below includes a fixed version of guy3-dj.blend, the blender FBX and DAE exports, and a Maya 2013 DAE export created after importing the blender FBX.

guy3-dj-blend-dae-fbx.zip

The Maya DAE file uses names derived from the object names just like blender. I can see no mention of the animation names anywhere in the Maya DAE file. (I renamed them LegAnim and ArmAnim for clarity)

  <library_animations>
  <animation id="ManFBXASC032Armature-anim" name="ManFBXASC032Armature">

When I import the Maya DAE into Unity, I get also only one animation, also labeled "Take 001", just like from blender. However, when imported from Maya this animation is the correct "LegAnim". (the blender imported version swings the same leg 360 degrees)

The Maya DAE file is 127kb, compared with blender's at 45kb.

I don't think there is anything more to do here. However, here is some more data.. The bundle below includes a fixed version of guy3-dj.blend, the blender FBX and DAE exports, and a Maya 2013 DAE export created after importing the blender FBX. [guy3-dj-blend-dae-fbx.zip](https://archive.blender.org/developer/F315927/guy3-dj-blend-dae-fbx.zip) The Maya DAE file uses names derived from the object names just like blender. I can see no mention of the animation names anywhere in the Maya DAE file. (I renamed them LegAnim and ArmAnim for clarity) ``` <library_animations> <animation id="ManFBXASC032Armature-anim" name="ManFBXASC032Armature"> ``` When I import the Maya DAE into Unity, I get also only one animation, also labeled "Take 001", just like from blender. However, when imported from Maya this animation is the correct "LegAnim". (the blender imported version swings the same leg 360 degrees) The Maya DAE file is 127kb, compared with blender's at 45kb.

Added subscriber: @coolkid87

Added subscriber: @coolkid87

Hello, I was working with the COLLADA export from Blender and found this as well. I've also found that Blender exports only the current action and an action in Blender is exported as separate <animation> elements for each bone directly under <library_animations> element in COLLADA. Is it possible to group them like the following ?

<animation id="Action 1 Name from Blender">
    <animation/> <!-- animation for bone 1 -->
    <animation> <!-- animation for bone 2 -->
    ...
</animation>
<animation id="Action 2 Name from Blender">
    <animation/> <!-- animation for bone 1 -->
    <animation> <!-- animation for bone 2 -->
    ...
</animation>
Hello, I was working with the COLLADA export from Blender and found this as well. I've also found that Blender exports only the current action and an action in Blender is exported as separate `<animation>` elements for each bone directly under `<library_animations>` element in COLLADA. Is it possible to group them like the following ? ``` <animation id="Action 1 Name from Blender"> <animation/> <!-- animation for bone 1 --> <animation> <!-- animation for bone 2 --> ... </animation> <animation id="Action 2 Name from Blender"> <animation/> <!-- animation for bone 1 --> <animation> <!-- animation for bone 2 --> ... </animation> ```
Gaia Clary was unassigned by Dalai Felinto 2019-12-23 16:37:07 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

Is this still an issue?

Is this still an issue?

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Bastien Montagne self-assigned this 2020-02-24 12:50:35 +01:00

More than a week of inactivity, closing for now (we can always re-open should requested info be provided).

More than a week of inactivity, closing for now (we can always re-open should requested info be provided).
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
6 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#48449
No description provided.