PDA

View Full Version : Exporting animation to game engine



VirtualFM
08-14-2010, 08:14 AM
Hello!

Recently I've been asked to make some game characters animations for use inside a 3D game.

This is going to be an online game and the engine they are going to use is Away 3D (http://away3d.com/)

Importing objects doesn't seem to cause much problems as it loads OBJ. But my problem is in getting animation there!

The Away3d documentation says it imports Collada and MD2 files, which support animation. Well, I was very enthusiastic about this as the latest version of Lightwave now imports and exports Collada... right?! ... RIGHT?! That's what is said in the documentation!

So I started to do some experiments and I am completely mad and screwed! First I got mad... then I realized I was screwed!

My first tests showed me that exporting an animation in Collada and then importing it, would make a mess of my bones and animation!

So I am here asking for help: did anyone try to export LW animation into Away3D (or any other game engine that uses Collada)? What about MD2, is there a plugin or something that can export animation into MD2?

I didn't want to use other program, as I am not proficient with them animation-wise. I also thought about exporting animation using FBX, load those in Maya/Max and try to export to Collada from there... Did anyone try this? Or has anyone found a workflow that works in this cases?

Or are we still in hell when we want to use LW with game engines? Should I just drop LW for animation in this project and apply my energies in Max/Maya/whatever?

Thanks a lot for any help

Danner
08-14-2010, 09:47 AM
MD2 is the quake II object format, I did a few animated characters using this just for fun a long time ago..

I used this plugin I hope it still works with current LW

http://www.troggpond.com/lwtools/md2/index.html

VirtualFM
08-16-2010, 11:15 AM
Thank you for your help. It took a while to put those to work but I think I finally made it. Strangely when reading the MD2 into another program, the animation is there but it is slow-motion and looks like it has about 3 times the number of frames (the LW animation had animation 1-50 and I got a 147 frames animation that runs in slow-motion) Those were the best results so far and am not exactly thrilled with them!

I am very disappointed at the Collada implementation in Lightwave... if we can call it that! It's not only a matter of being useless when it comes to export of animation (bones get out of place, animation gets screwed) but the object itself had the UVs completely scrambled!

When I read, and I quote form the Lightwave3D.com site, "Import and export of Collada and FBX scenes is provided, as well as import/export of Collada objects. Meshes, materials and animation information are supported for FBX and Collada. Import is transparent using the standard Load Scene and Load Object commands, and export options are made available on the Export menu.", I expect that at least SOMETHING works! But it looks like someone made a test with a cube and it worked, so he extrapolated that it would also work with 142 objects interconnected in an hierarchy with 500K polys.

I'm just saying, because of course my test was not with such objects... it was a simple object, just one layer, one UV texture, about 36 tris. It was like "one cube with one leg" animated with 4 bones! Not rocket science here! But the result was incredible... incredible like Lightwave 9.6 is out and announced since 2 years ago or whatever and that thing, announced as working easily and flawlessly, is just unusable! It's just a plugin, for God's Sake, can't you fix and release one plugin? No need to launch Lightwave 9.6.1a, just fix the "#$&"#%&$# Collada export plugin!

I also tried to export as FBX... I thought i could export to FBX, read ithe animation in other program, like Max or Maya, and then export from there to Collada, since they are more suitable for those things... But unfortunately got no luck with FBX either! This may be a problem on my system configuration, but exporting to 9.6's FBX (the one where we can choose which FBX version and all) nothing get's saved. I used the older FBX plugin and it exported, but deformed the original object into a crunchy mess. This experience is causing me a nervous breakdown!

With that out of my chest, has anyone used Lightwave with game engines and been able to export to them? If so, how? Or is Lightwave really NOT used at all in the game industry? Ok, I know it's used with Unity...

Lamont
08-17-2010, 12:47 AM
With that out of my chest, has anyone used Lightwave with game engines and been able to export to them? If so, how? Or is Lightwave really NOT used at all in the game industry? Ok, I know it's used with Unity...Lightwave is used rarely since I have HeadusUV when Maya UV mapping doesn't do it for me. Otherwise it's all done in Maya. I've tried to do 100% LW work from first poly to final product. But the Collada/FBX format is just busted, smoothing is busted, multiple UV's are busted and vertex colors are busted. I don't have the support of a programmer to kick out custom plugins for projects. It's just a huge pain that lucky for me I don't have to deal with anymore thanks to Maya.

Every once in a while I boot it up to make something using a plugin, but other than that.:devil:

collada
08-17-2010, 05:13 PM
Importing into Maya may be part of the problem?
What importer are you using?

Autodesk by default provides a COLLADA importer, which converts first to FBX, and then to Maya, which is double the chance to run into trouble, and certainly would expose the same limits as the FBX importer.

Have you tried the OpenCOLLADA import/export http://opencollada.org/download.html for Maya?

Also, I am curious about the quality of Lightwave export. If you want you can send me some exports that I can analyze for you. colladaduck (at) gmail.com

Lamont
08-17-2010, 05:27 PM
Between Maya and LW it's OBJ format. Very predictable. Maya to Unreal/UDK/Unity or whatever, FBX/DAE. Had no problems, even with skinned meshes, custom normals, object name, multiple UV's and vert colors.