PDA

View Full Version : Importing animation from blender



Philbert
03-06-2011, 12:33 PM
I found an engine model on Turbosquid that I could really use for this job and it's even animated, the problem is that it's a .blend file. Anyone know how to get the animated model out of Blender into LightWave? I've tried using collada, which sort of worked, but the model was rotated (Z up problem) and some of the animation didn't quite rotate properly, probably the same Z up thing I'm guessing. FBX didn't work at all, after loading the LW scene only had a null.

Even if I can't get it animated second best would be a way to export the model from Layout to Modeler with all of it's parts in the correct positions, When I tried this before all of the parts got moved to 0,0,0 I think I've seen a plugin that does this before. I know blender can save out an LWO but I got an error when I tried to load it into LW. Any ideas?

colkai
03-06-2011, 01:02 PM
Yep Z up is the normal problem, same when handling OBJ & 3DS files. Most other packages see X/Y as the 'floor' and Z as up, so the only thing I can thing of, which isn't elegant, but I've done it with MotionBuilder stuff, is to select all items, select all curves and shift them in the graph editor by 90 degrees. Or alternatively, parent everything to a null and then rotate that.
Dirty, but it can work.

Philbert
03-06-2011, 01:07 PM
I actually tried the null thing and it didn't work for some reason. The objects all jumped to different positions / rotations as soon as I touched the null. I'll see what I can do in the graph editor, thanks.

dwburman
03-06-2011, 01:14 PM
Could you bake the animation to an .MDD? I don't know if that would work or not.

Philbert
03-06-2011, 01:19 PM
Hmm... I'm not sure, I don't use .MDD much. Plus I'd rather it be editable later if possible, in case the client asks for changes.

Titus
03-06-2011, 01:42 PM
I found an engine model on Turbosquid that I could really use for this job and it's even animated, the problem is that it's a .blend file. Anyone know how to get the animated model out of Blender into LightWave? I've tried using collada, which sort of worked, but the model was rotated (Z up problem) and some of the animation didn't quite rotate properly, probably the same Z up thing I'm guessing. FBX didn't work at all, after loading the LW scene only had a null.

Even if I can't get it animated second best would be a way to export the model from Layout to Modeler with all of it's parts in the correct positions, When I tried this before all of the parts got moved to 0,0,0 I think I've seen a plugin that does this before. I know blender can save out an LWO but I got an error when I tried to load it into LW. Any ideas?

We work with LW and Blender, if you find a solution please be kind to share it :D.

Philbert
03-06-2011, 03:21 PM
I did note one thing, that when I load the exported Collada file it has a Motion modifier on it called RotationOrderConverter. I'm not sure what it does though.

Amurrell
03-06-2011, 05:43 PM
I've seen others rotate the model in Blender 90 degrees which ever direction it needs to go before exporting so when they import into their app it is the right direction. Have you tried that?

tischbein3
03-06-2011, 09:04 PM
As for blender 2.5 and lw 10.0, I didn't checked this method myself, but
it might be worth a try:

Try export via fbx, do _not_ use a parent null since lw will already do this.
Pay attention that blender will put the rest keypose on frame 1 and not 1,
so the first frame might look a bit weird.

Philbert
03-06-2011, 09:30 PM
I've seen others rotate the model in Blender 90 degrees which ever direction it needs to go before exporting so when they import into their app it is the right direction. Have you tried that?

No I haven't, that makes sense actually.



Try export via fbx, do _not_ use a parent null since lw will already do this.
Pay attention that blender will put the rest keypose on frame 1 and not 1,
so the first frame might look a bit weird.

Thanks I think I said above, I tried FBX and all I got was an empty scene with a null, nothing else.

Edit: wow rotating in blender actully worked, well at least it's facing the right way, the animation is still wonky, but I'm just happy to have a working model.

tischbein3
03-07-2011, 05:22 AM
Missed that, sorry.

Could you pm me the blend file ?

lightmann
03-07-2011, 09:11 AM
go with blend 2.49, you can export selection like a simple obj.
2.56 scripts have some rotation problems.

lightmann
03-07-2011, 09:14 AM
for animation you can go with mdd. only in 2.49. in this case probably you can need to use separate pieces.

Philbert
03-07-2011, 09:14 AM
I've got the model exported fine now, thank you. It's just a shame I couldn't save the animation. I also did have to flip some objects by 90 degrees. I do wish I could save out all of the objects in the scene as one LWO file though, the Collada conversion left me with 30 objects for this engine.

Like I said earlier I would prefer to avoid baking the animation in case my client needs me to change it.

tischbein3
03-07-2011, 10:53 AM
Ok this might be interesting for everyone there actually two actually two solutions wich seems to work:

Solution one:

- Using blender 2.49 fbx export, with the settings as seen in the attachment.

Solution Two in 2.5:
For whatever reason this seems to work only as for lw 9.6, and the latest blender builds (graphicall) . lw10 does only import fragments of the animation data

- Parent all objects to a Null/Empty in Blender (at 0,0,0 no rotation)
- Export Data as Collada
(according to the log, they did some fixes in the last few days)

As for the last I've actually unparented some stuff inside Blender, but I don't know if this had really some impact on this.

Philbert
03-07-2011, 04:52 PM
That's great, the FBX from 2.49 works perfectly, probably saved me a couple of days of work. I said thanks in the PM but thanks again.

lightmann
03-30-2011, 01:50 PM
Just in case using pontcache instead of rigs
check and follow this :

http://projects.blender.org/tracker/..._id=9&atid=127

for those interested in exchange mdd files with blender in 2.56+
its a point cache modifier that actually works (also pc2 support).

check the videos on this page :

http://www.ivogrigull.com/

im still searching the build that includes that patch .Any help welcome.