Blender animation export has been deployed! - Page 2

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: 1379
Joined: 30 Nov 2008, 04:31

Re: Blender animation export has been deployed!

Post by Anarchid » 24 Jan 2014, 11:34

Collada should be able to do all of this.

However....

(warning, spaghetti ball of incoherent thoughts ahead)

I am not sure it is possible to arse up IK support just yet. Most definitely, bones won't work currently at all.

I do have an end-goal of having bones work in Spring in full, but we're not there yet (obviously).

Some hurdles to solve:
1) Bones are special. They have start point, end point, and offset from parent bone's endpoint. Spring pieces are a bit different in that they don't have "length".

2) Bones always have their Y axis (unless i'm mistaken) aligned to the bone's length. Spring pieces currently need to start at 0,0,0, because i couldn't figure out how to offset Blender's keyframe values (which are absolute) to parameters for LUS Turn() commands (which seem to require relative-to-initial values). But bones cannot have rotation 0,0,0, because otherwise they're not really bones and IK won't work.

In other words, i don't think it's going to be easy to figure out a way to convert Spring hierarchies to skeletons and back without corruption.

3) It is not reasonably possible to workaround this by parenting objects to bones and saving keyframes from objects-as-affected by bones. It's possible, granted, but it's too insane to be considered imo.

In hindsight, some more approaches could be tried, and i could actually skip some of the ugliness in current scheme by using them (like, skipping loading of piece offsets on Create because now i know that blender measurement units translate to elmos 1:1).

For extra hurt, i think Collada doesn't support parenting objects to bones as such, so you'd have to work directly with blender format instead. Collada seems to approximate child-of-bone as "bone has 100% influence on mesh of child". But that could be exporter-specific.

4) Even if bone-driven IK animations could be done in Blender and then exported into Spring, they would probably have to be baked into FK in any world where this is not tackled by writing a LUS-contained IK solver that perfectly matches what Blender does

If you want stuff like non-clipping walkcycles that respect ground, i guess an in-spring IK solver would be needed anyway, but i guess even without it could make things easier. Need to think about this.

All in all, i think going anywhere forward from here is either little bugfixes and minor improvements, or just biting the bullet and diving into depths of engine itself for all that can be achieved therein: bone mesh deforms, animation handling from collada files themselves, bezier interpolation, etc...
0 x

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

Re: Blender animation export has been deployed!

Post by Beherith » 24 Jan 2014, 12:46

I know IK is not supported by spring natively, but I meant the following:
I want to constrain each joint to rotations only (maybe even allow a small degree of translation), and I want to move the foot of a model. Will blender allow me to move the foot only why calculating the nessessary leg and thigh rotations?
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 24 Jan 2014, 12:54

Right, that's what points 1-3 are about -

* Blender requires actual 'armatures' (skeletons) for its IK solver constraint (because blender)
* Bones cannot be (easily) made into data sources for LUS (because bone axes are 'special' and because absolute/relative specification of rotations)
* And object hierarchies which can be easily used as data sources cannot be easily parented to bones without too much effort (because not worth it)

I'll keep looking though, maybe i can find a way.
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 88
Joined: 27 Jan 2014, 01:04

Re: Blender animation export has been deployed!

Post by TurBoss » 08 Jul 2014, 09:53

simple euler rotation changer for all pieces
run it with no pieces selected


http://paste.springfiles.com/view/8e2e8013
0 x

9heart
Posts: 51
Joined: 16 Sep 2010, 16:14

Re: Blender animation export has been deployed!

Post by 9heart » 11 Dec 2014, 07:01

does this exporter require a particular version of blender?
0 x

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

Re: Blender animation export has been deployed!

Post by PicassoCT » 11 Dec 2014, 08:33

It runs on mine at home, which runs under XP..

But you will find it - difficult to use. Its one of those great tools, that by virtue of greatness show you how standalone they really are.

There is no decent exporter from upspring to blender, that preserves the pivots and so you have to redo it all again which is a anti-gain. It would be nice though. I mean, anarchid made the close-combat anims for zero-k with it.
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 11 Dec 2014, 14:05

does this exporter require a particular version of blender?
There have been no API changes in blender recently, so latest should be OK.

If it's not, it will be.
0 x

User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: Blender animation export has been deployed!

Post by enetheru » 26 Mar 2015, 08:55

i didnt know this existed till now.. good work..

the limitations listed in the github page cn be gotten around.. i have created a couple of issues on the tracker to say so..

but i'll copy them here for visibility.

firstly the object ZXY euler rotations stuff

Code: Select all

for i in bpy.data.objects:
    i.rotation_mode = 'ZXY'
thats it.

second.. you can create a constraint onto objects such as copy rotation and copy location and target bones.

1. so you have your objects in their object heirarchy.
2. you have a matching bone heirrchy
3. you apply copy rotation to each object and link the corresponding bone.
4. you apply whatever crazy inverse kinematics you want onto the bone rig and animate the hell out of it.
5. then object->animation->bakeAction

you get objects that are parented that have plain rotations that you can export.
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 26 Mar 2015, 09:37

second.. you can create a constraint onto objects such as copy rotation and copy location and target bones.
For the first five minutes i was thinking that it was the approach which i already tried, but now i realize that it... could actually work! Great idea!

TurBoss actually made the euler setter thing as a separate addon. I've been wanting to integrate it for ages, but somehow it hasn't happened yet.
0 x

User avatar
TurBoss
Jauria RTS Developer
Posts: 88
Joined: 27 Jan 2014, 01:04

Re: Blender animation export has been deployed!

Post by TurBoss » 20 Apr 2015, 00:59

quick and dirty addon for blener to change the Euler thing

https://gist.github.com/TurBoss/a08962ed9a44ca78ee9f

the addon appears in object menu


:)
0 x

User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Blender animation export has been deployed!

Post by Karl » 20 Feb 2016, 00:38

From:
https://github.com/Anarchid/blender2lus
You cannot have multiple animations per blender file. Blender's Actions system doesn't really accomodate for a horror soup of a dozen objects trying to dance in concert.
Not true. You can have very well have multiple animations, you do this:
1: Create a action
2: Animate it a bit
3: Apply to the action a fake user by clicking the "F" button, which causes the Action to be asigned to a Fake user and gets saved. As in it won't have a 0 at the end of it when no object uses this action.
4: Click the X button
5: Rinse and repeat.

One may want to name the action in this pattern: Objectname.Actionname so you can atleast see for what object it is and what type of action it should do, maybe something like this: Pump1.Slowpump Pump1.Fastpump etc... If there is alot of actions/objects it can get confusing, at least it's that the case for me.

If that phase is done you can go to the next phase by using the NLA editor.

The problem with that however is that Blender does that in a non "Elegant" manner as in you can not currently group all those animations easily and then tell Blender to use this animation group which automatically assigns to all those NLA objects to use the animations from the group. Or at least I am not aware of such kind of method.

Through did somebody tried if that plugin works with delta transforms? If not I am going to try it on my own then.
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 23 Feb 2016, 15:13

That part referred to the addon's ability to handle these. Actions work fine for armatures, but not so good for parent-child system animations.
0 x

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

Re: Blender animation export has been deployed!

Post by smoth » 24 Feb 2016, 11:09

Did we ever get y is up support, my friends program supported that durring his ludum dare project. So it is either blender doing it wrong on thier collada exporter is bugged
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 26 Feb 2016, 15:23

I think it's Blender's collada export.

One thing to possibly try if you want blender + Y_UP is to try godot's collada exporter instead of built-in. Godot is also Y_UP so you can get Y_UP for cheap this way.

I'm not sure the axis arrows point the same ways, though. Some might be inverted, so do test.

If that does work i might consider adding arbitrary euler order support to the addon, as i've figured out the math since then.
0 x

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

Re: Blender animation export has been deployed!

Post by smoth » 26 Feb 2016, 18:52

Tight, i have just been spinning my wheels herr so hopefully soon i can get back to work on spring stuff, i though i was good in jan but spring time is still the worse for my condition. I really would like to move to blender for my game so we can have a game 100% using collada.

Have you learned much about actual animation in blender? It is an area i know very little about.

Side question, did we ever find out if the promised model scaling feature of assimp worked?
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 28 Feb 2016, 22:00

Assimp scaling works for strictly uniform scaling. E.g. you dont always have to bake the node transforms into meshes, but sometimes you do.

What do you mean by learning actual animating in Blender? I've used it in anger for humanoid characters in both Gravitas and Area17, so i guess i can say that's figured out.

(And death animation for ZK's new strike commander)

There are caveats, of course, like you can't really use inverse kinematics in Blender without armatures, and you can't easily translate armature transforms into parent-child-hierarchy transforms, so you can't use IK for spring, but it still seems to beat the other methods by an aeon.
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 07 Mar 2016, 11:19

@smoth: i've tested Godot's Collada export addon for Blender in anger. The model is Y-up.

The scripts required no modifications whatsoever after that commit. The script for jammer has translate as well as rotate animations in multiple axes, so it would seem that the axes match well.

I'll try to find time to allow Y-up animation export for the addon. Or you might do the thing yourself if you get there earlier while wanting to use blender for animation; the math is actually quite simple.
0 x

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

Re: Blender animation export has been deployed!

Post by smoth » 07 Mar 2016, 23:25

That is great news. I have been sick for over a week now, hopefully this week I will get better. I am not supposed to be on the computer right now but hey that is worth it to see the news :)!
0 x

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

Re: Blender animation export has been deployed!

Post by Anarchid » 09 Mar 2016, 11:47

Waaaait....
+ <up_axis>Z_UP</up_axis>
Looks like i was too hasty with inferring Y_UP. But why is the script not broken!? Maybe it was already Z_UP...
0 x

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

Re: Blender animation export has been deployed!

Post by smoth » 11 Mar 2016, 08:46

so it had less to do with the z_isup in the exported file and more to do with the exporter? Wierd shit.
0 x

Post Reply

Return to “Art & Modelling”