Skip to main content

WYVRN Chroma Configuration

The WYVRN configuration supports Chroma animation playback. Chroma animation files contain the color pattern data for playing effects on the Chroma device categories for ChromaLink, Headset, Keyboard, Keypad, Mouse, and Mousepad.

Tools

  • The Web Chroma Editor creates Chroma animations and code snippets from several input sources. Designers can create Chroma animations without writing any code. The toolset can use input sources as video, text, camera, web cam, desktop capture, gradients, patterns, images, and blended animations.

image-10

Set Event Name

Game events are set with the WYVRN SDK using the SetEvenName(STRING_ID) method. Chroma can be controlled externally using the STRING_ID to trigger Chroma playback which is configured external from the game. The following JSON snippets are defined in the Wyvrn.config within the C:\Program Files (x86)\InterHaptics\HapticFolders subfolders.

Chroma Events

External_Command_ID within ExternalCommands relates to the STRING_ID sent by SetEventName to trigger the command.

{
"ExternalCommands": [
{
"External_Command_ID": "STRING_ID",
"Chroma_Events": [
]
}
}

Start

The Start external command is triggered automatically when the WyvrnSDK DLL is loaded. This is an opportunity for a game to add external Chroma and the first command can be used to set an idle looping animation.

{
"ExternalCommands": [
{
"External_Command_ID": "Start",
"Chroma_Events": [
...
]
}
]
}

Set Idle Animation

When the idle animation has been set, the animation begins playing and looping. When another animation plays and finishes, playback will return to the idle animation. Idle animations can be set for the main device categories: ChromaLink, Headset, Keyboard, Keypad, Mouse, and Mousepad. The Chroma Event requires two parameters for Chroma_Effect and "Idle": "set". The Chroma_Effect is the relative path to a Chroma animation. The Chroma animation file determines which device category is being set for the idle animation automatically.

{
"ExternalCommands": [
{
"External_Command_ID": "idle",
"Chroma_Events": [
{
"Chroma_Effect": "Idle_ChromaLink",
"Idle": "set"
},
{
"Chroma_Effect": "Idle_Headset",
"Idle": "set"
},
{
"Chroma_Effect": "Idle_Keyboard",
"Idle": "set"
},
{
"Chroma_Effect": "Idle_Keypad",
"Idle": "set"
},
{
"Chroma_Effect": "Idle_Mouse",
"Idle": "set"
},
{
"Chroma_Effect": "Idle_Mousepad",
"Idle": "set"
}
]
}
}

Unset Idle Animation

Without an idle animation set, there is no animation fallback after an animation plays without looping. The animation will stop on the last frame of the one shot animation. Sometimes this might be the intended behaviour. Idle animations can be unset for the main device categories: ChromaLink, Headset, Keyboard, Keypad, Mouse, and Mousepad. The Chroma Event requires two parameters for Chroma_Effect and "Idle": "unset". The Chroma_Effect is the relative path to a Chroma animation. The Chroma animation file determines which device category is being unset for the idle animation automatically.

...
{
"External_Command_ID": "unset_idle",
"Chroma_Events": [
{
"Chroma_Effect": "Idle_ChromaLink",
"Idle": "unset"
},
{
"Chroma_Effect": "Idle_Headset",
"Idle": "unset"
},
{
"Chroma_Effect": "Idle_Keyboard",
"Idle": "unset"
},
{
"Chroma_Effect": "Idle_Keypad",
"Idle": "unset"
},
{
"Chroma_Effect": "Idle_Mouse",
"Idle": "unset"
},
{
"Chroma_Effect": "Idle_Mousepad",
"Idle": "unset"
}
]
},
...

Unset Idle Animations

The idle animations for all device categories can be unset with a single call. The Chroma Event requires two parameters for "Chroma_Effect": "", and "Idle": "none". The Chroma_Effect is blank. The Idle parameter is "none".

...
{
"External_Command_ID": "clear_idle",
"Chroma_Events": [
{
"Chroma_Effect": "",
"Idle": "none"
}
]
},
...

Play Animation - One Shot

The default playback for a Chroma event plays an animation one time. If another animation is playing, it is stopped and the referenced animation is played without looping. The Chroma_Effect is the relative path to a Chroma animation file. The Chroma animation file determines which device category is used for playback. If the same animation is already playing it will reset to the beginning of the animation and playback one time.

...
{
"External_Command_ID": "play_animation",
"Chroma_Events": [
{
"Chroma_Effect": "Play animation - oneshot_ChromaLink"
},
{
"Chroma_Effect": "Play animation - oneshot_Headset"
},
{
"Chroma_Effect": "Play animation - oneshot_Keyboard"
},
{
"Chroma_Effect": "Play animation - oneshot_Keypad"
},
{
"Chroma_Effect": "Play animation - oneshot_Mouse"
},
{
"Chroma_Effect": "Play animation - oneshot_Mousepad"
}
]
},
...

Play Animation - No Interrupt

A Chroma event can play a Chroma animation without interrupting itself to avoid visual artifacts. This one be the case for a short animation like Machine Gun fire. It's possible for several events to fire every second, but the intent is to have the animation complete cleanly. In this case use the "Interrupt": false parameter. If another animation is playing, it will be stopped to play the new animation. If the animation is already playing, it won't be interrupted to allow it to complete. The Chroma animation will play one time.

...
{
"External_Command_ID": "play_animation_nointerrupt",
"Chroma_Events": [
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_ChromaLink",
"Interrupt": false
},
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_Headset",
"Interrupt": false
},
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_Keyboard",
"Interrupt": false
},
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_Keypad",
"Interrupt": false
},
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_Mouse",
"Interrupt": false
},
{
"Chroma_Effect": "Play animation - oneshot - nointerrupt_Mousepad",
"Interrupt": false
}
]
},
...

Play Chroma Animation - Loop

Some Chroma animations require looping for effects that have a discreet ON and OFF events. If any animation is playing, it will stop and the looping animation will play. The "Loop": "infinity" parameter will cause the Chroma animation to loop until it is stopped.

...
{
"External_Command_ID": "play_animation_loop",
"Chroma_Events": [
{
"Chroma_Effect": "Play animation - looping_ChromaLink",
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping_Headset",
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping_Keyboard",
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping_Keypad",
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping_Mouse",
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping_Mousepad",
"Loop": "infinity"
}
]
},
...

Play Chroma Animation - Loop - No Interrupt

Chroma events can play animations that loop with an option to avoid stopping the animation if the referenced animation is already playing. The "Loop": "infinity" parameter enables looping. The "Interrupt": false parameter prevents the animation from interrupting itself.

...
{
"External_Command_ID": "play_animation_loop_nointerrupt",
"Chroma_Events": [
{
"Chroma_Effect": "Play animation - looping - nointerrupt_ChromaLink",
"Interrupt": false,
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping - nointerrupt_Headset",
"Interrupt": false,
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping - nointerrupt_Keyboard",
"Interrupt": false,
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping - nointerrupt_Keypad",
"Interrupt": false,
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping - nointerrupt_Mouse",
"Interrupt": false,
"Loop": "infinity"
},
{
"Chroma_Effect": "Play animation - looping - nointerrupt_Mousepad",
"Interrupt": false,
"Loop": "infinity"
}
]
},
...

Stop Animation

Chroma events can stop Chroma animations that are playing once or looping. "Stop_Animation": true can stop a specific referenced animation. This is useful when the game has different events for ON and OFF states. I.e. when a game has a flame thrower weapon that activates with ON and the OFF event is determined when the player completes some operation like unpressing a button. The Chroma_Effect is the relative path to a Chroma animation. The Chroma animation file determines which device category is being stopped for the referenced animation automatically. If an idle animation is set, playback will fallback to the idle animation.

...
{
"External_Command_ID": "stop_animation",
"Chroma_Events": [
{
"Chroma_Effect": "Play animation - looping_ChromaLink",
"Stop_Animation": true
},
{
"Chroma_Effect": "Play animation - looping_Headset",
"Stop_Animation": true
},
{
"Chroma_Effect": "Play animation - looping_Keyboard",
"Stop_Animation": true
},
{
"Chroma_Effect": "Play animation - looping_Keypad",
"Stop_Animation": true
},
{
"Chroma_Effect": "Play animation - looping_Mouse",
"Stop_Animation": true
},
{
"Chroma_Effect": "Play animation - looping_Mousepad",
"Stop_Animation": true
}
]
},
...

Stop Category

A device category can stop animations without referencing a specific animation. The Chroma_Effect uses a blank parameter. The Stop_Category parameter specifies the device category. If an idle animation is set, playback will fallback to the idle animation.

...
{
"External_Command_ID": "stop_category",
"Chroma_Events": [
{
"Chroma_Effect": "",
"Stop_Category": "ChromaLink"
},
{
"Chroma_Effect": "",
"Stop_Category": "Headset"
},
{
"Chroma_Effect": "",
"Stop_Category": "Keyboard"
},
{
"Chroma_Effect": "",
"Stop_Category": "Keypad"
},
{
"Chroma_Effect": "",
"Stop_Category": "Mouse"
},
{
"Chroma_Effect": "",
"Stop_Category": "Mousepad"
}
]
},
...

Stop All

All Chroma animations can be stopped without referencing a Chroma animation or specifying the device category. The "Chroma_Effect": "", parameter should be blank. The "Stop_All": true parameter specifies all device categories will be stopped. If an idle animation is set, playback will fallback to the idle animation.

...
{
"External_Command_ID": "stop_all",
"Chroma_Events": [
{
"Chroma_Effect": "",
"Stop_All": true
}
]
}
...