Can't seem to properly import a DAE into Torque

Level design, models, animations, physics, etc.
  • 1
  • 2
12 posts Page 1 of 2
Tiel
Posts: 23
Joined: Tue Mar 01, 2016 11:39 pm
by Tiel » Wed Mar 02, 2016 7:49 am
Yooo, quick question here. I think, anyway.

I've been working on a project...etc, etc, long story short, I modeled a quickie adhoc model to see about getting animations into the engine. So far I've had very, very limited success.

The first thing I tried was a model I made a while back, one of the Emperor's finest:
Image
Unfortunately, after a handful of hours exploring Blender's rigging system (3DS user), Torque outright rejected me. Trying to import it with the Armature anywhere in the exported dae resulted in this:

Image

Download source files here for 'meh' imports

Basically, for whatever reason the camera in the shape editor spawned a distance of 7000 away. Outstanding! Even the editor fears the wrath of the fearsome Adeptus Astartes. But anyway, did some more experimenting before work the next day. What I found out was:
a) Importing with the armature anywhere linked in the dae export induced this problem
b) Unlinking armature created a successful import, but of course, as a shape, bones basically don't do anything
c) Shape imported without segregated bones via collada export options magic made any animation FUBAR
d) No change in scene organization fixed the issue (bip01, start, base, etc)

So I concluded the problem was my model. So, to cut my losses, decided to just grind some Blender exp and make a fresh model, bone it, and then try another go at getting something animated in Torque.

I introduce, cubeman
Image

Might be the dumbest thing I've ever made, but hell, I've got no time. Alright, so, got cubey here rigged, strictly adhered to the scene format I spend hours googling and cross referencing, and imported. Wow, did it work? Yes, it did! Ok, let's try getting an animation going.

Whelp. My first issue was that an animation put through Blender ended up appended with some random keyframes to get it back to the 'rootpose.' I mean, this would be cool and all, but when your Action's designed to flip flop and repeat they pose a problem, especially when they won't krekking go away. Tried modifying 'in' and 'out' boxes, but to no avail, Torque is that grandmother who insists you really need those cookies when it's just extra fat that makes crap look bad. Or Blender. One or the other, never was able to figure out where they came from but I suspect the former because of their dogged persistence.

I gave up looking for the source and just reluctantly modified the animation in Blender to return to the rootpose myself. Imported aaaaand, perfect! Animation looks about as good as 5 minutes in the dopesheet can be. Pray tell, what could my next problem be?

For the sake of time I'll just condense the issues I've been trying to resolve, they're pretty related anyway. Essentially, when I try using my new model,
a) the animation exported with it in the DAE will keep playing. Importing other sequences doesn't matter, if it came in with any animation attached that's the one it wants to play 24/7. Very picky and sheltered imo, just saying.
b) exporting just the rigged model without any animations to then import other DAE files as just sequences results in nothing being played at all. Like, names don't seem to matter. In the zip below CUBEMAN5 has a defined 'root' and 'run' sequence but refuses to use either. Levitation is cool I guess but I need you to listen to me, bruv.

So this is a no-win situation. Here's a zip with the CUBEMAN source, dts, and tscript files.

So the crux of my question becomes: how do I successfully import animations via Blender DAE into Torque3D?

Thank you kindly for any responses.
Last edited by Tiel on Wed Mar 02, 2016 8:06 am, edited 1 time in total.
Tiel
Posts: 23
Joined: Tue Mar 01, 2016 11:39 pm
by Tiel » Wed Mar 02, 2016 8:03 am
I also tried a DTS exporter updated for Blender 2.76 in the hopes that would magically fix my problems, but naay, I say. Couldn't export a thing on account it doesn't seem to support boners.

Hmm. You know, I couldn't get my precious space marine in because of the linked armature. Coincidence? Are boners forbidden?
Tiel
Posts: 23
Joined: Tue Mar 01, 2016 11:39 pm
by Tiel » Wed Mar 02, 2016 3:32 pm
No dice, unfortunately. The one under development would've been cool, but doesn't look like it's finished yet.

Tried the BetterCollada - uhhhh

Image

Not entirely sure what happened here haha. Animations still refusing to play outside of the shape editor even with console playthread.
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Wed Mar 02, 2016 8:40 pm
hm... try resetting the scale/pos/rot of everything with shift a maybe? Also get rid of any shapekeys and use loc/rot/scale for keyframes.
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Wed Mar 02, 2016 8:53 pm
Imported the cubeman dae and it seems to work just fine for me. What version of torque are you running?
Tiel
Posts: 23
Joined: Tue Mar 01, 2016 11:39 pm
by Tiel » Wed Mar 02, 2016 9:14 pm
Are shapekeys bad, then?

What I've been doing is

1) Rig model with armature bones
2) Create armature modifier on base mesh and link to previous
3) Open up Action Editor
4) Set a 'Whole Character' keyframe at '0' and enable auto keying
5) Adjusting the frame and moving bones around in 'Pose Mode'

Blender automatically saves the transformations into an Action under the Armature object. From there I can create a new Action, but this will bury the previous one and make it invisible upon ShapeEditor import.

When I use Blender's COLLADA export on a .blend file with the Action (per above), I kept to the default settings.Apply modifiers was on, as was ShapeKeys. Disabled Triangulation. Importing this into Torque gives the problem I'm dubbing the Eternal Animation. Basically you get the <rootpose>, and the animation you exported as a sequence called 'ambient'. Again, doesn't matter what you rename it, it'll just play. Always :shock:

Conversely, if I COLLADA export with 'selection only' and 'with children' with just the mesh...I just get the mesh, heh. Doing it with the Armature and exporting NO action/animation data results in what you'd expect - just a rigged model. But if you try to add sequences by using animation-only DAEs or even by just DAEs exported with the mesh data intact, they'll show up fine in the ShapeEditor but don't want to trigger ingame.

But throughout it all I've always kept ShapeKeys on in the COLLADA export. Could that really be the problem?



Edit: I am running the latest release build. Win32 3.8 binaries and package. Do you think it would help if I compiled a development build? Also, cubeman does import just fine in the shape editor, but try using it in the real game and see if the sequences play, if you would.
SqHd
Posts: 55
Joined: Tue Apr 14, 2015 5:02 am
by SqHd » Wed Mar 02, 2016 9:16 pm
You could try this thread from our forums called:
Blender: Better Collada (DAE) Exporter
Based on the thread it sounds like it has some great DAE export options for animation.

Or this one by our own JeffR:
Blender: Collada Animation export plugin
It's new and in development, but seems to have some promising animation export features.
Tiel
Posts: 23
Joined: Tue Mar 01, 2016 11:39 pm
by Tiel » Wed Mar 02, 2016 9:20 pm
SqHd wrote:You could try this thread from our forums called:
Blender: Better Collada (DAE) Exporter
Based on the thread it sounds like it has some great DAE export options for animation.

Or this one by our own JeffR:
Blender: Collada Animation export plugin
It's new and in development, but seems to have some promising animation export features.



I've had luck with neither, but thank you for the recommendation. Once I figure out what I'm messing up here I'm sure they'll come in handy.
newaged
Posts: 31
Joined: Sat Feb 14, 2015 12:27 am
by newaged » Wed Mar 02, 2016 9:47 pm
I never used them outside of the shape editor, but importing and playing the animations worked fine for me. Creating a new project using the dev branch could help, this isn't the first time someone has reported the prebuilt binaries doing things they shouldn't.

For future reference - torque does not support shape keys from what I recall, its probably best to disable those. Torque needs triangulated meshes but isn't the best at triangulation, its best to let the modeling program do that when exporting. Use translocrot when exporting with the stock exporter, not matrix.
  • 1
  • 2
12 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest