Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: blender export animations  (Read 5897 times)

0 Members and 1 Guest are viewing this topic.

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
blender export animations
« on: October 21, 2007, 09:20:39 PM »

Next question.  How do the animations get named and used.  I saw in the actor for the demo there was a rest and a walk.  I tried naming two actions in blender rest and walk, but the words weren't exported in the x file.  There was just an animation set and they were both listed under AnimationSet0, the animation set appeared to list key frames.
Logged

raychaser

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: blender export animations
« Reply #1 on: October 22, 2007, 06:04:35 PM »

hang on fireside. I'm getting through this as fast as my little fingers can type it. Haven't done any 3D math since university though so it's a bit rusty. :)

I've modified the Blender directx export script so that every action becomes an animation and gets properly named. Also added some extra header information and cleaned up some other things like material naming and Bone mirroring.

So why haven't I released it to the community yet? Mainly because it still causes mview to crash. Basically the script is at the point where everything gets set up properly so all you have to do is open it and then immediately save it in fragmotion for it to be usable. If I can't figure it out in the next day I'll just post the script and maybe someone else can take it from there.

In the end I'm willing to accept that extra step of sanitizing it in fragmotion if it means I get to use blender for all the actual work but it's not a perfect solution and other people may not be so willing.

I'll post whatever I've got tomorrow and then we'll see where we are....
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: blender export animations
« Reply #2 on: October 22, 2007, 08:30:48 PM »

As for animation names, the X format supports named animation sets, i.e. one X file can contain multiple named animations. Some exporters don't export animation names (that's the case of the default Blender exporter, as I understand). In that case, WME assumes the name of the X file is the name of the animation. It means, though, that you can have only one animation per one X file (you can still reference multiple X files in the actor definition file).

So even if the exporter doesn't export animation names, you can workaround this limitation in WME this way.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

raychaser

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: blender export animations
« Reply #3 on: October 22, 2007, 09:56:49 PM »

actually Mnemonic, That was a fairly easy fix. The directX exporter for blender can easily support one file containing animations with the same names as the blender actions. What's really got me stumped is why my .x file crashes under mview before I open and save it in fragmotion but not after. I don't have a good setup for the directx SDK so it's been very hard for me to debug it. So far all I get is a crash without any information in both the .X SDK viewer and MVIEW.

Fragmotion must be adding something extra to the file but so far I've mimmicked the header exactly and the coordinates seem the same....

I've been trying to run both .x files through winMerge to see what their differences are but so far no luck. Anyway I'm almost out of tricks so I'll post whatever I have tonight and then maybe someone else can pick up the gauntlet and continue.
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: blender export animations
« Reply #4 on: October 23, 2007, 04:21:47 AM »

Thanks for the information.  I've got plenty of time so I'll take a look at the working x file in the demo and see if I can get something to work.  I don't really want to go through fragmotion but I'd like to see your script raychaser.
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: blender export animations
« Reply #5 on: October 23, 2007, 05:36:57 AM »

Three more questions:

Were the start_frame, end_frame attributes abandoned?  I see them in the actor definition section but not in the 3d objects section.

Does the talk file that is used for lip sync work with 3d characters?

What is the animation speed used in game?  It looks faster than the 25 frames per second used in blender.  Can it be set in game?
« Last Edit: October 23, 2007, 05:43:22 AM by fireside »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: blender export animations
« Reply #6 on: October 23, 2007, 03:11:38 PM »

Quote
Were the start_frame, end_frame attributes abandoned?  I see them in the actor definition section but not in the 3d objects section.
They are no longer needed for X models, since the X models can contain multiple animation sets. So it's the responsibility of the model exporter to cut long animations into animation sets.

Quote
Does the talk file that is used for lip sync work with 3d characters?
No.

Quote
What is the animation speed used in game?  It looks faster than the 25 frames per second used in blender.  Can it be set in game?
The X file can contain a "TicksPerSecond" value, which controls the animation speed. The default value is 4800.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

raychaser

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
    • View Profile
Re: blender export animations
« Reply #7 on: October 23, 2007, 03:14:52 PM »

Hi Fireside,

As you asked I've posted my script here: http://forum.dead-code.org/index.php?topic=2440.0
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: blender export animations
« Reply #8 on: October 23, 2007, 07:13:46 PM »

Quote
Does the talk file that is used for lip sync work with 3d characters?
No.

That's too bad.  I'm doing a 2d sprite game right now and the lip sync makes the game look great.  I hope it's planned for the future.

Thanks for the file Raychaser. 
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: blender export animations
« Reply #9 on: October 23, 2007, 08:28:58 PM »

Might be. It's actually half-implemented, but somehow I never finished it.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: blender export animations
« Reply #10 on: October 23, 2007, 09:30:43 PM »

ahh I'm just kidding around... it is very generous of you... plus i get to see if it is true about HL2.. that they can't even give it away
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.038 seconds with 20 queries.