Blender animation

Started by shadow, October 30, 2010, 03:09:04 AM

Previous topic - Next topic

shadow

I've searched a lot of forum threads now and decided to open this topic to ask it directly:

What are my possiblities to get a textured and animated blender model in JPCT, best with minimal effort?
Actually I do not get it running at all... but I see three ways and try to find out which one is working and which one could be the best and and maybe there are even more ways?

* In another thread I try to get it running with "Bones", skeletal animation for JPCT. There are two "sub possibilities" I see
   - Ogre MESH format, but there seems to be a bug in the Blender Ogre exporter
   - Collada, there I got Exceptions with my own exported blender model while using the ColladaSample from the bones  samples

* MD2 Keyframe animation. Here there is "JPCT advanced example", where a snork runs around, looks good. Can such an MD2 file created with blender? If yes, is there any further information how this can be done?

* Keyframe animation via JPCT Animation as it is described here http://www.jpct.net/wiki/index.php/Loading_3ds_Keyframes_from_Blender
   - this seems to be a stable option, but in my opinion it is a bit complicated. Or am I too demanding?

fireside

#1
This may be disappointing for you, but the last time I checked the Blender MD2 exporter, it had a bug in it also.  It may have been fixed by now because that was a while back, though.

It's a little hard getting set up the first time with 3ds frames, but once you do, it's just a repeat using the same functions, and it's a little more modifiable than md2.  It's easy to add more animations, etc, without redoing anything.  You just load the extra frames and name a new animation.  Actually, it really just works off the index order that they are loaded.  It's not completely set up for you like some engines, but that means you can set up things like ping pong animations, speed, etc, through programming.  I use an extended object3d class for each of my characters that contains animations and other things.  

On the skeleton, I think there may be something you are not doing, or it's possible it's a bug, but from what raft said, there wasn't information there and that would mean it wouldn't work on other engines, but it appears that people are using it for other engines from some internet searches I've done, so it might pay to do more research.  I haven't found anyplace where someone said the exporter just doesn't work.  Possibly try the Ogre forum, or try someones Blender exported model that works in ogre and see if it works with this importer.  Are you using 2.49b or the one in beta?
click here->Fireside 7 Games<-

raft

Quote
* In another thread I try to get it running with "Bones", skeletal animation for JPCT. There are two "sub possibilities" I see
   - Ogre MESH format, but there seems to be a bug in the Blender Ogre exporter
   - Collada, there I got Exceptions with my own exported blender model while using the ColladaSample from the bones  samples
can you post the exception you got?

Quote
* MD2 Keyframe animation. Here there is "JPCT advanced example", where a snork runs around, looks good. Can such an MD2 file created with blender? If yes, is there any further information how this can be done?
i once tried to use MD2 exporter for max and run into several problems. there are some programs like milkshape which can sucessfully export to MD2 but such programs cant compete with professional 3d editors like max, maya or blender.

Quote
* Keyframe animation via JPCT Animation as it is described here http://www.jpct.net/wiki/index.php/Loading_3ds_Keyframes_from_Blender
   - this seems to be a stable option, but in my opinion it is a bit complicated. Or am I too demanding?
so i ended up with a solution like this one. it's a good solution IMHO but requires a bit work as you noticed. especially exporting each keyframe from 3d editor is a tedious task.

all of the exporters i had tried since now sucks IMHO except OgreMax. that's why i suggest it if you have access to max.

raft

Quote from: fireside
but it appears that people are using it for other engines from some internet searches I've done, so it might pay to do more research.  I haven't found anyplace where someone said the exporter just doesn't work.
you have a point here. maybe it's because native ogre users use native (binary) ogre format, not the xml format.

@shadow
how do you create these mesh.xml and skeleton.xml files? directly export from blender as xml format or first export from blender to native ogre format and than convert to xml format?

if first one is the case, try second one. ogre has a command line utility OgreXmlConverter to convert from native ogre format to xml format. (and vise versa)

if second one is the case, try converting xml to native and then native to xml and feed it to bones and see if that helps.

shadow

I work with Blender 2.49b,
and I finally got my textured animated model running with Ogre MESH export and JPCT Bones! So this seems to be the best solution for me!

The collada exception I get:

30.10.2010 16:28:35 com.ardor3d.extension.model.collada.jdom.ColladaMeshUtils buildMesh
WARNUNG: No valid child found, creating 'cloud of points'
Exception in thread "main" java.lang.RuntimeException: Unable to load collada resource from URL: URLResourceSource [url=file:/home/floyd/projects/AntAttackJPCT/data/models/jessica_test2.dae, type=.dae]
        at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:154)
        at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:91)
        at bones.samples.ColladaSample.createAnimatedGroup(ColladaSample.java:55)
        at bones.samples.AbstractSkinSample.initialize(AbstractSkinSample.java:75)
        at bones.samples.ColladaSample.initialize(ColladaSample.java:75)
        at bones.samples.AbstractSample.loop(AbstractSample.java:85)
        at bones.samples.ColladaSample.main(ColladaSample.java:85)
Caused by: java.lang.NullPointerException
        at com.ardor3d.extension.animation.skeletal.SkeletonPose.<init>(SkeletonPose.java:47)
        at com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils.buildSkinMeshes(ColladaAnimUtils.java:300)
        at com.ardor3d.extension.model.collada.jdom.ColladaAnimUtils.buildController(ColladaAnimUtils.java:157)
        at com.ardor3d.extension.model.collada.jdom.ColladaNodeUtils.getVisualScene(ColladaNodeUtils.java:115)
        at com.ardor3d.extension.model.collada.jdom.ColladaImporter.load(ColladaImporter.java:134)
        ... 6 more
Java Result: 1



MD2 would be cool though, especially on slow machines or mobiles. I'm so fixed to Blender because I want to use open source software and I'm able to use it now, which was a long way :) ... and so its a pity that the MD2 exporter isn't working properly :/

The 3DS keyframe thing is cool, if the other things don't work.


fireside

#5
QuoteI work with Blender 2.49b,
and I finally got my textured animated model running with Ogre MESH export and JPCT Bones!

Good.  It might be nice to put some tips for using the exporter in the wiki or on rafts bones project section because I think you are the second person that had trouble getting it to work.

edit: Just saw your explanation in the bones section.  Thanks.  I might give it a try myself.
click here->Fireside 7 Games<-

raft

i see. seems as Ardor cant load your collada file. maybe this is also related to that "Weight Painting" thing.

AGP

The Blender MD2 bug is a ridiculous one that should've been corrected years ago. I remember changing like 2 lines in the Python script and it worked perfectly. Just Google it and you'll find the solution.