Blender animation export has been deployed!
Moderators: MR.D, Moderators
Blender animation export has been deployed!
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:
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.
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:
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.
Re: Blender animation export has been deployed!
I found some spare time and made a promo vid and stuff
Re: Blender animation export has been deployed!
It is a small swordwiggle for Scythemaster but a giant swordwiggle for springkind!
Re: Blender animation export has been deployed!
Wouldn't you know it I just installed a chrome extension for making YouTube gifs...
- FireStorm_
- Posts: 666
- Joined: 19 Aug 2009, 16:09
Re: Blender animation export has been deployed!
...I'm very curious ... tried some stuff; discovered my Blender version is pretty ancient; gonna retry later today; will report on that...
Re: Blender animation export has been deployed!
Modified initial post to include the gif ^^
- FireStorm_
- Posts: 666
- Joined: 19 Aug 2009, 16:09
Re: Blender animation export has been deployed!
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)
Upon export I didn't notice Options; it did make a .lua file, but seemingly without size or content. (Picture of relevant error message)
Re: Blender animation export has been deployed!
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)
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)
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)
They should be in the lower left panel of the export dialog (the one where you pick filename).Upon export I didn't notice Options
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)
- FireStorm_
- Posts: 666
- Joined: 19 Aug 2009, 16:09
Re: Blender animation export has been deployed!
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.
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.
Re: Blender animation export has been deployed!
Oh cool!
(bug has been fixed now)
(bug has been fixed now)
Re: Blender animation export has been deployed!
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 >.<
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 >.<
- FireStorm_
- Posts: 666
- Joined: 19 Aug 2009, 16:09
Re: Blender animation export has been deployed!
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.
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.
Re: Blender animation export has been deployed!
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.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.
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
- FireStorm_
- Posts: 666
- Joined: 19 Aug 2009, 16:09
Re: Blender animation export has been deployed!
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...
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...
Re: Blender animation export has been deployed!
Very nice work, anarchid. thanks!
Re: Blender animation export has been deployed!
Blender has z = up
Re: Blender animation export has been deployed!
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!
Re: Blender animation export has been deployed!
So if i model a castlegate, with a drawbridge, and hit ender-smoth wrote:Blender has z = up
the Gate is up?
Re: Blender animation export has been deployed!
then you become xenocidecide.So if i model a castlegate, with a drawbridge, and hit ender-
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.
Re: Blender animation export has been deployed!
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).
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).