NekoToonDocs Download

Advanced

AudioLink

AudioLink makes parts of your avatar react to the music playing in a VRChat world. NekoToon reads the audio data that AudioLink-enabled worlds provide and turns it into a value between 0 and 1, which can drive the strength of emission, the Main Color 2nd/3rd layers, emission gradations and even move vertices.

How it works#

Worlds that include AudioLink analyse their music every frame and publish the result as a global texture that every shader can read. NekoToon checks whether that texture exists. If it does, the effect follows the music; if it does not (worlds without AudioLink, or the Unity editor without an AudioLink object in the scene), NekoToon uses the default value settings instead.

AudioLink splits the sound into four frequency bands: Bass, Low Mid, High Mid and Treble. For each band it keeps a short history of recent levels. NekoToon picks a band and a position in that history, called the delay: a delay of 0 is "now", larger values read the level from a moment ago. By giving different parts of the surface different delays (with the UV Mode), a beat appears to travel across the mesh as a wave.

You do not need to install anything for avatars: the shader can read AudioLink without the AudioLink package. If the AudioLink package (com.llealloo.audiolink) is in your project, NekoToon uses its shader include instead, which lets you preview the effect in the editor with AudioLink's own test objects.

_UseAudioLink on / off · default off

Turns AudioLink on. On its own this does nothing visible; you also have to choose what it drives under Apply to.

UV Mode#

_AudioLinkUVMode None / Rim / UV / Mask / Mask (Spectrum) / Position · default Rim

How the delay is chosen for each pixel:

  • None: the whole surface uses the same delay, so everything pulses together.
  • Rim: the delay grows toward the silhouette. Areas facing the viewer react first and the beat ripples out to the edges.
  • UV: the delay follows the (rotatable) U direction of UV0, so beats travel along the texture layout.
  • Mask: delay, band and strength are painted into a texture (see Mask).
  • Mask (Spectrum): instead of the four bands, draws AudioLink's frequency spectrum as bars or a line, positioned by a texture.
  • Position: the delay grows with the distance from a Start Position on the mesh, so beats spread out from that point.

Scale#

_AudioLinkUVParams.x float · default 0.25

Shown for Rim, UV and Position. How much the delay changes across the surface. Larger values spread more of the history over the mesh, so each beat travels across it more slowly and several beats can be visible at once; 0 makes the surface pulse uniformly. In Position mode it is per unit of distance from the start position.

Offset#

_AudioLinkUVParams.y float · default 0

Shown for None, Rim, UV and Position. A delay added everywhere. 0 reacts to the current sound; positive values react slightly later. The full history spans 0 to 1.

Angle#

_AudioLinkUVParams.z -180 – 180 degrees · default 0

Shown for UV only. Rotates the direction in which the delay runs across UV0, for example 90 degrees to make waves travel vertically instead of horizontally.

Band#

_AudioLinkUVParams.w Bass / Low Mid / High Mid / Treble · default Bass

Shown for None, Rim, UV and Position. Which frequency band the effect follows. Bass gives strong beats on the kick drum; Treble reacts to hi-hats and high-pitched sounds and flickers more.

Mask#

_AudioLinkMask texture _AudioLinkMask_ScrollRotate _AudioLinkMask_UVMode UV0 – UV3 · default UV0

Shown for Mask and Mask (Spectrum). In Mask mode the channels mean RGB = Delay / Band / Strength: red is the delay, green selects the band (0–0.25 Bass, 0.25–0.5 Low Mid, 0.5–0.75 High Mid, 0.75–1 Treble; the centers 0.125/0.375/0.625/0.875 are safest), blue scales the result, so black-blue areas do not react. In Mask (Spectrum) mode the channels mean RGB = Volume / Band / Strength: green is the position along the spectrum (low to high frequency), red is the level a pixel needs to light up, blue is the strength. Expanding the row shows tiling/offset, UV animation and which UV set to read.

Volume / Base Boost / Treble Boost / Line Width#

_AudioLinkUVParams x, y, z, w · used only by Mask (Spectrum)

In Mask (Spectrum) mode the four parameters are reused: Volume multiplies the spectrum level; Base Boost and Treble Boost are extra multipliers at the low and high end of the spectrum (blended across the mask's green channel), useful because bass is usually much louder than treble. Line Width below 1 draws only pixels whose red value is within that distance of the level (a line graph); 1 or more lights every pixel below the level (a bar graph).

Start Position#

_AudioLinkStart X, Y, Z · default (0, 0, 0)

Shown for Position. The point the wave starts from, in the mesh's local (object) space. The delay is the distance from this point times Scale, plus Offset.

Default value for no AudioLink#

What the effect does when no AudioLink data is available. The values are also used in the editor unless AudioLink is running in your scene.

Strength#

_AudioLinkDefaultValue.x float · default 0

The base value. At the default 0, anything driven by AudioLink is invisible in worlds without AudioLink (for example emission stays off). Set it to 1 if the effect should stay fully on instead.

Threshold#

_AudioLinkDefaultValue.w 0 – 1 · default 0.75

Shapes each fake pulse. In every cycle the value starts at (1 − Threshold) of full and fades to 0, then stays off for the rest of the cycle. At 0 each pulse fades smoothly over the whole cycle; higher values give shorter, weaker flashes.

In Mask (Spectrum) mode these four fields are labelled Strength, Detail, Speed and Threshold and draw a moving sine wave in place of the spectrum: Strength is its height, Detail how many waves fit across the spectrum, Speed how fast it moves and Threshold raises the level pixels must reach.

Apply to#

Choose what the AudioLink value controls. Each toggle multiplies the strength of that feature by the value, so the feature is fully visible on a loud beat and invisible in silence.

Main Color 2nd#

_AudioLink2Main2nd on / off · default off

Multiplies the opacity of the Main Color 2nd layer by the AudioLink value.

Main Color 3rd#

_AudioLink2Main3rd on / off · default off

Multiplies the opacity of the Main Color 3rd layer by the AudioLink value.

Emission#

_AudioLink2Emission on / off · default off

Multiplies the strength of the first Emission layer by the AudioLink value. This is the most common setup: glowing parts that flash with the music.

EmissionGradation#

_AudioLink2EmissionGrad on / off · default off

Advances the first emission's color gradation by the AudioLink value, so the glow shifts color on beats instead of (or as well as) changing brightness. Needs the emission's gradation to be in use.

Emission 2nd#

_AudioLink2Emission2nd on / off · default off

Multiplies the strength of the Emission 2nd layer by the AudioLink value.

Emission 2ndGradation#

_AudioLink2Emission2ndGrad on / off · default off

Advances the Emission 2nd color gradation by the AudioLink value.

Vertex#

_AudioLink2Vertex on / off · default off

Moves the mesh's vertices with the music, for example to make spikes or a speaker cone bounce. The vertex effect has its own UV Mode and parameters, listed below.

Vertex#

Shown when Vertex is enabled under Apply to. It shares the Mask texture and the default values with the main effect.

UV Mode#

_AudioLinkVertexUVMode None / Position / UV / Mask · default Position

How the delay is chosen for each vertex. The options work like the main UV Mode: None moves everything together, Position spreads the beat from a Start Position, UV runs along UV0, Mask reads delay/band/strength from the Mask texture.

Scale / Offset / Angle / Band#

_AudioLinkVertexUVParams x, y, z, w · default (0.25, 0, 0, Bass)

The same parameters as the main effect, for vertices: Scale and Offset set the delay, Angle (UV mode only) rotates the direction, Band picks the frequency band. Which fields appear depends on the UV Mode.

Start Position#

_AudioLinkVertexStart X, Y, Z · default (0, 0, 0)

Shown for Position. The point in the mesh's local space the vertex wave starts from.

Moving Vector#

_AudioLinkVertexStrength.xyz X, Y, Z · default (0, 0, 0)

The direction and distance, in the mesh's local space, that vertices move at full volume. Use it to make a part jump in one fixed direction.

Normal Strength#

_AudioLinkVertexStrength.w float · default 1

How far vertices are pushed along their own normals at full volume, which makes the surface swell outward on beats. Negative values pull it inward. Mind the mesh's scale: the distance is in local units.

As Local#

As Local#

_AudioLinkAsLocal on / off · default off

Ignores the world's AudioLink and plays a pre-made pattern from the Local Map texture instead, looping at a fixed tempo. Useful for a dance animation or song you know the BPM of. While this is on, real AudioLink data is not used even in AudioLink worlds.

Local Map#

_AudioLinkLocalMap texture · default black

The pattern to play. Only the red channel is read. The horizontal axis is time within one loop; the vertical axis is selected by the Band setting (the four bands read the bottom quarter up to the top quarter of the texture), and the delay shifts the read position in time just as with real AudioLink.

BPM / Notes / Offset#

_AudioLinkLocalMapParams x, y, z · default (120, 1, 0)

BPM is the tempo; Notes multiplies how many loops of the texture play per beat; Offset shifts the start of the loop (0–1 is one full loop). With the defaults the texture loops twice per second.

Test without a world: set Default value for no AudioLink to Strength 1, Blink Strength 1 and Threshold 0 to see a full fake pulse in the editor. In VRChat, remember that many worlds do not have AudioLink, so choose a default value that also looks good there.

AudioLink, its vertex mode and As Local are separate shader features. When you build an avatar, NekoToon keeps each one only if a material has it turned on or an animation on the avatar animates the matching property (_UseAudioLink, _AudioLink2Vertex, _AudioLinkAsLocal).

NekoToon is a fork of lilToon by lilxyzw (MIT License). Fur styles are based on Xiexe's Unity Shaders (MIT). NekoToon and its documentation are made by Mora for 404NyanFound.