How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.
After much frustration and almost giving up many times I have finally managed to get what some people would refer to as a 9pose working in game. What it is really is a new animated postion when entering a vehicle.
The vehicle in question is the bicycle I made Dann for Pepperland. The following is a short video of it in game. Yes I know the pedals don't move and yes he is pedaling all the time but hey at least it looks cool
Brilliant! Nice work Frag.
In the video your 9pose pilot animation loops constantly regardless of the vehicle moving or not.
Notes*
You've got 2 types of 9pose animations, one for pilot animation and then you have another for hover/flyer vehicles called in the ODF as a FinAnimation, how 9pose (FinAnimation) are setup is a mystery and most likely the way you would get the pedals to turn and the pilot animation to play in sync when the vehicle moves.
Examples of 9pose pilot animations in the assets:
human_minigun_9pose.msh
human_barc_9pose.msh
human_speederbike_9pose.msh
Those animations don't loop when used ingame, they almost seem to be controlled by how the vehicle or turret is aimed or driven (when pilot is exposed) , the speederbike and barc speeder have their own 9pose animation files that are activated by certain movements (forward,backward,left to right)
The minigun_9pose almost seems to move based on the pitch properties set in the turret ODF like a dynamic animation, although the 9pose animation itself has a min and max movement up and down.
There doesn't seem to be a connection with the vehicle 9pose and the character 9pose animations, one example would be all_fly_snowspeeder.odf, the pilot uses the
Wow! Very nice work Frag.. You won't expect much from me, but I'll take a look into it, the 2 different anims..
Edit:
How to make a working riding/driving/9pose animation *Before you start, get a clear understanding of THIS tutorial
Chapter one; the unit
1. Import unit_template into your scene and make your animation of the unit 'handling' the vehicle.
You will need to remove all animation from the bones before you can start posing the skeleton.
2. Follow these rules for the 9 poses:
Frame 0 is forward, turning left
Frame 1 is forward
Frame 2 is forward, turning right
Frame 3 is strafe left
Frame 4 is the basepose/idle
Frame 5 is strafe right
Frame 6 is backwards, turning left
Frame 7 is backwards
Frame 8 is backwards, turning right
Start by keying frame 4 first, since it will be the easiest to set up. If you already have a vehicle in your scene with a 9pose animation then you can match your unit animation with the vehicle animation so they'll sync up ingame.
3. Exporting the animation with the Pandemic Tools:
Remove the unit geometry from the hierarchy, we only need the skeleton when exporting animations
Branch select dummyroot
Go to File > Pandemic Tools > Export Mesh
In the export window tick 'Export Selected Models Only' and 'Export Animations'
Export the animation as human_bike_9pose.msh
4. Unit drive/ride animations must load from ingame.lvl to be found by the game.
Follow the steps for making a custom ingame.lvl.
Pilot9Pose = "bike_9pose" //your unit 9pose animation with human_ omitted
Chapter Two; the FinAnimation
The FinAnimation is for the vehicle. The vehicle can move based on direction.
When you want the vehicle to only move forwards, ignore the below, and do the above only with the vehicle bones.
If you want it to go back and forth and other directions (cycle forwards and backwards for example) follow the below:
1. Make a new animation with the vehicle:
Frame 0 is forward, turning left
Frame 1 is forward
Frame 2 is forward, turning right
Frame 3 is strafe left
Frame 4 is the basepose/idle
Frame 5 is strafe right
Frame 6 is backwards, turning left
Frame 7 is backwards
Frame 8 is backwards, turning right
1. Create a folder named Vehicles in:
data_ABC\Animations
2. Now copy the munge_animation.bat from:
BF2_ModTools\assets\Animations\Vehicle\
to:
data_ABC\Animations\Vehicles
3. Create a folder named peddle_bike in:
data_ABC\Animations\Vehicles
4. Copy the munge.bat from:
BF2_ModTools\assets\Animations\Vehicles\rep_hover_fightertank
to:
data_ABC\Animations\Vehicles\peddle_bike
6. In XSI, set your timeline on frame 4 and remove all geometry from the hierarchy, we only need the skeleton.
Export the animation, tick 'Export Selected Models Only' and 'Export Animations'.
Export this animation as frag_bike_9pose.msh to:
data_ABC\Animations\Vehicles\peddle_bike
7. With your timeline still on frame 4, tick 'Export Current Frame as Basepose' and untick 'Export Animations' then export it as basepose.msh to:
data_ABC\Animations\Vehicles\peddle_bike
8. Click the munge.bat to munge the animations to your side's munged folder
9. Refer to the vehicle animation in your ODF like this:
AnimationName = "frag_tread_bike"
FinAnimation = "frag_bike_9pose"
This should work fine; the bike should now be peddling, and so should the unit.
Chapter Three; Notes and Tips
* You can use the same system applied to the vehicle, for the unit too, to make it move different from backwards and forwards
* Make a perfect fit by merging the two scenes and making animations from there (so the unit and vehicle in one)
* Always make sure the basepose is one frame or things will go wacky here
* You can change the names, this was an example. Changing is fine, as long as you keep the refering proportions. * The unit is not always needed. FinAnimations are a great way to animate hover vehicles depending on their movements, with only a single animations msh file!
Hope this works,
Credits to psych0fred for the explanation what a FinAnimation is, and Frag for noticing mistake
Original tutorial
Hidden/Spoiler:
Wow! Very nice work Frag.. You won't expect much from me, but I'll take a look into it, the 2 different anims..
Edit:
How to make a working riding/driving/9pose animation, with standing *Before you start, get a clear understanding of THIS tutorial
Chapter one; the unit
1. Make your animation in XSI of the unit 'handling' the vehicle
2. Keyframe frame 0 as a sitting anim
3. Export the anim, like any other; hide the mesh, under dummyroot, bones under mesh, scene on frame 0 and call it bike_9pose.msh
4. Put the anim in the unitbank, and munge it, refer to it like this in the vehicle odf:
[code]PilotPosition = "hp_pilot" //whatever you called it
Pilot9Pose = "bike_9pose" //9pose anim, here
Chapter Two; the FinAnimation
The finanimation is for the vehicle. The vehicle can move going on direction.
When you want the vehicle to only move forwards, ignore the below, and do the above only with the vehicle bones. If you want it to go back and forth and other directions(cycle forwards and backwards for example) follow the below:
1. Make a new anim with the vehicle:
-Frame 0 is forward, turning left
-Frame 1 is forward
-Frame 2 is forward, turning right
-Frame 3 is strafe left
-Frame 4 is the basepose/not moving
-Frame 5 is strafe right
-Frame 6 is backwards, turning left
-Frame 7 is backwards
-Frame 8 is backwards, turning right
2. Export this anim with scene on frame 4, hide the vehicle mesh, and export it to:
data_FGM\Animations\Vehicles\frag_tread_bike
as frag_bike_pose9.msh
3. Delete every frame except 4. Make 4 frame 0, and export as basepose in the same folder
4. These 2 anims are the vehicle anims, munge them as frag_tread_bike by taking munge.bat from:
assets\Animations\Vehicles\imp_hover_fightertank
and pasting it into this, plus taking munge_animations.bat from:
assets\Animations\Vehicles
and pasting it in:
data_FGM\Animations\Vehicles
5. Edit the munge.bat in notepad, change imp_hover_fightertank to frag_tread_bike and IMP to whatever the side was called
6. Save and double click munge.bat
This should work fine; the bike should now be peddling, and so should the unit.
Chapter Three; Notes and Tips
* You can use the system applied to the vehicle for the unit too, to make it move different from backwards and forwards
* Make a perfect fit by merging the two scenes and making anims from there (so the unit and vehicle in one)
* Always make sure the basepose is one frame or things will go wacky here
* You can change the names, this was an example. Changing is fine, as long as you keep the referingproportions.. * The unit is not always needed. FinAnimations is a great way to animate hover vehicles depending on their movements, and only with one animations msh!
Hope this works,
creds to Fred for the explanation what a finanim is, and Frag for noticing mistake
Last edited by MandeRek on Tue Sep 02, 2008 7:03 pm, edited 10 times in total.
It was bit of figuring out though.. You can make one scene with unit and vehicle, and make them fit perfectly going forward and backwards to get the leaning effect..
I'll improve the tut with a vid and make it a bit more noobproof this afternoon..
Maybe this should go in the FAQ later, testing once more and making vid now..
Thanks Ace, yes it is pedalling all the time I had yet to try 9poses, which thanks to MandeRek I have a good handle on now.
It was more of an attempt to get the rider pose (moving or not) into the game. Just creating and animation and saying use it didn't work. It will with vehicle anims and new unit anims but with rider/driver what have you it needs to go in via the ingame.lvl in order to work. Once I refine the process a bit will probably bundle it together with what MandeRek is doing so we can have a really good anim tut.
Yup Frag, we are quite good together aren't we? Lol, we'll just make an awesome tutorial on vehicles, since this is basicly EVERYTHING about hover's anims, which wasn't covered till now..
The All Test Ewok Hover seems to work perfect!! WOOHOO!! Everything works so far.. Now the unit synchrosizing it's moves.. You make him? I make him? When we've got this totally worked out i think people should get their old scenes and apply this to hovers.. It's also awesome for speeders... Just imagine you got your units actually steering and stuff; it's simple, only requires some bones and looks PANDEMICLIKE!
That's great Frag, we can finally check this off the list of great mysteries that Pandemic left us to deal with.
I never would've guessed the way 9pose vehicle animations are set up from frame to frame with a basepose on frame 4, this calls for a celebration!
FragMe! wrote:...Just creating an animation and saying use it didn't work. It will with vehicle anims and new unit anims but with rider/driver what have you it needs to go in via the ingame.lvl in order to work.
There must be a way around this! *goes off to look around on psych0fred's site*
MandeRek wrote:2. Export this anim with scene on frame 4...
Well after performing some tests of my own I have found that you can export the animation on (possibly) any frame and you don't have to put keys on all 8 frames, only the ones you want.
To export go to:
File>Pandemic Tools>Export
and tick these in the window:
Export Selected Models Only Export Animations
MandeRek wrote:3. Delete every frame except 4. Make 4 frame 0, and export as basepose in the same folder
You don't have to move frame 4 (basepose) to frame 0 before exporting.
You can create all of your animations and leave the basepose where it is, then when it comes time to export the basepose just move the timeline to frame 4 and go to:
File>Pandemic Tools>Export
and tick these in the window:
Export Selected Models Only Use Current Frame as Basepose
then export.
This also saves time because you don't have to delete or move any keys.
-bumping for additional information-
in case somebody ever needs it, here is how the pilot 9pose for turrets is set up:
Frame 0: -
Frame 1: turn up
Frame 2: -
Frame 3: turn right
Frame 4: idle
Frame 5: turn left
Frame 6: -
Frame 7: turn down
Frame 8: -
if you set up your turret improperly it may happen that certain anims arent displayed correctly, as in only for a second or very weak.