mschoeldgen[Xww2] Posted January 24, 2008 Report Share Posted January 24, 2008 (edited) 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 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: 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: 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: Ok, we have the weapon in the scene , but its located at 0/0/0 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: 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 Once again open the 'Necessary Tools' and select 'Import 1P Animation'. Browse to your .baf file , noting its name: 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': 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' : 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: 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: 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: 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 January 24, 2008 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
BEEX Posted January 24, 2008 Report Share Posted January 24, 2008 (edited) 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 January 24, 2008 by BEEX Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted January 24, 2008 Author Report Share Posted January 24, 2008 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 Quote Link to comment Share on other sites More sharing options...
[BG2]Seth_Soldier Posted January 24, 2008 Report Share Posted January 24, 2008 thx for this interresting tutorial ! Quote Link to comment Share on other sites More sharing options...
clivewil Posted January 24, 2008 Report Share Posted January 24, 2008 wow, nicely done MS - thanks for making a complex subject understandable. 10 points Quote Link to comment Share on other sites More sharing options...
dtneter Posted January 24, 2008 Report Share Posted January 24, 2008 Question is it possible to film the whole procces? im not likely with pictures because a film can explain much more to me. Quote Link to comment Share on other sites More sharing options...
nakedfrijoles Posted February 12, 2008 Report Share Posted February 12, 2008 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...? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted February 13, 2008 Author Report Share Posted February 13, 2008 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. Quote Link to comment Share on other sites More sharing options...
nakedfrijoles Posted February 14, 2008 Report Share Posted February 14, 2008 (edited) 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 February 14, 2008 by nakedfrijoles Quote Link to comment Share on other sites More sharing options...
LekyIRL Posted June 18, 2008 Report Share Posted June 18, 2008 I'm stuck on the "merge part". Where do I get the weapon from? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted June 19, 2008 Author Report Share Posted June 19, 2008 (edited) 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 June 19, 2008 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
LekyIRL Posted June 19, 2008 Report Share Posted June 19, 2008 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? Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted June 22, 2008 Author Report Share Posted June 22, 2008 (edited) 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 June 22, 2008 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
BF2C Cre8or_94 Posted July 7, 2008 Report Share Posted July 7, 2008 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: Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted July 7, 2008 Author Report Share Posted July 7, 2008 (edited) 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 July 7, 2008 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
BF2C Cre8or_94 Posted July 7, 2008 Report Share Posted July 7, 2008 (edited) 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 Edited July 7, 2008 by BF2C Cre8or_94 Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted July 8, 2008 Author Report Share Posted July 8, 2008 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: 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. Quote Link to comment Share on other sites More sharing options...
BF2C Cre8or_94 Posted July 8, 2008 Report Share Posted July 8, 2008 (edited) 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,... 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 July 8, 2008 by BF2C Cre8or_94 Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted July 9, 2008 Author Report Share Posted July 9, 2008 (edited) 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 As said before its a complex task. You probably now can imagine the work necessary to make new soldiers Edited July 9, 2008 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
BF2C Cre8or_94 Posted July 9, 2008 Report Share Posted July 9, 2008 hell yeah I can! And that's why I'm satisfied with my method as I said, but thanks for your help anyway Quote Link to comment Share on other sites More sharing options...
infinityloop Posted September 22, 2008 Report Share Posted September 22, 2008 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. Quote Link to comment Share on other sites More sharing options...
1/2Hawk Posted September 22, 2008 Report Share Posted September 22, 2008 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. Quote Link to comment Share on other sites More sharing options...
infinityloop Posted September 22, 2008 Report Share Posted September 22, 2008 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. :-/ Quote Link to comment Share on other sites More sharing options...
azreal64 Posted December 19, 2008 Report Share Posted December 19, 2008 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? Quote Link to comment Share on other sites More sharing options...
clivewil Posted December 19, 2008 Report Share Posted December 19, 2008 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.