I can Pedal and 9pose tests

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.

Moderator: Moderators

Gametoast Staff
User avatar
Posts: 2267
Joined: Sat May 13, 2006 12:34 am
Location: Origin name GT_FragMe
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set

I can Pedal and 9pose tests

Postby FragMe! » Sun Aug 31, 2008 12:39 am

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 :P

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Re: I can Pedal

Postby AceMastermind » Sun Aug 31, 2008 3:33 am

:lol: 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.

Examples of 9pose hover/flyer vehicle animations (FinAnimation)
all_snowspeeder_9pose.msh - flyer
imp_speederbike_9pose.msh - hover
barcspeeder_9pose.msh - hover
rep_fightertank_9pose.msh - hover
tat_skiff_9pose.msh - hover

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
Code: Select all
PilotAnimation      = "drivesnowspeeder"

while the snow speeder uses:
Code: Select all
FinAnimation   =   "all_snowspeeder_9pose"

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal

Postby MandeRek » Sun Aug 31, 2008 5:06 am

Wow! Very nice work Frag.. You won't expect much from me, but I'll take a look into it, the 2 different anims.. :P

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.

Your ingame.req would look like this:
Code: Select all
ucft
{

    REQN
    {
        "animbank"
        "human"
    }

}


Copy human_0 - 4 folders from:
assets\Animations\SoldierAnimationBank
to
data_ABC\Animations\SoldierAnimationBank

Drop your human_bike_9pose.msh into one of the human folders and munge all 5 to:
data_ABC\Common\munged

Refer to the unit 9pose animation in your vehicle odf like this:
Code: Select all
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

Image

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

5. Edit the contents of munge.bat to this:
Code: Select all
@call ..\munge_animation.bat "/keepframe0 /specialquathack /dest frag_tread_bike.zaf" Sides\IMP

Change 'IMP' to whatever your side is called

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! Image

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.. :P

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: Select all
PilotPosition          = "hp_pilot" //whatever you called it
Pilot9Pose          = "bike_9pose" //9pose anim, here

AnimationName          = "frag_tread_bike"
FinAnimation                                   = "frag_bike_pose9"


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

Image

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! Image

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.

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Re: I can Pedal

Postby AceMastermind » Sun Aug 31, 2008 6:26 am

Ah Yes, that makes perfect sense, and it's good to see psych0fred is still active too. :thumbs:

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal

Postby MandeRek » Sun Aug 31, 2008 6:37 am

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..

Gametoast Staff
User avatar
Posts: 2267
Joined: Sat May 13, 2006 12:34 am
Location: Origin name GT_FragMe
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set

Re: I can Pedal

Postby FragMe! » Sun Aug 31, 2008 11:20 am

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.

@MandeRek thanks to you and Fred for the info.

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal

Postby MandeRek » Sun Aug 31, 2008 2:31 pm

Yup Frag, we are quite good together aren't we? :P 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..

Can't wait! :D

Gametoast Staff
User avatar
Posts: 2267
Joined: Sat May 13, 2006 12:34 am
Location: Origin name GT_FragMe
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set

Re: I can Pedal and 9pose tests

Postby FragMe! » Sun Aug 31, 2008 6:44 pm

As a test of what MandeRek and i just learned, I give you a totally new vehicle using totally new 9pose anims.

Okay this is what an Ewok hover vehicle would look like.

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal and 9pose tests

Postby MandeRek » Mon Sep 01, 2008 1:37 am

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! :D

Edit: Also remind me of doing this to my hovers :P

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Re: I can Pedal and 9pose tests

Postby AceMastermind » Mon Sep 01, 2008 4:19 am

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! :yes:

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! :runaway: *goes off to look around on psych0fred's site*

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal and 9pose tests

Postby MandeRek » Mon Sep 01, 2008 4:24 am

Yup, we must celebrate indeed! So what's left in mysteries? I still wonder how to make a whip :P , the docs say it can be used for a weapon..

@Ace, if you want i can ask Fred, though he agreed with my tutorial; make an anim bank with the driving anim, or remake human_4 and put it in MUNGED ;)

Gametoast Staff
User avatar
Posts: 3294
Joined: Mon Aug 21, 2006 6:23 am

Re: I can Pedal

Postby AceMastermind » Thu Sep 04, 2008 4:41 pm

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.

Jedi
User avatar
Posts: 1130
Joined: Sun Dec 23, 2007 12:07 am
Location: MI, USA
Games I'm Playing :: BioShock
xbox live or psn: Delta811

Re: I can Pedal and 9pose tests

Postby Delta 47 » Fri Sep 05, 2008 9:42 pm

FragMe! That's awesome :faint:

Sith Master
User avatar
Posts: 2768
Joined: Tue Oct 02, 2007 10:51 am
Location: Ghosting around GT
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set

Re: I can Pedal

Postby MandeRek » Sat Sep 06, 2008 2:26 am

I did know about the keyframes, and had a vague idea about exporting with Export Frame as Basepose. Thanks Ace :)

Master of the Force
User avatar
Posts: 6069
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: I can Pedal and 9pose tests

Postby DarthD.U.C.K. » Thu Jul 07, 2011 8:36 am

-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.

Return to 3D Modeling & Animation

Who is online

Users browsing this forum: No registered users and 3 guests