Let’s start talking about special effects in computer graphics with Free Open Source programs: in this first episode we see how to simulate gunshots in movies using simply Kdenlive and some “ready to use” effects.
In 1896, the French magician and director Georges Melies accidentally discovers the “replacement trick”, that is, a method of making something disappear from a movie. It is interesting to note that everything happened due to a technical problem: Melies was picking up the wagons traveling on a road and had not noticed that, at some point, the camera had jammed and consequently for a few seconds the film had remained still. After developing the film, he realized that at some point the carriage passing by on the street had disappeared. This event marks the birth of special effects for cinema. More than a century has passed since that day, and now the techniques for special effects have developed in an incredible way to say the least: it is now possible to realize in a film anything the imagination of a director can imagine. Much of the merit is also of computer graphics (CG, Computer Graphics) which allows not only to make old tricks with film much simpler, but also to insert imaginary but realistic objects. Among other things, since the introduction of the CG, a difference is made between “special effects” and “visual effects” (or VFX): the former are made in the camera, that is, directly in the scene that is shot by the camera, without the need for modifications afterwards the assembling. The latter are instead made after shooting (for example via computer). Let’s immediately understand the difference between special effects and VFX: in today’s example we will simulate a muzzle flash, that is, a flash caused by a firearm. One way to accomplish it as a special effect would be to get a blank gun: it emits lightning but there is no risk of killing the actors. We, however, will create the effect in post production, using images ready to be superimposed on the movie. To get an idea of what the applied effects will look like, you can see the sample movie at http://www.youtube.com/watch?v=yaQVoklewdA . There are basically three steps: the first is to superimpose, at the right time, the effect of the muzzle flash on the scene filmed, positioning it so that it appears to come out of the barrel of the rifle or pistol. And this is done using a special transition, which allows you to superimpose two video tracks. Then you have to check, frame by frame, that the effect remains “attached” to the barrel of the firearm, even while it is moving (you cannot certainly shoot and remain with your arm perfectly still, it would not be credible). To do this, you need to create keyframes in the transition that overlaps the two clips: after creating a new keyframe you can move the image of the effect, to bring it to the correct position. Obviously, a key frame must be created for each frame in which the muzzle flash must appear superimposed on the original clip. The last step is to increase the light of the scene at the moment of the shot, to make the scene more realistic. It is, of course, important not to illuminate objects that could not be hit by the ray of light (in our example, a target taken from the back: it is obvious that the back cannot be illuminated). To solve this problem, we superimpose the same clip on the newly “illuminated” clip, but on the original one (ie without the lighting effect). Then we make visible, thanks to a mask, only the object that must remain dark: in this way, the final effect will be that the whole scene appears illuminated, with the exception of the object we have masked.
Where to find the effects
In our examples we used two ready-made effects: one with the images of a machine gun, the other with those of a gunshot. You can easily find similar effects on the internet, but often these are films that need to be removed from the background, and this is an operation that often does not do well. It is much better to work with effects based on a series of semitransparent images: you can download the ones we used for these examples from the address https://www.kdenlivetutorials.com/files/muzzle.zip . There are also sounds in the zip file. These files are freely usable and editable. Alternatively, audio and video effects can be recovered directly from Kdenlive: just go to the menu Project / Network Resources and search for the clips we need.
All the clips we need
We prepare the necessary to apply the effects


A submachine gun
We simulate repetitive shots, as a machine gun would do




A single shot
Let’s try to simulate a gunshot, with the right perspective




The master touch
The gunshot must illuminate the scene



