Game Development Community

Ridiculous Blender animation export

by Daniel Buckmaster · in Artist Corner · 07/02/2013 (7:00 am) · 5 replies

I'm trying to export a very simple Player from Blender. The player is a cube and an armature, set up in the usual parent-child relationship, The armature has a root node, an eye node as a child of the root node, and then there are mount0 and mount1 nodes that are children of the eye node.

I made a simple look animation that rotates the eye node. Since the mounts are children of the eye node, they end up rotating and moving as well. It looks perfect in Blender, whether it's just three frames or if I stretch it out to 100 - the eye node rotates with linear interpolation and looks perfect.

When I export it, it gets all messed up. It's nearly there - but there little imperfections sneak in. If I make the source animation three frames long, then I get little wobbles in the animation as viewed from the first-person perspective. Even though the mount nodes should be locked to the eye node, they seem to wobble about a bit as the animation progresses.

If I stretch the animation out, the eye node goes crazy - it scales in and out, randomly stops rotating halfway through then continues on a bit later, super-fast.

Just wondering if anyone else has seen issues like this. It's like the rotation is being exported in the wrong channels (hence the scaling) or something. It's really pissing me off, for what should be a blindingly simple task! I'm pretty sure these are all Blender Collada issues, not Torque issues. Just wanted to see if anyone knows the causes or can recommend a workaround.

(Don't even get me started on how long it took to get an animation exported at all...)

This is Blender 2.67b and T3D 3.0, by the way.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
07/02/2013 (7:08 am)
well if you would supply us with the blend i could exactly tell you whats wrong

and yes the rotation is probably wrong and regarding scaling
by import into T3D you have the option to center the model to the floor
if it isnt along with that you can change the direction its facing
and along with that you can ofc change its scale

but what i think you did is that you weighted the eye node
and that is = wrong

since the eye node along with the cam nodes
shouldn`t be weighted

only the bones that are actually deforming the character should be weighted

and on a sidenote
am on the way to finish up the puppet stage1
thing
github.com/J0linar/Puppet-T3D
except some fail commits to test my githubish
and the puppets textures - there is actually no model yet
since i tested some approaches
and well being busy with other stuff wasn`t makin this easier
so look out for a blog around this weekend
puppet should be done by then
#2
07/02/2013 (7:35 am)
Hurrah, I actually can't wait for your puppet!

I've uploaded the blend to my Dropbox. This is the version with the 3-frame animation. I'm using it at the moment by importing it, then adding a new blend animation called 'look' in the shape editor, and setting it to blend of the main animation on frame 2. Which looks completely wrong in the shape editor but for some reason works as an arm animation.

Beginning to suspect that the arm animation system is also a bit to blame here. I don't remember it requiring blended animations! But if I make the look thread non-blended, it doesn't work...
#3
07/02/2013 (7:55 am)
1st the roation in Blender is correct
however it is not in T3D since
for T3D it has to be rotated 180 degress
so before export press 7 on the numpad and change it to top
then select all and press R and 180 to rotate your whole model to face the opposite direction

tbh when lookin at the blend i tought
ye that`s the approach of someone who trys to understand it with math
but there is no real math here

look you have parented the mount noudes to the eye node??
what do you expect it todo^^

i mean the eye node should not be the ruling bone here seriously
if you want to attempt this again
then just grab a armature from somewhere - blendswao has plenty
and just weight some funny cubes to it
but the eye and came nodes - aren`t ment to be the controlling bones
they are only there to tell T3D from where to setup the look in the engine
thats it

now another thing? why did you started your animation at frame -1
anyways - check out those video tutorials
www.youtube.com/watch?v=7xYiKsl_6Sw
and
www.youtube.com/watch?v=4yiC6pEQMAw

that should give something todo till the puppet jumps out of the box

now don`t feel like am trolling you here
i know and understand the issues ppl have and get when tryin to get a animated model from blender in T3D
and ye that is why am goin to shed some light

there will be some more things to come
such as
exporting objects with animations
for example doors
and ofc the puppet thing will continue
#4
07/02/2013 (9:02 am)
I know my rig is a bit crap, but should that be causing animation problems? I know the engine doesn't actually ever use the eye node's rotation, just its position. The real reason I attached the mounts to the eye is because that's how I want them to behave. I just want the guns in the corner of the screen with a fixed offset.

As for the rotation... I don't think that's been an issue. In Torque, forwards is +y. If I just export the shape with no bones (but with the 'hand' cubes) it comes out in the right orientation.

You're not trolling at all! I appreciate the attention!

EDIT: Oh, I started at frame 0 because that way there isn't a dead frame at the start of the animation in the shape editor :P. Torque seems to expect animations starting from 0, whereas Blender usually starts them from 1.

EDIT AGAIN: Also, I think I have a reasonable grasp over animation in Blender. I tried to set this rig up using the NLA editor, but no animations would export. The only way I could get any animation to export was to just chuck it in a single action with nothing in the NLA editor.
#5
07/03/2013 (4:06 am)
ye but you are not supposed the weightpaint stuff to the eye node
this way you get weird stuff - stuff that shouldn`t happen

and you are supposed todo the other stuff in script
function SoldierDAE::onLoad(%this)
{
   // BEGIN: Default (Lurker Rifle) Sequences
   %this.addSequence( "./Anims/PlayerAnim_Lurker_Back.dae Back", "Back", 0, -1);
// the 0 get`s changed to -1 - that is exactly the same what you did
// in Blender

ofc you can do it already in blender but i don`t see a reason why
as at the end you will have to add stuff to the models.cs anyways

ye the animation stuff in T3D
is a bit weird
i mean i exported animations baked and not baked in
and both worked - tbh dont`really understand why there is even a need for baking them in

hmm about the rotation i have setup the puppet to face already T3D`s
direction so that we can ensure a drag n drop of characters when working with it

i doubt that is helpfull if ppl have to rotate and scale the armature to fit their model
it should be the opposite
take your model and scale it to the puppet/ its armature
and weightpaint it/ export and done

now am investigating what the best way would be regarding the animations
i hope to be able to use Blenders .bvh export
so that ppl can create animations and exchange those
and easily use them on their model
will see how it goes