Jump to content

Can't seem to properly import a DAE into Torque


Recommended Posts

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:

http://imageshack.com/a/img922/5234/GZue5R.png

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:


http://imageshack.com/a/img921/852/BKllHJ.png


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

http://imageshack.com/a/img922/4046/sCHnTS.png


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.

Edited by Tiel
Link to post
Share on other sites

No dice, unfortunately. The one under development would've been cool, but doesn't look like it's finished yet.


Tried the BetterCollada - uhhhh


http://imageshack.com/a/img923/8302/FxLDHW.png


Not entirely sure what happened here haha. Animations still refusing to play outside of the shape editor even with console playthread.

Link to post
Share on other sites

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 , 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.

Link to post
Share on other sites
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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
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.

 

Got back from work and tried re-exporting stuff with that in mind, unfortunately, not much luck.


Once more the animations will play fine in the editor, but when it comes to actually use them in the game they won't trigger.


I tried grabbing a build of the current github development branch of Torque buuut the thing crashes whenever I try to load a level. Something something shaders.

Actually that's not just exclusive to my attempt at porting my project over. It seems like any new project with a build off the repository using the Empty template is doomed to CTD before loading the mission. Not sure why.


Put the files over into a new Full Template project, but again, no luck. Once you get it ingame it'll either be one animation 24/7 or none at all :/

Link to post
Share on other sites

Okay this is going to sound really dumb but I got it haha


I switched the shapefile in the datablock from the DTS to the original DAE file, and I guess we're in business! That didn't work before, I think the new export settings did the trick.


Thank you so much for your taking the time to assist. There's a lot of stagnant forums where questions like this get glossed over by disinterested members but I'm glad neither are the case here. Hopefully some day I'll have the opportunity to help someone as you've helped me.

Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...