Horde3D

Next-Generation Graphics Engine
It is currently 14.05.2024, 05:45

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 23.06.2010, 21:48 
Offline

Joined: 13.06.2010, 02:11
Posts: 11
The Blender exporter seems to export broken animations. The result I see is that the skeleton seems to be animated somewhat correctly when I enable debug view mode inside my program, but the mesh doesn't follow it correctly at all, and my model just seems to explode.
This is especially a big problem for Blender users because Blender's Collada exporter also has broken animation support, so there's no workaround.
Here's a screenshot. It's supposed to be a low-poly guy on a skateboard: http://i.imgur.com/2hcuY.png


Top
 Profile  
Reply with quote  
PostPosted: 26.06.2010, 18:29 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Did you already try the latest Blender 2.5.2? AFAIK they improved the collada support but I'm not sure where they stand at the moment. The best would be of course if the standard (ColladaConv driven) content pipeline could be used for Blender as well.


Top
 Profile  
Reply with quote  
PostPosted: 27.06.2010, 05:44 
Offline

Joined: 13.06.2010, 02:11
Posts: 11
marciano wrote:
Did you already try the latest Blender 2.5.2? AFAIK they improved the collada support but I'm not sure where they stand at the moment. The best would be of course if the standard (ColladaConv driven) content pipeline could be used for Blender as well.

You mean 2.5.0 alpha 2? Yes, I tried it, and it's a lot better. The two remaining problems I have with it are that it doesn't have an option for sampling animation, so you have to do that inside the editor, and it doesn't support exporting multiple animations at once, but then I'm not sure ColladaConv supports that either? That issue aside, I think once Blender 2.5 is released, we can use the Collada content pipeline instead of having to write a new compatible exporter.

In other news, I have fixed the Blender exporter's animation support. What I found was that the bone transformations didn't work when the meshes were not centered around the origo with no rotation. I fixed this by applying the transformations to the vertices, so the .scene.xml doesn't have any transformations for the meshes at all. This seems to be exactly what happens when I export from Blender 2.5 alpha.

I have also made other modifications to the exporter. I've added a base path parameter to cope with the switch from implicit referencing to directories for different resource types to explicit referencing. ("foo.anim" -> "animations/foo.anim") I already posted that as a patch in the Tools section of the boards. My code still requires more cleanup, but I have attached my version of the exporter for anyone that might want to use it. I will post a proper patch later once I'm done cleaning it up and checking for any obvious bugs I may have caused while hacking on it. Use at your own risk, but it works for me right now. :-)


Attachments:
File comment: Updated Horde3D Blender exporter.
Horde3DExport.py.txt [51.63 KiB]
Downloaded 725 times
Top
 Profile  
Reply with quote  
PostPosted: 28.06.2010, 07:38 
Offline

Joined: 13.06.2010, 02:11
Posts: 11
So here's a patch that's more cleaned up.

So to summarize, this patch does three things:
* Adds a "base path" field to the UI, which will set the path to which the paths that get written into the XML will be relative.
* Applies mesh transformations directly to the vertices to fix skeletal animation support.
* For skeletal animated models, exports a separate file for every action defined for the armature.

Sorry about bundling all those up. They don't really overlap though, so it should be pretty easy to cherry pick if needed.


Attachments:
Blender exporter applytransform basepath multianim.patch [16.37 KiB]
Downloaded 701 times
Top
 Profile  
Reply with quote  
PostPosted: 28.06.2010, 08:56 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks a lot for your contribution. I applied the patch to the CB. I haven't tested it myself, but I guess if something's wrong, we will receive feedback here in the forums.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group