Blender Multiple animation, B3D exporter and Irrlicht

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
agnas
Posts: 20
Joined: Tue Mar 27, 2007 6:16 pm
Location: Venezuela
Contact:

Blender Multiple animation, B3D exporter and Irrlicht

Post by agnas »

This post is hard to decide where to insert as it has to do with game programming, advanced help, animations and so on. Anyway, here goes...
PART 1: BLENDER
I'm handling all my animations in a single timeline. It looks like this

Code: Select all

 
Start Frame End Frame Animation name
      1         30          idle 1
      31        60          idle 2
      61        90          Walking 
      91        120         Picking object
etc..
The problem is if I need to do some modification and one animation must be longer all must be modified.
The problem is explained here and solved easily in blender as you can create separate animations with the Action Editor pane, so each animation start at frame 1 and finish whenever needed. If one animation must be modified the others are not affected. So the blender part of the problem is solved.
PART 2 IRRLICHT
I'm using B3D as meshes format to do the export. The Gandalf export script doesn't care about multiple animations. It only export the first one. Also Irrlicht as far as I can see only handle the first animation too. I suppose I can do the modifications to the engine to handle multiple animation (or just concatenate the animations), my problem is in the gandalf script. As you know the plugins in Blender are writen in python and I really have trouble following how this code work. Also no idea how the multiple animations are stored in blender.

Anyone have any experience with all this? Any advise how to modify the export script to handle multiple animations?

Thanks a lot!!
/\+++/\
< agnas >
\/+++\/
micronosis.com
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Blender Multiple animation, B3D exporter and Irrlicht

Post by CuteAlien »

I'm surprised the gandaldf script still works for you as it was written for Blender versions before 2.5. There is another one from supertuxcart which might work better at: https://sourceforge.net/p/supertuxkart/ ... lender_25/

Not certain about which animations it exports, but maybe you have to select them all to have them all exported.
And inside Irrlicht you have to access them by their frame-numbers then.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
agnas
Posts: 20
Joined: Tue Mar 27, 2007 6:16 pm
Location: Venezuela
Contact:

Re: Blender Multiple animation, B3D exporter and Irrlicht

Post by agnas »

Thanks for your response. I have a version compatible with 2.71 with the changes by Marianne Gagnon. This new version of Vincent Lejeune include additional changes, it works but something is happening because now the exported .b3d file size is 50% less, not sure if something is missing, it look suspicious. Anyway it do the same, only export the first timeline and ignore any additional.
/\+++/\
< agnas >
\/+++\/
micronosis.com
sunnystormy
Posts: 105
Joined: Mon Jun 02, 2014 2:32 am
Location: Washington, D.C.
Contact:

Re: Blender Multiple animation, B3D exporter and Irrlicht

Post by sunnystormy »

Have you considered using Blender's built-in Direct-X ".x" exporter?

Irrlicht also supports animations in the ".x" format.

EDIT:

I think I see what you're talking about now... I don't think you can have two separate timelines and have the B3D format parsed in a way that will recognize both of them. The B3D Irrlicht importer (more than likely) will only recognize the first timeline associated with your B3D file. This is an issue that may have to be addressed in the Blender part of your content pipeline, and not Irrlicht. There's gotta be a way for you to move animations around in a single timeline without compromising other portions of it.
My blog: http://fsgdp.wordpress.com "The Free Software Game Development Pipeline"
agnas
Posts: 20
Joined: Tue Mar 27, 2007 6:16 pm
Location: Venezuela
Contact:

Re: Blender Multiple animation, B3D exporter and Irrlicht

Post by agnas »

Yes, correct I want to handle this in the exporter not in irrlicht, meaning the exporter must take the multiple timelines and generate one: 1..30:31..60:61...
and my irrlicht code remains unaltered.
There's gotta be a way for you to move animations around in a single timeline without compromising other portions of it.
Yes but exactly that is what I don't want to do. I want to use the multiple timelines because it's easier that way (see my original post). I have npcs with 16 animations, try to imagine what a mess should be make any modification to that. The multiple timelines in blender is a wonderful feature, so I want to take advantage of it. Also when my game is ready and I start to hire modelers and animators I won't have a face to tell them "sorry, no multiple timelines!!!".
/\+++/\
< agnas >
\/+++\/
micronosis.com
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Blender Multiple animation, B3D exporter and Irrlicht

Post by CuteAlien »

Yeah, that's a little tricky. Basically you have to split the mesh and the animations into several files on export. And in Irrlicht work with ISkinnedMesh::useAnimationFrom. So you have one basic mesh which exports the b3d texture nodes, brush nodes and mesh nodes but no animation nodes. And for each animation just the opposite - only export animation nodes and none of the others. You probably won't get around modifying the export scripts for that, but that might not be as hard as it sounds (it's just short python scripts which are often sometimes easy to adapt). Then in Irrlicht load them all into skinned meshes and apply the animations you need with useAnimationFrom.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply