The Silent Movie: Finding Hidden Sounds |
Quake2 Demo Editing Tutorial |
Written 5/99 by Overman |
In Tutorial 8: Adding / Modifying Sound, I alluded to the fact that not all sounds occur in the same way in a Quake2 demo. In this tutorial, we learn how to track them down. We will do so as if we would like to remove all sounds from a demo. However, learning where these types of sounds can be found will also enable you to track down a specific sound you are looking to remove or edit.
The Obvious Ones
Many sounds are generated by Sound messages. This kind of message we are already familiar with from Tutorial 8; it refers to a sound by it's index in the Sound List. Using the Find Dialog, we can easily remove all of these by using Find Type: Delete.
Note: While it seems logical to simply remove all sounds from the Sound List, that will not take care of all sounds. Removing a sound from the sound list will automatically remove all it's sound messages; I just find this way to be much faster, since there is no way to delete more than one sound at a time from the list.
Less-than Obvious
Go ahead and remove all sound messages from your demo and watch it in the preview. You will notice that there are still a lot of sounds being played. Let's track down some more.
The packetentities message contains two parameters related to sound. Look at any packetentities message in the Block Tree, and you will notice the following near the bottom of the parameters: Sound and Event.
The Sound parameter of the packetentities message handles any looping sounds that are emitted from an entity for a certain period. For example, when a player selects the railgun, the player emits that distinctive hum. Selecting the BFG does the another hum. Other examples include: the roaring green BFG ball as it flies through the air, rockets as they fly, doors while opening, etc. When one of these conditions exist, the appropriate index # from the Sound List appears in this parameter for the packetentities messages for that entity. When no looping sound is being emitted from an entity, the value is 0.
The Event parameter handles certain "special" events for an entity. Possible values are:
Event Value | Description |
0 | No event sound |
1 | Item Respawning sound |
2 | Player Footsteps sound |
3,4,5 | Player Falling sounds |
6,7 | Player (and other) Teleport sounds |
Setting the Event parameter to 0 for all packetentities messages will eliminate all of these sounds.
In one use of the Find Dialog, with Find Type: Replace for packetentities, we can eliminate all of the above sounds by setting both the Sound and Event parameters to 0. Go ahead and try this now, then watch the demo one more time.
Embedded Sounds
Most likely, there are still some sounds remaining in your demo. In fact, there are probably quite a few still being played. These sounds are, unfortunately, "embedded" into certain types of events in Quake2. What this means is that the visual display of something is tied to the playback of the sound. This poses a problem if you want to separate the two.
The first category of embedded sounds is Muzzleflash messages. These include many of the weapon firing sounds... some of which can be removed with no large visual loss. The most notable exception is the railgun shot; if you remove a railgun muzzleflash, you lose the railtrail completely. Also included here are bullet ricochets... removing them makes you lose the display of the bullet hitting a solid surface. For a complete list of muzzleflash types, see that section of the .DM2 Demospecs.
The second category of embedded sounds is Muzzleflash2 messages. These are similar to regular muzzleflashes, but pertain only to such events by monsters, and therefore only occur in single player demos. Currently, there is no documentation of the kinds of muzzleflash2 values, but I'm sure exploration of the Quake2 source code would turn up a list of some kind.
The final category of embedded sounds is TempEntity messages. Some of these are very similar to muzzleflash events, but include many others.... most notably, all explosions (rocket, grenade, other) are handled by TempEntities. For a complete list of tempentity types, see that section of the .DM2 Demospecs.
Embedded Sounds: A Solution
Obviously, there are many embedded sounds that are too costly in the visual realm to simply remove. But can we get rid of those sounds? The solution is not an easy one, but is really the only way. This would involve creating a custom set of blank .wav files and replacing the sounds you want removed. While it would be destructive to do this in your baseq2\sound directory, if you project is going to be distributed in a custom directory in a pak file, then you would have something that could be viewed without corrupting regular Quake2 operation. For a large demo or project, this could be a daunting task... tracking down each of the offending sounds can be difficult. But it can be done.
However, the purposes of a totally silent demo are limited. In spite of the title of this tutorial, the most useful info here is not the generation of a silent movie, but the ability to track down and manipulate those hard-to-find sounds. Between this and Tutorial 8, you now have at your disposal everything you need to know about sound in Quake2 demos. This will be particularly useful info when we get into the merging of footage from different demos, as you will soon see. And we're also delving further into the "dark territory" of the packetentities message, the key component to advanced editing techniques. If you're impatient, be sure to check out the Demospecs and dig even deeper.
Above all, have fun adding and removing sounds to get the kind of presentation you desire for your project.