Jump to content
Official BF Editor Forums
[RC]MamboDog

Weapon animation tutorial for 3ds max

Recommended Posts

One of the things that you should try to do when making a new weapon is to steal as much as you possibly can from the original game. Once you've exported your object and are successful in getting a .con file and .BUNDLEDMESH and .COLLISIONMESH files to show up, you need the rest of the code. For vehicles, you load up the simple object into the editor and run the car wizard. It associates the files and adds a tweak file. The tweak is where you set what you're looking for. What I do is take a weapon from BF2 that's close to mine and then I copy over every single file from both the objects_server.zip and objects_client.zip and put them into my /objects folder, which is in the root of my mod. I always take care to keep the same directory structure the core game uses, but I don't think it matters much except for organization. Once I have that, I rename everything, BUT THE SOUNDS, to my objects' name. The name of the tweak file, all instances of object names in the tweak file (I use CNTRL+H = find/replace), again skipping the sounds but CHANGING THE SOUND PATHS, and then you need to rename every single file in the animations 1p and 3p folders. Those are the .baf files for animation. Just change the names of the files, you can't open them. Use a rename utility because there's about 50-80 of them. Open the two animationsystem1p and3p.inc files and go through and use find/replace to rename all instances to your weapons name AND PATH. CAREFUL you want to make sure you get the path in the animationsystem files. If you accidentally rename the sounds, it just means one more step. Technically you should be replacing the sounds yourself, but I don't handle that part so I skip it altogether. BUT, if you do rename them in the tweak, you'll have to copy them and rename the files in your sounds folder. You get teh sounds from the objects_client.zip in /mods/bf2.

That should cover it.

Share this post


Link to post
Share on other sites

Bump…

Ok for the link click it and delete the rawdata.rar from the address, there in the Index of /files/3dsmax you can find the raw data. Except the raw data is point less and makes things a LOT more complicated.

So I think this tutorial could use a more in-depth explanation of WHY IN THE HELL ARE WE DOWNLODING THIS FILE :P ?

Share this post


Link to post
Share on other sites
I tried to follow this tutorial and got soooo lost. :x

me too.

junk since you seem to be a expert on animation could post a tutorial for noobs like me on how to mod a existing bf2 .baf file for new weapons and then re-saving the baf.

so far i have imported a baf into max,changed it but no clue on how to save it again as a baf.

thanks.

Share this post


Link to post
Share on other sites

Sorry, i can't really make tutorials. I can't upload squat.

1. Import the 1p or 3p skeleton using Rex's tools

2. Rename the root object to "root_animation_whatever"

3. Create a new selection set named "ANIMATED" caps sensitive (select all objects and add them)

4. Import the 1p or 3p animation (.baf file) depending on what you used in number 1

5. Alter it if you like

6. Open the MAX exporter

7. Paste the full path to your 1p folder (starting with the folder immediately after objects)

8. Click Refresh then Export

9. The editor should update the animation automatically.

You can't skip number one when altering a baf. Only when completely replacing it. The reason is that you're gonna probably want to merge in your weapon pieces so you can have something to work with and that immediately removes the ID# from the object that the original BAF file is corresponding with. Get it? You'll have to replace mesh1 with your weapon part in order to see it. It's no longer the original mesh1 anymore, it's your new one. The old one would have taken the baf import. The trick is to import the animation before you merge your weapon parts. Sorry, I mis-numbered them. It would be between 3 and 4.

Now, you can do it differently, but I find this less than organizational and in the long-run, I find it harder to work with. You don't have to replace the mesh boxes with your weapons parts if you merely link your parts to the boxes and then zero the rotation/position by parent coordinate system. With that method, you can continually import .baf files with no problems. Using the above, all bones will get motion but the weapons parts you replaced will not. However, you now have to move the boxes instead of the weapons now AND, you lose the best feature of replacing the parts:

If you have a weapon that's say, 6 individually moving pieces. If you link to boxes and keep the boxes as controllers, you must merge, link, zero T/R to each piece individually and then reposition them. Alternately, you 'could' zero the T/R (translation/rotation btw) of the boxes to the weapon parts. But it's the same number of steps. If you replace the boxes, you merge all pieces, only link mesh1_fp_GenericFirearm to mesh1 and the rest follows. You then delete the corresponding boxes per how many weapon pieces you have and it's done in 11 seconds.

Share this post


Link to post
Share on other sites

What tools? I downloaded and placed all the 3d max tools into my 3dmax folder but I cant figure out how to import the .ske. I tried using the doom labs revision but I still dont see where to import, I cant even get to the rest of the tut.

Share this post


Link to post
Share on other sites

Its under under the menu item called 'Necessary Tools' , found in the BF2 menu. Although i seem to be too dumb to find a SKE to import :oops:

Edit: Found it. I had to extract the soldiers/common/Animations folder to my mod :D

Share this post


Link to post
Share on other sites

Sorry, but all I have is exporter, utilities, lightmapping, batch export under the bf2 menu. Can u send me the link of the 3d max tools u are using, maybe I have the wrong version or something? Arg, I want to figure this out!

PS I have the following versions: sept 29,2005, aug 31 ,2005 and Dec 22, 2005.

Share this post


Link to post
Share on other sites

You'll need the above mentioned tools from doomlab. Best way is to use Rexman's latest files from Dec, 22nd and then replace the cooresponing files with those from Doomlab. Then you have the 'Necessary Tools' menu item.

On a sidenote: the Heightmap import is not directly suited for Navmesh editing, it needs to be scaled and mirrored :P

Share this post


Link to post
Share on other sites

OK I got everything working now, I think. Now I export and it thinks like normal but I dont have any files in my target directory. This is what I did.

-Imported the 1p skeleton

-Renamed the root to the animation naming convention

-Imported an existing .baf in this case the 1p claymore fire animation.

-Deleted the mesh1

-merged my new weapon into the scene and renamed it mesh1, linked to the root animation. BTW even though I had the same scale, my new weapon was huge in the scene, but I already exported this weapon to the editor/game and the size was fine. Not sure what the deal is here.

-created new selection set and added all pieces.

-Selected all objects and hit export, and nothing is in target directory. What am I doing wrong?

Share this post


Link to post
Share on other sites

Double check your target directory. I know that sounds dumb, but...

Your scale is off perhaps because in one of your files the units are different or you forgot to check the scale on all objects. Keep in mind it will not reset scale on heirarchies, only the roots of them. So you should always select each object individually. If any of your helpers are scaled, that translates to everything under it being scaled too.

Metric, 1unit = 0.1 meters. Check this on both the weapon export scene and your animation scene.

The instant that you rename the root object from root_skeleton_xxx to root_animation_xxx, it outputs a baf file. I've never had it fail to export one without an error, only that I often am looking in the wrong folder for where it's exporting.

Share this post


Link to post
Share on other sites
-Deleted the mesh1

-merged my new weapon into the scene and renamed it mesh1, linked to the root animation.

I don't think you should delete the mesh 1.

If you merge your weapon to the scene , i always link the weapon mesh to the mesh1 and in the selection set i leave out the weapon before i export and so far the animations that i exported worked ingame :)

Share this post


Link to post
Share on other sites

No, I'd never say that Blitz. I'm saying check the simple stuff :)

Seriously, import a new skeleton, rename the root to root_animation_xxx, select all, add to "ANIMATED" set and export to your desktop. Do you get a baf file? If that doesn't work, your tools are jacked.

And Tuut, what you described is the same thing. Now imagine a weapon with 12 parts. Your way you have to link each box to each piece and then move all the boxes by parent to line up with each piece one by one. My way, you import the weapon, delete the same number of boxes, delete the "_Fp__GenericFireArm" from all weapon names, add them to the set and it works. Your way is actually closer to what must be done for 3p, but 1p is VERY forgiving as I have yet to find a method that actually doesn't work. Cept forgeting to link the new pieces to the root, which results in a successful animation, but no weapons or stationary weapons.

Share this post


Link to post
Share on other sites

Hi, First time user, sorry about the necro.

I hang out on the realitymod forums, and I have done weapon animation tutorials but I never used this site for reference until now.

Im hoping that this forum's oldest users are still around as i could really use some help. My animations are exporting just fine and i can use them in game because the animationsystem1p file is working properly. However WHen i get in game the actual weapon floats off to the right. THis is probibly due to my having borrowed the system file from a different weapon and renamed the paths. Or it could be down to my not using the proper mesh, I realised i may have used the wrong weaponmesh when i was stripping the model for 1p anims so i set it all back up made some animations and exported them.

The "hands" exported and animated just fine, but the weapon still floats and goes off screen. Are there any usual suspects for this error, im trying my best here.

Thanks.

psyko

Edit:

Also im having a problem with the editor, it crashes every time i run physics, ever heard of this problem? everything should be set up correctly. thanks you in advance.

Edited by psykogundam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×