Jump to content
Official BF Editor Forums
mschoeldgen[Xww2]

Editing Existing 1p Animations

Recommended Posts

Changing existing 1P animations ( and not creating new ones )

I was asked to publish this tutorial which was originally meant only for our mod team. It doesn't attempt to replace the great tutorials from junk, but as he removed them i decided to at least give animators in spe some hints on exporting and setup. Originally i used this method to only edit the most annoying wrong animations when using a vanilla animationsystem with our weapons, like reload and fire. Now that we have a dedicated animator its no longer needed but surely a few ppl can benefit from this method.

In this tutorial i'd like to explain the way how i recreate animations based on existing ones. For this purpose you should have set up the weapon with an existing but standalone animationsystem, that is you should have an own animations folder for that weapon. You can create this by cloning an existing /animations folder and the 2 'animationsystemNN.inc' files. Open the '*.inc' files and change the pathes inside them to point to your new animation folder. Junk explains that in his excellent video tutorial which is no longer available on his site , unfortunately.

http://bfeditor.org/forums/index.php?showtopic=7081

Your weapon's tweak file should also use that animationsystem.

You should have the extended Tools from Doomlab or the PoE 2 tools as we need to import the 1P skeleton from /objects/soldiers/common/animations/1p_setup.ske.

They can be found here: http://www.files.doomlab.com/Library/anima...omLabUpdate.zip

O.k, now that everything is prepared, open Max and setup the units to use Generic Units.If you fail to do so, strange things will happen :o First thing is the import of the 1P skeleton. Run the 'Necessary Tools' from Doomlab, select 'Import Skeleton' and browse to the above mentioned file. You will get that model in Max:

animA.jpg

Make yourself familiar with this display, its a representation of the two arms of the soldier. Now open the 'Select by Name' window and select the objects named 'mesh1' to 'mesh5' to delete them:

animC.jpg

In this case i deleted mesh1 to mesh5 cause my imported weapon ( the K98 ) has 5 meshes in it. Now we need to merge our weapon into the scene. Open the 'Merge' dialog (File menu) and browse to your weapon scene. We want to merge only the meshes of the geom0->lod0 weapon, our 1P model:

animB.jpg

Ok, we have the weapon in the scene , but its located at 0/0/0 :unsure:

animD.jpg

Lets do a preliminary positioning by selecting the parent of our weapon, in this case its the 'K98__GenericFireArm' and moving it to 0.79 / 3.5 /13.81 . Rename this mesh ( the K98__GenericFireArm ) to 'mesh1' and parent it to the 'root' helper . Now select the remaining meshes of the weapon (mesh2 up to mesh5) and also parent them to the root helper. In case the meshes where named differently rename them now to 'mesh2' and up:

animE.jpg

This is how it should look like before we import the animation to be changed. And there's no reason why we shouldn't do that now :D Once again open the 'Necessary Tools' and select 'Import 1P Animation'. Browse to your .baf file , noting its name:

animF.jpg

The weapon jumps into position and we can already slide the frameslider through our imported animation, seeing all the meshes move. But before we do any animation we should make our scene export-ready. Select the 'root_skeleton_1P_setup' Pointhelper and rename it to 'root_animation_<MyAnimationName>. We are working on the '1p_k98_reload' animation and so our name would be 'root_animation_1p_k98_reload':

animG.jpg

All parts of the scene need to be in a 'Named Selection Set' named 'ANIMATED'. To do that, select all your meshes and bones and open the 'Edit Named Selection Sets...' from the 'Edit' menu in Max. Press the button with the curled brackets and name your new set 'ANIMATED' :

animK.jpg

Now everything's setup to start working.You should probably save that scene in its current state as you can use this as a starting scene for all your new animations. There are a few rules to obey, though. You shouldn't 'move' bones, only rotate them and you cannot use contraints, they will completely screw up your scene. You are allowed to move weapon meshes, though. Its best to switch your Reference Coordinate System to 'Local' to affect meshes and bones in a natural way:

animH.jpg

Animating is now done by pressing the 'Auto Key' button. Note how the time line turns red. Now each change to a position or rotation will only affect the selected frame. The task now is to select the mesh or bone you want to affect and do your rotation/move stuff. In case you rotate an arm bone, the lower bones will follow it. Work your way through each frame now. In case you want to copy the rotation/position of one or more meshes and bones to the next frame (or several frames), have your objects selected and hold down the <Shift> key while dragging the frame marker:

animI.jpg

Also note that you shouldn't do anything to the Camerabone as this determines the viewing position in the game.

Hints: Try it with a simple and short animation first, like a fire or a stand animation. When exporting your animation, make sure of the right path in the exporter window:

animJ.jpg

Don't hesitate to ask me if you run into problems. It is vital for any animation to have a clean weapon export before attempting to animate it. That is especially true for the scale and orientation of the weapon.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

misch has done it again!...nice 1 misch,im sure ill learn something from this too,thanx mate.

weapon animation is the blackhole in most mods,well worth learning.

thanx again misch,bow to the crazy german master of bf2 modding...me bows..lol

.

BTW has anyone else noticed the camera bone is slightly too low,if you compare 1p camera position to 3p eye position,alot of work to fix for all weapons if your that fussy..lol.

Edited by BEEX

Share this post


Link to post
Share on other sites

Yeah, the camerabone is annoying. I mostly fix it now by using a seperate mesh for the zoom model even if its only a clone from the standard 1P model and adjust it so that the model fits exactly with the editor's reference cross in zoom mode. Quite some back and forth between Max and BF2Editor :huh:

Share this post


Link to post
Share on other sites

hello, ive successfully exported the animations and all, thanks for the excellent tut....but when i update the animation in max, then try to update it in bf2 editor, it wont work....i have to restart the whole editor to see my new changes, why wont the stupid reset/refresh buttons work? or am i missing something...?

Share this post


Link to post
Share on other sites

The editor caches most of the stuff it loads on startup and that can be annoying. You could either try in Object Editor to 'Reload Geomatry' or in Animation Editor use the 'Populate Animation tree' repeatedly. Both might work but nothing is guaranteed , lol.

Share this post


Link to post
Share on other sites

yeah, i tried that..still doesnt work....ea/dice sucks..actually, i did the populate animation tree thing... and when i double clikc on my animation.baf in the tweaker bar rollout to refresh it, it gives a error saying the boneanimation file mods/my_mod not found......i dont understand why it cant find it..obviously it found it cuz ive been opening it this whole time....

Edited by nakedfrijoles

Share this post


Link to post
Share on other sites

As we are a WW2 mod we had to create all the weapons ourselves so i have the MAX export scenes of all our weapons handy on my server . If you want to change the animation for a BF2 weapon, you should import it into Max first and create a basic scene containing the weapon meshes.

As the weapon is not exported when exporting the animation it really does not matter if the weapon is textured or not.

Only make sure your import has the right scale.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

Ah thanks,so a weapon that has only been made in Max(i.e not textured or ingame/in the editor) would work fine,as long as it's the corret scale?

Share this post


Link to post
Share on other sites

Yes and no. You can't export an untextured weapon. Yes, it will suffice for the tutorial. We are talking here about exporting an animation, not a weapon. The imported weapon is only in the animation scene to give you visual feedback of what you're doing and is not exported with the animation.

In fact , you could even create an animation without ever importing a weapon, but then you have to fiddle with the little boxes supplied by the animation importer representing the weapon meshes.

A successful weapon export of course requires to have a fully textured weapon model in the right hierachy.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

I've heard you can import the soldier's arms and hands and rig them onto the bones, so you can see. After watching some of Chad509's videos, I realized it was possible. I asked him by comment how he got them into 3ds max, but he didn't reply yet. The only help I could get by him was an old reply saying the arms and hands meshes can be found in the bf2 archives. I've searching in the objects_* archives but I couldn't find anything relevant. Can anyone point me into the right direction for that?

Oh and here's the video I was talking about:

Share this post


Link to post
Share on other sites

It is possible to import the arms from any BF2 soldier and of course it is possible to import the 1P_setup.ske skeleton.

It is not possible though to import the original vertex weigthing and that has to be recreated as close as possible when using a full fledged arm mesh instead of the bones alone.

The only trouble is that you can't see how DICE did the weigthing, so it will always be an approximation to the vanilla arms which is especially important for the fingers.

The arm mesh can be found in any soldier's skinnedmesh file which all known 3DS importers can handle.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

thank you very much for that fast reply in first place, MS. So if I am right I can just import the skinned mesh into 3ds max with the bf2 plugins?

*EDIT*

I was able to import the the skinnedmesh from the soldier, thought it seems as if it is 10 times bigger than the 1p skeleton. I'll try to rescale it properly.

*EDIT*

Ok, I was able to rescale it, and it fits the bones now. I'm guess I'm ready to move to the second step you mentionned earlier, the weighting of the bones. I sorta know what it means, since I've done it to get my M4 to work in crysis, but I have no idea what this is gonna be like for bf2. Please enlighten me on this and show me the way to go :rolleyes:

Edited by BF2C Cre8or_94

Share this post


Link to post
Share on other sites

Ok, first you should import the 1P_setup.ske skeleton for the arms and both 1P meshes (left and right arm ) . After that you give each of the meshes a 'Skin' modifier and add the bones from the right arm to the right arm mesh . Same for the left arm .

Now start to weigth vertices. Imo this is best done through the 'WeightTable' after setting the advanced parameters to a 'Bone affect limit' of 2.

Set the weigthtable to 'Selected Vertices' and start with the shoulder bone . note that there should be smooth transitions in weigthing so that the vertices on the seam between one bone and the next should be weigthed to both bones gradually. A vertex only affected by one bone mostly has a 1.0 weigthing while a vertex affected by 2 bones with the same strength has a weigthing of 0.5 per bone.

Here's a screen shot of a 3P soldier ( no 1P shots here atm ) with the root bone selected and the weigthing displayed:

japsoldierworkA.jpg

Note how the weighting is gradually reduced where other bones take over. This will give you uninterupted joints.

It is of the first importance to have everything reset before starting the weithing process. Also the positions must be very exact on start.

Its a complex process and requires some practise.

Share this post


Link to post
Share on other sites

hmm... I know now how it works, but it seems as if I'll have to spend some hours getting the weighting done, just to start animating? Or is there an easier, time saving way? Anyway, I've done what I wanted, another way around. My initial problem was to get the hands and arms of the soldier to appear in the scene to make animating easier. Well, I've done that, by adding each mesh to it's bone in the hierarchy, and as parented objects move with their parent,...

maxproblemnl9.jpg

I'm satisfied with this right now, but of course if there was an easier way to do the vertices weighting, I'd do it rather than having to cope with my method. :)

Edited by BF2C Cre8or_94

Share this post


Link to post
Share on other sites

By attaching a mesh to a pyramid you're not 'weigthing' but only make the mesh a part of the bone movement. This will not reflect the ingame movement.

No, there's no easier way for weigthing :P

As said before its a complex task. You probably now can imagine the work necessary to make new soldiers

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

Thank you for this great tutorial!

I followed your instructions step by step, but not for the 1p animation. i used it for a 3p animation.

I had no problem to alter the stand/standdeploy/turnleft/turnright animation files. works like a charm ingame.

But i have a quite massive problem with the animations for walkforward/walkbackward/strafeleft/straferight.

I modified them exactly the same way as i did the others. i only modified the arm-animations.

But when i move my solder now from left to right, the feet do not move at all.

If the solder goes forwards or backwards, the "sinks" into the ground so that he is only visible from the hip upwards. (feet are in the ground).

Anyone an idea how i fucked these animations up?

I allready tried a couple of times to ensure that i did it the same way as i did for the other working animations.

Share this post


Link to post
Share on other sites

This happens when you include the bones from the waist down in your {ANIMATED} selection set. Remove any lower body items from that grouping and re-export and it should fix the problem.

Share this post


Link to post
Share on other sites
This happens when you include the bones from the waist down in your {ANIMATED} selection set. Remove any lower body items from that grouping and re-export and it should fix the problem.

oh my ....

thanks for that tip! :)

i will try that out this evening as soon/if i get home from work. :-/

Share this post


Link to post
Share on other sites

Thanks for the tutorial MS, but I seem to be stuck on one part. I'm somewhat of a beginner to Max's layout and what have you, and I'm not exactly sure how you 'parent something'? Could someone explain that part a bit more?

Share this post


Link to post
Share on other sites

in max the operation is known as 'linking' - if you link A to B, A becomes a child of B. B is the parent object. in my max (v7) the icon for it (called Select and Link) is 2 small white cubes connected by a chain (and the one next to it has a broken chain, which is the 'Unlink' icon)

to link, first click on the Select and Link icon mentioned above and then click on the object you want to be the child. hold down the LMB and drag until the pointer is over the object you want as the parent. when you're in the right spot, the parent should flash. release the LMB.

if you've done it correctly, in the object list the child should now appear directly under the parent, and slightly indented to the right (assuming you have Display Subtree active in your list)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...