Blender animation export has been deployed!

Blender animation export has been deployed!

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Blender animation export has been deployed!

Post by Anarchid » 20 Jan 2014, 21:36

For countless aeons, animations in Spring had to be written by hand, barring any animation artists from actually trying their hand without having to painstakingly navigate the techno-horrors of p͖̖r̟̝͍͍o͕̤͈̭̝̟͕ͅg͚͖͓r̤̜̞a̻̣̮͎̱̮m͕̰͇͈͔m̼̞i̲ͅn̦̬̺̼̖͙g̖̺̬̩͎̜.

But no longer.

The revolution has come! A salvation twisted into the form of a Blender addon. It has four options. It exports animation scripts. It lets you author them within a modeling environment. Beware its numerous limits!

Seek first on github.

Here's an output sample (together with model and source .blend file so you can run locally and have a nice reference). Ingame, it should look like this:
Image

Disclaimer: model used in sample is an adapted ZK Scythe. Animation in sample is something i hacked together in 15 minutes while learning blender animation workflow on the fly.

If you find bugs i don't know about, maybe i'll fix them in a grim dark future if your report them on github.
Last edited by Anarchid on 22 Jan 2014, 11:43, edited 2 times in total.
1 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 21 Jan 2014, 20:02

I found some spare time and made a promo vid and stuff
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Blender animation export has been deployed!

Post by knorke » 21 Jan 2014, 20:28

It is a small swordwiggle for Scythemaster but a giant swordwiggle for springkind!
0 x

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Blender animation export has been deployed!

Post by SinbadEV » 21 Jan 2014, 20:56

Wouldn't you know it I just installed a chrome extension for making YouTube gifs...

Image
0 x

User avatar
FireStorm_
Posts: 664
Joined: 19 Aug 2009, 16:09

Re: Blender animation export has been deployed!

Post by FireStorm_ » 22 Jan 2014, 11:03

...I'm very curious :-) ... tried some stuff; discovered my Blender version is pretty ancient; gonna retry later today; will report on that...
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 22 Jan 2014, 11:43

Modified initial post to include the gif ^^
0 x

User avatar
FireStorm_
Posts: 664
Joined: 19 Aug 2009, 16:09

Re: Blender animation export has been deployed!

Post by FireStorm_ » 22 Jan 2014, 14:07

Think I had a workable version in retrospect, but I couldn't find how to access User Preferences (ctrl + alt + u works for me, btw)

Upon export I didn't notice Options; it did make a .lua file, but seemingly without size or content. (Picture of relevant error message)
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 22 Jan 2014, 14:12

Ah, i think i know what would cause that, will fix in 6-7 hours.

Can you upload your (version of) the .blend file somewhere so i can test?

Meanwhile, to workaround this, you probably can get away with adding an initial keyframe for every object in scene (including that cube you have lying around and which probably doesn't have any keyframes at all)
Upon export I didn't notice Options
They should be in the lower left panel of the export dialog (the one where you pick filename).

I'll add a screenie of how it should look a bit later (and i guess it'll make a way into a better tutorial someday)
0 x

User avatar
FireStorm_
Posts: 664
Joined: 19 Aug 2009, 16:09

Re: Blender animation export has been deployed!

Post by FireStorm_ » 22 Jan 2014, 14:27

There should be nothing special about my .blend file. I was using the sample model you provided. (and I noticed the options, btw.)

I'll try to figure out some more stuff later today; because I'm not saying I followed all your instructions right. :-)

edit:
Alright, I've discovered that stupid me opened the .dae file instead of the .blend file. It seems to totally work. Now to see how quickly I can learn blender animation. :-)
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 22 Jan 2014, 15:45

Oh cool!

(bug has been fixed now)
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 23 Jan 2014, 10:21

Manual on github had an inconsistency, it said "Euler ZYX" while in the grim dark present, Spring requires "Euler ZXY" (like in the sample file).

FireStorm_, i honestly hope you haven't gotten to trying this on your own models yet, because if you used ZYX and created an animaiton, there's no way to repair it >.<
0 x

User avatar
FireStorm_
Posts: 664
Joined: 19 Aug 2009, 16:09

Re: Blender animation export has been deployed!

Post by FireStorm_ » 23 Jan 2014, 11:01

Don't worry about that. I'm not that fast. :-)
Still have to learn actual blender animation,
and I think I'd try a cube before something more complicated,
(probably later today... )

edit:
Right, I made an animation of a cube flying strait up, and Turing around that axis, and failing down again. It was the z-axis in blender, and thus the output became z, though of course it should be y, for y is hight in spring.

...bla bla :-) The point is: I couldn't quickly find how to re-define the spacial-axes for an object in blender. Pointing that out would be appreciated.
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 23 Jan 2014, 13:46

The point is: I couldn't quickly find how to re-define the spacial-axes for an object in blender. Pointing that out would be appreciated.
It can stay being Z. Assimp local axes are somehow Z-up in Spring for models authored in Blender (at least if imported via .dae? maybe it's different if you export to 3ds), and that's fine, because it saves me having to do axis conversion. There is no indication that this z-up thing is ever going to be "fixed", so i kinda decided to roll with it.

This is also why it says it only supports assimp models.

If for some reason the exported script actually resulted in your model being translated along a different axis ingame than in Blender, then that's most definitely a bug to be investigated.

All you have to do with axes is set the rotation mode (for each animated object in scene!): while assimp and blender seem to have same axes, they don't, by default, have same rotation orders - but in case of your simple animation, that shouldn't even have become apparent, since it only shows when multiple-axis rotations happen.
Attachments
zxy.png
(101.03 KiB) Downloaded 1 time
0 x

User avatar
FireStorm_
Posts: 664
Joined: 19 Aug 2009, 16:09

Re: Blender animation export has been deployed!

Post by FireStorm_ » 23 Jan 2014, 17:50

I found the hidden panel, and set the Rotation mode to ZXY Euler.
But the output did not seem to be different from my previous attempt.

My cube jumps up and down, yet in the .lua I read z-translation.

I think the following is this is true for humanoids in Wings3D, UpSpring, but more importantly Spring:
Feet to Head describes y-axis
Shoulder to Shoulder describes x-axis
Back to Nose describes z-axis

Your provided sample was put in-game I assume,
so I probably did something wrong.
I'll try to check later today.
And sorry for the sporadic feedback btw... :-)
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: Blender animation export has been deployed!

Post by Beherith » 23 Jan 2014, 17:57

Very nice work, anarchid. thanks!
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: Blender animation export has been deployed!

Post by smoth » 23 Jan 2014, 19:01

Blender has z = up
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6107
Joined: 29 Apr 2005, 01:14

Re: Blender animation export has been deployed!

Post by FLOZi » 23 Jan 2014, 20:19

Although I don't doubt that this is a step forward, the video / gif isn't currently any more impressive than scripts done with animator - hop to it you lovely art people! :P
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10223
Joined: 24 Jan 2006, 21:12

Re: Blender animation export has been deployed!

Post by PicassoCT » 23 Jan 2014, 23:19

smoth wrote:Blender has z = up
So if i model a castlegate, with a drawbridge, and hit ender-

the Gate is up?
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 24 Jan 2014, 08:53

So if i model a castlegate, with a drawbridge, and hit ender-
then you become xenocidecide.

But yes, blender .dae models have z-up, both in blender and spring. This fact has caused some frustration and grief for carrepairer and smoth i believe, and it looks like it's staying that way.
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: Blender animation export has been deployed!

Post by Beherith » 24 Jan 2014, 09:28

I am completely unfamiliar to blender.
Anarchid, if you can point me to a model format specification that blender can import which has support for bones and multiple objects, I can possibly write a python converter script that converts s3o objects to something that can use inverse kinematics, and can be imported with one click into blender (as that is the holy grail of animation for me).
0 x

Post Reply

Return to “Art & Modelling”

cron