2
$\begingroup$

This is a pretty specific question, so I'm hoping someone with source engine animation experience could answer and explain what exactly I should do.

I've been trying to remove the screen shake when reloading a custom weapon in Left 4 Dead 2. Default weapons do not have it, and I want to keep it that way, but still enjoy the beauty of custom models and animations. The screen shake is added for realism by the model creator/author.

This video shows what I'm trying to get rid of

Note that it's a different game, but works on the same engine.

So I've taken it upon myself to fix this. I've downloaded Blender and tried to find the source of the problem. I've decompiled the weapon addon and found the file that contains the actual model and animations. I've gotten to the point where I found the animation files:

enter image description here

So the two animations that contain the screen shake is when you deploy the weapon and whilst reloading it. So I think the files deploy.smd and reload.smd fit the description. I don't know what the _layer.smd files are though, after opening them in Blender, they seemed exactly the same as the original.

So after inspecting the animation I think I've actually found the bone (sorry if my terms aren't correct, I'm completely new to the program) that adds the screen shake to the reload and weapon deploy animation. enter image description here

The thing is that I don't know how to edit it at all, when I play the animation that bone moves ever so slightly which I think fits the small camera shaking that happens in the weapon's reload/deploy animation. From experience with zbrush and a lot of mapping programs I'm guessing that the "bone" is linked with the camera somehow. So how do I brake that link?

I can add more info, screenshots or even screen vids of what I'm trying to acomplish if needed. Take note that I don't know how to do anything in Blender yet and it wasn't really my intention to learn the entire animating process. I'm just trying to fix this one specific thing..

Here is the actual full model /w animations

$\endgroup$
4
  • $\begingroup$ You mentioned ...[I can add more info, screenshots]. I think that would help your question. $\endgroup$ Apr 15, 2016 at 15:15
  • $\begingroup$ Please add the details of your question to the body of your question on this site. $\endgroup$ Apr 15, 2016 at 15:48
  • 1
    $\begingroup$ @atomicbezierslinger Okay I've explained my question better and added some screenshots, hopefully it's more understandable now. $\endgroup$
    – Adr1an
    Apr 15, 2016 at 16:53
  • $\begingroup$ I answered the question and provided a finished file. :) Hope it helps $\endgroup$ Apr 15, 2016 at 20:11

1 Answer 1

1
$\begingroup$

I don't know how to unparent it, but removing all the keyframes should remove the motion.

I did it to the file my self

Here is the file.

I would just replace the "_layer" version with that file as well, and rename it, just in case. There does not appear to be a difference though.

If you still want to know how to do it...

Here's how:

  • Switch to the dope sheet

enter image description here

  • Press a once or twice until all the keyframes are selected (highlighted in orange). (if they are already highlighted, press 'a' twice anyway, just in case a few weren't selected).

Note: That will get rid of all animation, and we just want to get rid of camera animation. You may have to box select b to just select the keyframes that are on the same row. You may have to expand the higherarchy (on the left) until you can click on the bone you want. There may be a location, rotation, and scale, instead of just a rotation like on my example. If there are, make sure you select all of them. Now drag a box around all those keyframes (after pushing b) so that they are all highlighted. (don't select the first column, allowing you to skip the next step of unselecting it.) (it will be white if it is not selected.)

enter image description here

  • Just as a check, the source engine may have glitches if there are no keyframes, so zoom in to see things better (scroll wheel) [you can click and drag the middle mouse button to move your view to the beginning of the animation] and hold shift while right clicking on the first keyframe (orange square) to deselect it (right click on the box at the same x location as).

Now it should look something like this.

enter image description here

  • Now press x on your keyboard, to delete the keyframes. (click delete)

enter image description here

It should now look something like this (except with more columns of keyframes.) The bone you are trying to remove the motion from should be the only one that has its keyframes (squares) removed. If it is not, there is something wrong.

enter image description here

That should be good. Check if the bone is not moving when you play the animation (make sure the other bones are still moving), and you should be good. Now save it and replace the old .smd with the new .smd. You may have to export.

Here is a video that can help you with importing and exporting .smd in Blender. I think it's all about the same still.

$\endgroup$
6
  • $\begingroup$ Thank you for explaining all this, definetly a big step in the right direction. I've actually managed to partially fix the reload animation myself but I forgot to leave the first keyframe (like you said, the animation glitched and i started to lean to the right while reloading). Now I have some good news and some bad news. I've compiled the file you sent and the screen shake was indeed fixed, the camera stopped moving when reloading. But I've now encountered a new problem: i.imgur.com/6yv7vMU.jpg $\endgroup$
    – Adr1an
    Apr 15, 2016 at 21:06
  • $\begingroup$ It seems that there's a problem in the import/export & decompile/compile process. I've tried recompiling the original files just to see if it would work normally, but that glitch seems to appear either way. I think I'll find the error somehow, but if you already have experience with importing/exporting and compiling .smd files I'll appreciate any kind of help. $\endgroup$
    – Adr1an
    Apr 15, 2016 at 21:10
  • $\begingroup$ Hmm, that's weird that there would be an error even with the old files. No, I don't know a fix, but it sounds like it's keeping some kind of cache of your data, and the caches are conflicting. Or maybe it's the compile, which would make sense, but then it seems like the errors would be fixed when you used all the old files. My only possible solution is that you need to update the "_Layer" file as well, if you didn't already. Or maybe just replacing the old one caused an issue cause there's something special about that file, but that one must be changed, because otherwise things would conflict. $\endgroup$ Apr 15, 2016 at 21:31
  • $\begingroup$ So in an answer, no, I don't know what I'm doing cause I don't have experience with source engine, and I just rambled about what things appear. :P But I hope it might have helped, and I hope you get it fixed. (A little more rambling: it seems that one of the bones was dependent on some data that got changed, and so it may have broken a link making a bone invalid in some way. That would cause those vertices to jump over there like that. Once again, I don't know what putting back the old files wouldn't fix it though, so that seems like it must not be the answer.) $\endgroup$ Apr 15, 2016 at 21:34
  • $\begingroup$ I'm pretty sure removing the keyframes didn't glitch the animation. Like I said, I tried decompiling and compiling the original model&animations and the glitch appeared anyways. So either there's something I'm doing wrong when compiling things or the software is faulty (it's been known to be faulty). I'm currently trying out different versions and ticking on and off some options to see if it fixes the problem. $\endgroup$
    – Adr1an
    Apr 15, 2016 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .