ShakeData (Sound shader keyword)

The information on this page is specific to Quake 4 .


Description

The shakeData keyword defines the intensity and duration of a screen shake or light flicker when using the shakes 1 sound shader keyword/value.

Usage

shakeData <#> <data>

Parameters

  • # - order of the sound files in the sound shader. Numbered 0 though n
  • data - data string that defines the intensity of the sound (a being 0db z being max). The length of this string indicated the length of the sound file.

Examples

Single Sound File in Shader

sound announce_general_sudden_death
{
    minDistance 40
    maxDistance 400
    volumeDb    10
    global

    sound/thf/announce/hellchick/sudden_death.wav
    shakeData 0 bcfhfgdcjnklliceedccbaaaa
}

Multiple Sound Files in Shader

sound player_mp_footstep
{
    minDistance 80
    maxDistance 1200
    volumeDb    0
    no_dups

    sound/marine/player/steps/concrete_01
    shakeData 0 padaaaaaaaa
    sound/marine/player/steps/concrete_02
    shakeData 1 hbdaaaabbaa
    sound/marine/player/steps/concrete_03
    shakeData 2 gaeaaaabaaa
    sound/marine/player/steps/concrete_04
    shakeData 3 mbcaaaaaaaa
    sound/marine/player/steps/concrete_05
    shakeData 4 nfaaaaacaa
}

Notes

Doom3 analyzed the PCM output to generate light intensities and screen shakes. Quake 4 uses hardware playback (in OpenAL), and cannot access PCM data, so precalculation is required.

Creation of data strings for use with this keyword can be generated using the shakesGen console command. Use shakesGen all to compile shakeData for all sound shaders. By default only sounds without any shakeData will be compiled.