I am using OvermindDL1's Blender exporter to make a deploy animated model, but I can't get it to work in game (no errors, it just won't show up). It was originally supposed to be an aircraft but I've tested the model as at turret ingame and the animation still doesn't play. The model shows up properly, skinned and all, but the animation is simply not there. No errors either, it just doesn't do anything.
I've looked at Fishbone's website but that didn't really help much, as it only provides a basic example of an SI_AnimationKey and doesn't really explain how to use it if I want to do the animation freehand. So can anyone either a) teach me how to do animations in Notepad, including whether it's possible to do several motions (say translation and rotation) at the same time, or b) explain how to make it all work with OvermindDL1's exporter without getting into notepad copy-pasting (probably impossible, but worth asking), or c) a combination of the two. Links to tutorials where this is explained in an understandable fashion are also greatly appreciated.
Thanks!
Don't know anything about the blender exporter. Post xsi animation section and odf animation entry's here.
a. yes, yes
b. no.
c. don't know of any tutorials.
+d. don't save animated models with threed.
Ok, here's the AnimationSet portion of the XSI. There's four moving parts - two wing struts that just rotate and two wings that move and rotate at the same time. I've also included a picture of what the model is supposed to look like in its deployed/undeployed state. Also, the animation is untouched from how it exported from Blender.
(http://img36.imageshack.us/img36/3973/aircraftundeployed.th.png) (http://img36.imageshack.us/i/aircraftundeployed.png/)(http://img268.imageshack.us/img268/9333/aircraftdeployed.th.png) (http://img268.imageshack.us/i/aircraftdeployed.png/)
AnimationSet {
Animation anim-wing_strut_l {
{frm-wing_strut_l}
SI_AnimationKey {
3;
4;
1; 3; 0, 0, -1;;,
31; 3; 0, 0, -1;;,
1; 3; 0, 0, 0;;,
31; 3; 0, 0, -7;;;
}
}
Animation anim-wing_l {
{frm-wing_l}
SI_AnimationKey {
3;
6;
1; 3; 1, 1, -1;;,
14; 3; 2, 2, -1;;,
31; 3; 1, 2, -1;;,
1; 3; 0, 0, 0;;,
14; 3; 0, 0, 5;;,
31; 3; 0, 0, 14;;;
}
}
Animation anim-wing_strut_r {
{frm-wing_strut_r}
SI_AnimationKey {
3;
4;
1; 3; 0, 0, -1;;,
31; 3; 0, 0, -1;;,
1; 3; 0, 0, 0;;,
31; 3; 0, 0, 7;;;
}
}
Animation anim-wing_r {
{frm-wing_r}
SI_AnimationKey {
3;
6;
1; 3; -1, 1, -1;;,
14; 3; -2, 2, -1;;,
31; 3; -1, 2, -1;;,
1; 3; 0, 0, 0;;,
14; 3; 0, 0, -5;;,
31; 3; 0, 0, -14;;;
}
}
}
The ODF entry is just:
animCount = 1
animName1 = "deploy"
animFile1 = "ivlbbra.xsi" <-- this being the correct filename
Also, the blender exporter was exporting the model as UV Wrapped (mode 4) instead of unwrapped (mode 3), so I saved it it Threed (Which fixed it) and copy-pasted the material data from the threed'd file into the original (this made it work properly in game).
QuoteAnimationSet {
Animation anim-wing_strut_l {
{frm-wing_strut_l}
SI_AnimationKey {
3;
4;
1; 3; 0, 0, -1;;,
31; 3; 0, 0, -1;;,
1; 3; 0, 0, 0;;,
31; 3; 0, 0, -7;;;
}
}
You have the same frame numbers twice.
I tried fixing that by changing the animation data to AnimationSet {
Animation anim-wing_strut_l {
{frm-wing_strut_l}
SI_AnimationKey {
3;
2;
1; 3; 0, 0, 0;;,
31; 3; 0, 0, -7;;;
}
}
Animation anim-wing_strut_r {
{frm-wing_strut_r}
SI_AnimationKey {
3;
2;
1; 3; 0, 0, 0;;,
31; 3; 0, 0, 7;;;
}
}
}
and it still wouldn't show up in game (I cleared my BinData folder even though I don't think that's necessary when using the editor). I removed the other two parts of the animation (for the wings) entirely for testing purposes, since I think the double keyframes are a result of the exporter trying to put both the rotation and translation in a single AnimationKey, and the wing struts are only supposed to rotate (whereas the wings move and rotate). I have no clue what's going on with this, and I've as yet been unable to successfully make a completely custom animation :-( (I have mastered the art of the power turbine, but that got boring very quickly).
If you're doing rotation animations, you may need to also have position keys where there are rotation keys, even if the objects don't move in relation to the parent objects.
What is probably stopping it from working is this
SI_AnimationKey {
3;
Bz2 only uses
SI_AnimationKey {
0;
The number 0 tells bz2 that this is a rotation animation.
OR
SI_AnimationKey {
2;
The number 2 tells bz2 that this is a translation animation.
The example below is of a working rotation and translation anim.
AnimationSet {
Animation anim-hp_lfoot {
{frm-hp_lfoot}
SI_AnimationKey {
2;
8;
1; 3; 2.0, 0, 0;;,
3; 3; 2.25, 0, 0;;,
6; 3; 2.5, 0, 0;;,
9; 3; 2.75, 0, 0;;,
12; 3; 3.0, 0, 0;;,
15; 3; 3.25, 0, 0;;,
18; 3; 3.5, 0, 0;;,
21; 3; 3.75, 0, 0;;;
}
SI_AnimationKey {
0;
8;
1; 4; 1, 0, 0, 0;;,
3; 4; 1, 0, 0, -0.025;;,
6; 4; 1, 0, 0, -0.05;;,
9; 4; 1, 0, 0, -0.1;;,
12; 4; 1, 0, 0, -0.15;;,
15; 4; 1, 0, 0, -0.2;;,
18; 4; 1, 0, 0, -0.25;;,
21; 4; 1, 0, 0, -0.3;;;
}
}
Bz2 will not recognise the 3 value as a type of animation it can do.
Notice that the rotation part has 4 values per line.
I do all my anims in notepad, you just paste in another section like the above and adjust to achieve the desired effect.
It worked! :-D Thanks for the help! That makes a lot of sense and would explain why none of my other animations worked either - the Blender exporter appears to export everything with the 3.
After a bit of research, I have found an explanation of how BZ2's rotation works, along with an applet for converting from XYZ (Euler) rotation to the BZ2 format.
Java applet is here: http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/program/index.htm (http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/program/index.htm)
Complicated math is here: http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm (http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm)
Hopefully if anyone needs this information they will find these links useful.
I am so glad you did not ask me to explain it, +1 karma!
That first link causes firefox to stop responding...
The link worked fine for me, but the thing is a java applet, so it may be a java-related problem. It says you need at least Java 1.3 and to have to have Java code enabled in the browser, but I guess putting that on the same page as the applet is somewhat fail on their part.
When I was programming Java 2 years ago we had Java 5 so...
FF sometimes freezes with Java applets.
QuoteIt says you need at least Java 1.3
Ah yes, now I recall, deleting a whole bunch of java folders, in an attempt to free up disc space on my c drive... :-D. yes I know! Damn automatic downloads! Why can't the ask me where I want it to go!
That would have been your core Java API... The thing that does everything.
Well if they had the decency not to keep uploading partial upgrades (1.1, 1.2 1.3 etc) onto my small c drive without asking whether I want it there, then I would not have had to delete the older ones, hoping that the newer ones contained all required, clearly they don't...Never mind, when I find its a problem I,ll fix it somehow.
edit: uninstalled all Java stuff, down loaded java again and installed, recovered about 400Mb of disk space, still have to install to c:...
Mine asks, and it should remove old versions.
EDIT: Did you get just the runtimes?
Not a clue. Just went to java.com and did a dl.
The java applet now works.
Kudos to G and MTS...I now have a reason to start using Blender. Special thanks to OM1 for taking the trouble to make an XSI that will indeed do animations with only a slide edit required to get it functional. Hopefully OM1 can revise the exporter slightly to get the exporter is use by many eager modeler's just itching for a way to do animations finally! PS: I haven't gotten this excited in quite some time ya all!
Update: Blender released version 2.49 which I updated to from version 2.45. One side note would be: to use 2.49 then Python version 2.6.1 is required in addition to get the OM1 XSI exporter to run without a console error; as I found out the other day. Now...gulp...all I need to do now is...umm...learn how to use Blender...no easy task, but well worth the effort to do animation I would think? Perhaps I'll use TS 7.6 to make the models and then import them to Blender. Does anyone know what format B3d can import with animation? I can export out of TS with X, COB, 3DS, ASC, CAN, AND STL. Tanks, BNG.
For people wanting to learn blender, here is a collection of pretty good (and long) video tutorials; this is where I learned blender from.
http://blenderunderground.com/video-tutorials/ (http://blenderunderground.com/video-tutorials/)
QuoteDoes anyone know what format B3d can import with animation?
Blender can import .x and .3ds out of the box (don't know about animations, haven't tried). It can also import BZ2 XSI files' meshes with its .x importer. However, I wouldn't recommend using Blender to do animations just yet because OM's exporter does not export them properly.
I tried importing an X model into Blender made with TS 7.6, but the result was horrible. The model parts were all screwed up lookin.
The good news is that 3ds models exported from TS imported perfectly from what I could tell into Blender. What I plan to try next is some simple animations in TS (as I understand it far better then B3d) export it as 3ds, import into B3d, and then try exporting the finally animated model using OM1's XSI exporter to my addon folder.
Hopefully, I'll be able to get animations done an easier way then actually learning to model with B3d right now; TS is a much simpler modeler to learn for modeling idiots like myself. Knock on wood peeps...here goes nuthin'. I should be able to most of the work in TS like the texturing, animation, and model geometry. Eventually, I'd love to learn Blender, but it's a pretty complex piece of software, and still makes my brain ache whenever I attempt to model with it. PS: Here's a screeny of a model made in TS and exported as 3ds and then imported into B3d.
(http://peq8dw.blu.livefilestore.com/y1pZpDpsoJhoiriQfgEyMd1VOzc4VbLQoQj06-f5C0y_0vodBeIyBKcH6Rd5dumNwWoxY-C6ZzbhJodq1xEjsvmUYqzl-fKH66X/tsb3dmod.JPG)
i find creating animations in notepad far easier XD
Strange, the camo texture applied in TS doesn't show up in B3d for some reason. I wonder why?
Update: I'm not sure why the texture didn't appear before, but I reapplied another texture and resaved the model again as 3ds and then imported it again into Blender and it appeared okay this time. It would seem that B3d is going to be a nice choice for using to get my animated models working for BZII afterall.
Possible work flow:
1. Model, texture and animate in TS.
2. Export from TS as 3ds format into my BZII addon folder.
3. Open B3d and import 3ds model.
4. Export from B3d using OM1's export script into my addon folder.
5. Edit XSI file in notepad to fix problem noted by MTS and resave file.
6. Edit odf file and test in BZII map editor.
I guess the easiest animation to start with would be a single animation count type to begin with.
Quote from: mrtwosheds on August 25, 2009, 11:51:28 AM
What is probably stopping it from working is this
SI_AnimationKey {
3;
Bz2 only uses
SI_AnimationKey {
0;
The number 0 tells bz2 that this is a rotation animation.
OR
SI_AnimationKey {
2;
The number 2 tells bz2 that this is a translation animation.
The example below is of a working rotation and translation anim.
AnimationSet {
Animation anim-hp_lfoot {
{frm-hp_lfoot}
SI_AnimationKey {
2;
8;
1; 3; 2.0, 0, 0;;,
3; 3; 2.25, 0, 0;;,
6; 3; 2.5, 0, 0;;,
9; 3; 2.75, 0, 0;;,
12; 3; 3.0, 0, 0;;,
15; 3; 3.25, 0, 0;;,
18; 3; 3.5, 0, 0;;,
21; 3; 3.75, 0, 0;;;
}
SI_AnimationKey {
0;
8;
1; 4; 1, 0, 0, 0;;,
3; 4; 1, 0, 0, -0.025;;,
6; 4; 1, 0, 0, -0.05;;,
9; 4; 1, 0, 0, -0.1;;,
12; 4; 1, 0, 0, -0.15;;,
15; 4; 1, 0, 0, -0.2;;,
18; 4; 1, 0, 0, -0.25;;,
21; 4; 1, 0, 0, -0.3;;;
}
}
Bz2 will not recognise the 3 value as a type of animation it can do.
Notice that the rotation part has 4 values per line.
I do all my anims in notepad, you just paste in another section like the above and adjust to achieve the desired effect.
Tanks MTS for pointing out this so OM1's exporter can be used with B3d and I suppose any 3d modeler to convert model files to BZII XSI animated models after importing them into Blender.
:-)
I like doing things the hard way, you find out allot that way, maybe one day I will learn how to use blender too...
hahaha, yah, blender was hard for me when i tried.
Hard but definitely worth it.
Up until OM made his' XSI exporter I saw no reason to learn Blender as it's an advanced high poly 3d modeling program way more capable then making the low poly models used by BZII. I plan on sticking to TS for most modeling tasks as it's 100 times easier to make stuff with then Blender. I eventually will learn some aspects of it too, but give me simplicity and I'll be your loyal friend forever. :-D