Game Development Community

Blender Animations to Collada to Torque - Got it Figured out !

by Michael Flynn · in Artist Corner · 03/16/2012 (7:59 pm) · 3 replies

Hi,

I think I figured out how to do this finally!
After looking at the Solder animations in the FPS game, and playing with Blender I was
able to get some animation for my model into Torque from Blender 2.62

It's not pretty but it worked so far for my super simple model, OK it's a purple box.
My Boxy has no bones just animated Location Rotation frames.
First I created a box, OK simple, made it Purple with Clouds texture and applied it to the box.
Then I set Blenders mode to Animation (top of screen) and set it to Action editor.
I then added a new action named "utod" and the created a small animation of the box going up and down.
then I created a new action named "ltor" and animated the box going left to right
then I created a new action named "base" and did not move the box, so it would be my Base / Play Ambient animation

Now I selected my base action, played the animation to make sure it did what I wanted, then I just clicked
on file the export then Collada and saved it as boxy.dae

Then I selected my ltor action, played the animation to make sure it did what I wanted, then I just clicked
on file the export then collada and saved it as boxyltor.dae

Then I selected my utod action, played the animation to make sure it did what I wanted, then I just clicked
on file the export then collada and saved it as boxyutod.dae

So now I have 3 animated Collada models of the SAME box, if it had been textured then Blender would have saved the textures into the same folder in a sub folder called textures. And seeing that all the Collada models use the same textures cause ti's the same model it only saves them out once. so don't worry about re-saving/ saving textures.

Now in Torque.....

I am assuming you have saved all the animated Collada files with the textures folder into a shape folder in your Torque game. so follow me....

Now I imported/ clicked on mesh/art/shapes/"your folder" and selected my Boxy.dae model to load into my game.

Now there it is, but the importer only shows 1 Animation, that's OK just load him into your game.
Now select your new model and click the Shape Editor in Torque.

Your model will be shown along with the animations, which my base model has none except RootPose.
Under Sequence Properties....
Now click on the paper icon next to the floppy disk icon to add a new animation to This model.
it should pop up with the correct folder for your model if not navigate to the proper folder in your game.
at the bottom next to File Name, click DSQ Files and change it to Collada Files.

Now select the file that has a new Animation you want to add to your Base Model.
Mine would be "Boxyutod.DAE" to add the up down animation.
Torque auto names it mySequence1, now rename it to what animation it is going to be, remember to call
it something useful, I called Mine utod, again.
Now do you want it to LOOP when played? or play once, click the loop check box to select type of animation.

I don not know anything about how to do BLENDS, but if you figure it out TELL me!
I also don't know what to do with the Trigger's option, I know it lets you set a trigger but I don't know if
it's to trigger the animation or if it's to trigger something else when THIS animation is played?
(I think it's to trigger something else..)???

Now you should start seeing your list of animations grow with each added animated DAE file.
Last thing to do is click the Floppy Disc to Save the new Animated File.

Now for some scripting... Sorry I can't do scripting yet not that far into how to make data blocks and
stuff I know what a let down BUT i am hoping one of the more Knowledgeable member will paste a simple play
animation script, maybe attached to a some trigger block to play different animations for demo purpose?

This is what I have figured out so far, you pose your model creating animations in the Action Editor
then select each Action Event and save the file to Collada.

Remember all of your animations will still be in your Blender file .Blend so you can do all of the
animations in on file, but they will not save out to Collada and play in Torque, I wish I knew how
to or if it does let you save one file and the Torque pulled out the animations from the Collada file.
But I'v never got it to do more than one animation even with 5 animations in the Collada file.


I hope more users post some info on this here so whatever mistakes I made can be corrected, or added too, LOL.

Thanks,
Mike

#1
03/17/2012 (3:10 pm)
I sorry in my text above I should have used sequence instead of animation
after importing into Torque. In Torque you play sequence's of animations
for your models.

Thanks
Mike
#2
03/17/2012 (8:03 pm)
I still use the old dts exporter with Blender 2.49. It's nice to see a post on how to use the current version of Blender with Torque.
#3
03/17/2012 (8:46 pm)
Well, I'm new to Blender and 2.62 was recommended by Jonathan Williamson
from CGCookie.com.

They have hundreds of Tutorials for the following Modeling software:
Blender, Max, Modo, and the Unity Game Engine.

If you want to know how to model anything they have a video for your 3D program.

So this is a cobbled together Blender to Collada to Torque
thing that may not even work with more complex models??
This may not even be how to do it the right way, but seeing as I
can't find anything on it, I wrote this.

Thanks for the commit
Mike