Skip to content

VFX ​

VFX are the visual effects: the burst of a fireball, the glow of a buff, the beam of a chain lightning, the rain over a forest, the red circle that warns of a slam. Assets > VFX lists them by type, lets you add scenes, and checks that they are built correctly.

An effect is a scene (or, for two types, a material or a texture) in res://src/data/vfx/. The folder it is in is its type, and the type decides how the game uses it:

Type (folder)FileWhat it isExamples
oneshotscenePlays once, then finishes and cleans itself up. At a place or on a characterExplosions, hits, impacts, a heal sparkle
loopscenePlays until it is told to stop. Optionally a start, a loop and an endAuras, channeled spells, buffs and debuffs, a campfire
beamsceneStretches between two points and follows themLightning chains, tethers, lasers
pathsceneRepeats a piece of effect along a line between two pointsA wall of fire, a line of spikes, a poison trail
weathersceneA loop that stays with the camera and can be blown by the windRain, snow, fog
telegraphimageA warning on the ground: the picture is the shape (a circle, a cone, a lane ...), the game draws its outline and fills it up while the ability is castThe circle of an area attack, the cone of a breath, the lane of a charge
materialmaterialReplaces the look of a character for a whileA frozen blue, a stone skin, a burning glow

The editor ​

The effect you select plays in a 3D preview that fills the panel on the right. Drag with the left button to orbit, turn the wheel to zoom, drag with the middle or right button to move the view. The bars of the preview lie over the view (see-through, so they take no room of their own on a small screen): the bar over the top holds Frame, Reset, Grid, Floor (untick it to see the parts of a hit or a low projectile that go under the ground; the choice is kept for every view), a 1.8 m figure (to judge the size), the light (the dark light shows the glow of an effect best) and the figure row (Skeleton, Animations, Attach, Turn). The figure stays hidden while a skeleton is shown, also when you select another effect. Each effect you select is shown from the Reset angle, framed. The bar over the bottom holds the controls of the kind of effect, then Tint, Scale and Fade:

KindThe preview
LoopPlays by itself. Restart plays it again from its start; End plays its end animation when the effect has one
One shotPlays when you select it and repeats after its length (the Repeat box, on to begin with). Play plays it once more
WeatherPlays by itself over the view, with an Intensity slider (0 to 1)
BeamStretches between two points: a Length slider (1 to 20 m) and Sweep, which moves the far end around so you can see the beam follow a target. The mesh named Beam is as long as the beam and turned to the far end, the way the game places it. A beam with a Curve Intensity bends toward a point beside its middle, as in the game. Chain shows the beam going on from its far end to two more targets, to see a beam that chains (lightning)
PathPuts a copy of what is under its source node every section size metres along a line, each one of the source's variants (see Making a path); the Length slider makes the line longer or shorter
TelegraphThe warning that fills up on the ground, as the game draws it: the shape of the picture you selected (its outline and its fill), a Size, a Colour (red to begin with) and the Fill (or Auto, which fills it again and again). The Shape menu (circle or square) is for the old telegraphs that have no picture and is off while a picture is shown. The size and colour of a real telegraph come from the ability that uses it
MaterialThe material on a capsule the size of a character, as its material override

The Speed slider (0.1x to 2x) slows the effect down to look at it. The Scale slider (0.1x to 4x, 1x puts it back) shows a loop or a one shot bigger or smaller, as a selection's Scale plays it in game (below). The Offset boxes beside it (Side, Up, Fwd, in metres) show the effect moved from its point, as a selection's Offset plays it. The preview starts the particles and the animations of the scene the way the effect does and places the parts of a beam and a path itself; it does not run the game side of the effect (pools, timers, attaching to a creature).

The same preview is in the Select VFX window of an ability or an effect: the effect you click in the list plays next to it.

The demo has effects of each kind to try the previews with.

ControlWhat it does
The treeEvery effect, grouped by type, with a count; each row also shows its theme and category
Theme, CategoryShow only the effects of one theme or one category. The lists are read from the names of the effects, so a new theme or category appears by itself. Pick a theme and the Category list shrinks to the categories that theme has
Search, RefreshFilter by name (the search works together with the two lists); read the folders again
ImportCopy effect files in; you choose the type
Settings > Add New VFX SceneMakes a new scene of a type, with the right root node, and opens it
Settings > Validate All VFXChecks every scene (root type, required nodes) and lists the failures
Settings > Find Missing VFXLists every VFX selection in your data that points at an effect no longer in the library, with a button that clears them (see Deleting an effect)
Settings > Delete Selected VFXDeletes the selected effect (to your system's trash); if your data uses it, first shows where and offers to clear those selections
Open in EditorUnder the preview: opens the selected scene (a material or an image cannot be opened, the button says so)

Naming an effect ​

Every effect is named by one rule, so the library can be filtered:

vfx_<theme>_<category>_<name>_<nn>        e.g.  vfx_fire_projectile_fireball_01
PartWhat it is
vfxAlways the first word
themeThe colour, the magic or the style of the effect: fire, frost, holy, blood, physical ... One word
categoryWhat the effect does: slash, projectile, area, buff, debuff, movement, beam, cone ... One word
nameWhat it is called. It can hold underscores: fireball_big
nnTwo digits for the variant: 01, 02 ...

The type (oneshot, loop ...) is not in the name: it is the folder. The Theme and Category lists of the VFX tab and of the Select VFX window are read from the names, so to add a theme you name an effect with it. The list shows the name for people (Fireball 01), the file keeps the full name. Add New VFX Scene refuses a name that breaks the rule and Validate All VFX lists the effects that do (their theme shows in orange).

Environmental effects ​

An environmental effect is scenery rather than an ability effect: a campfire, smoke from a chimney, a shaft of light through a window, a waterfall, birds. It is an ordinary scene without a VFX script that plays by itself (its animation has Autoplay on), so you can put it in the world like any other asset. It lives in the World Assets folder src/data/world_assets/environmental_vfx/ (the category environmental_vfx), not in the VFX library, and follows the same naming rule. Weather is different: weather effects stay in the weather type because the weather system plays them.

Building an effect scene ​

Add New VFX Scene makes the root node for the type you choose. Then build the effect under it with ordinary Godot nodes: particles, meshes, lights, an AnimationPlayer.

  • How it ends. A one-shot effect ends when its animation or its particles finish. Give the scene an AnimationPlayer with the animations below, or particles that are set to one-shot.
  • Start, loop and end. If the scene has an AnimationPlayer, the game plays the animation named start (or Start, Init, Begin), then loop (or Loop, Idle, idle_loop), and when the effect is stopped, end (or End, Finish, Stop, Exit). A loop with no end animation fades out and stops (see Fading in and out).
  • World space. Tick On top level on the root for an effect that should stay where it was made while its source moves.

Settings on the root node ​

TypeSettings
AllVFX Type; Auto cleanup (go back to the pool when finished); On top level; the Fade group: Fade In, Fade Out, Fade Style (see Fading in and out)
One shotDelay start; Follow target on death (keep following even if the target dies)
BeamBeam width (the width the beam is made with), Beam segments, Curve intensity (0 = straight), Follow target movement, Update continuously. Under BeamRotation the mesh named Beam is the beam itself (a tube with no caps: the game sets its length), and two optional nodes, BeamStart and BeamEnd, are put at the two ends of the beam: the flare at the caster and the contact on the target are particles under them. A beam can have layers: more tubes under BeamRotation with the metadata beam_layer (their width as a part of the beam's width: 2 is a sleeve twice as wide, 0.3 a thin core) are stretched with it, and particle nodes there with the metadata beam_along (the part of the length they cover) are spread along it, at any length (see Beam layers)
PathVFX source node (the node whose children are repeated), Section size, Section overlap, Path curve strength, Align to path (on: each section is turned so its +X runs the way the path goes there; off: every section keeps the path's own turn); Follow terrain with its layer mask, offset and maximum slope; Spawn progressively with a delay and direction; Max sections and Despawn distant sections
TelegraphSize, Shape (circle or square: used only when the telegraph has no picture), Color, Attachment (at a point, or attached to a character with an orientation), Orientation offset. The VFX type of the selection is the name of a picture in the telegraph folder (see Telegraph outlines)
WeatherThe effect follows the camera. The wind comes from the weather that uses it, not from the scene. The toolkit's own particle shader (below) leans with that wind

Making a path ​

A path repeats one section along the line between its points: the children of its VFX source node, copied every Section size metres (less the overlap). Make a section from its point forward along +X, Section size long, standing on the ground. With Align to path on, each copy is turned so its +X runs the way the path goes there, so a wall or a crack made along X follows a bending path. The copies belong to the path, so its fade reaches them.

  • Variants. Children of the source node named Variant 1, Variant 2 ... are versions of the section. Each section is a copy of one of them, picked at random each time the path plays, so a long path does not repeat the same piece. Without them, every section is a copy of all the source's children. When sections must meet (a crack or a wall running on unbroken), make the two ends of every variant the same.
  • Start, loop and end. An AnimationPlayer in the section (inside each variant) with an animation named start is played as each section appears, then its loop if it has one. When the path is stopped, every section plays its end animation while the path fades out, and the fade lasts as long as that animation. A section with a start and no loop plays once: the path ends by itself when every section has played it (an impact along a line). A section with none of these plays its animation as it was made (autoplay).
  • Spawn progressively puts the sections down one after another (every delay seconds) from the start of the path, so a wall rises along the line.
  • Particles in a section. One-shot particles fire when the section's start plays, so they go off once. To make one go off again in every loop, key its Emitting in the loop animation (off at 0, on at its moment). Particles that emit all the time keep going through the loop; key them off in the end so the section winds down while the path fades.
  • Patterns that cross sections. A material that lays its pattern on the mesh starts it again in every section, which leaves a seam where they meet. If the shader can lay its pattern in world space instead, the pattern runs on from one section into the next.

The weather effects that come with the toolkit ​

The weather folder of the project has five weather effects, each a scene of GPU particles that uses the shader weather_particles (assets/vfx/vfx_shaders), and the ten environment effects of the library (fog, dust, fireflies, pollen, ash, embers, a sandstorm, arcane motes, glow spores, falling petals: see the effects that come with the toolkit), which are made the same way. Use them as they are, or copy one and change its numbers.

EffectWhat it is
rainThin streaks that fall through a box of about 28 by 28 metres around the camera and slant with the wind. Where a drop lands it throws a few splash droplets
thunderstormHeavy rain with splashes, a second layer of wind-driven spray, a low murk and a few faint wind streaks. It blows hard even when the wind of the world is weak
wind_and_leavesLeaves that tumble and flutter across the view (green, autumn orange and brown), a little dust and faint wind streaks that sweep along the wind. They always blow at least a breeze
snowSoft flakes that drift down and wobble
blizzardMany small flakes driven sideways by a hard wind, and big soft whiteout puffs. It blows hard even in a calm world

They have a matching weather each (Rain, Thunderstorm, Wind and leaves, Snow, Blizzard) with the ground, sky, fog and wind numbers filled in, in World Configs > Weather.

The particles lean with the wind: the shader reads the global world_wind (shader globals), so the same rain slants more when the weather blows harder. The numbers are on the process material of each particle node:

NumberWhat it does
ShapeStreak (a thin box that turns along the way it moves, for rain), Flake (a quad that faces the camera), Leaf (a quad that tumbles) or Ribbon (a mesh that keeps its own size and turns its length along the way it moves: a ribbon of wind)
Area, Spread yHalf the width, the height above the camera the particles start at, half the depth. Spread y is how far below the top they start (0 = rain that falls from the top; a number fills the box, for streaks that stay at one height)
Floor belowHow far below the camera a particle goes before it is gone when nothing stops it earlier. The rain has a collision under it and stops on the ground, so this only matters where there is none
Fall speedMetres a second (a random one between the two numbers)
Wind pull, Min wind, Wind responseHow fast the wind carries a particle for each unit of wind strength; the least wind it feels (so a storm blows whatever the world wind is); how quickly it takes the speed of the wind
Flutter, Flutter speedA sideways wobble: flakes drifting, leaves fluttering
Size, Streak, Stretch, Spin speedThe size, the thickness and length of a streak (a streak in the wind is longer) and how fast a leaf turns
Color a, b, cEvery particle is one of the first two; one in three is the third when it is set
Fade far, Fade nearWhere the particles fade out at the edge of the box and close to the lens
Splash chance, Splash count, Splash speedWhen a particle lands on something: the chance it leaves a splash, how many droplets, how fast they jump. The droplets are the sub emitter of the particle node (a second particle node with the shader weather_splash)

The rain lands on the world ​

All five weather effects carry a height field (a GPUParticlesCollisionHeightField3D called RainFloor): Godot draws everything solid in a box of 36 by 36 metres around the weather, seen from above, into a height picture, and a particle that is below the highest surface of its column has landed. So with nothing set up:

  • the rain lands on floors, roofs and any mesh of your world, and throws splashes there (the terrain has its own way, below);
  • indoors it does not rain: the roof is the highest surface over the room, so the drops land on the roof, none fall inside, and through an open door or window the rain outside still falls (tested with a hut: no rain inside, rain at the doorway and beyond);
  • the same goes for a porch, a bridge deck and the ceiling of a cave.

What it cannot do: it sees one surface for each spot seen from above, so a room that is under a roof but open at the side keeps the rain off the whole spot under the roof (which is what you want), and it cannot tell a window from a wall (rain outside the window is outside the footprint, so it falls). Only meshes that are drawn into it count: a transparent surface (water, glass) does not stop the rain, a mesh on a visual layer you turned off in the height field does not (the property Heightfield mask), and a surface more than 20 metres above or below the weather is outside the box. The player's own body is a mesh like any other and catches rain too.

The height field moves with the weather (which follows the camera) and is drawn again when it moves. On the test machine the cost was not measurable; on a weak graphics card lower its Resolution (256 is enough for the splashes) or take the node out (the rain then falls to Floor below and stops there, with no splashes). Particle collision needs the Forward+ or Mobile renderer; with the Compatibility renderer the rain falls without landing.

Your own weather effect gets all of this by giving the particle node the shader, a RainFloor node under the effect, and a splash particle node as its Sub Emitter.

The terrain has its own picture ​

A terrain is not always something the height field can see (the terrain of the toolkit draws itself through the rendering server, and a terrain addon draws in its own way), so the weather does not rely on it. The weather system asks the terrain service for the height of the ground on a grid round the rain (64 by 64 metres, 96 by 96 cells) and keeps it as a small picture in two shader globals (weather_ground, weather_ground_rect). The weather shader reads it: a particle that falls below the ground lands there: a splash for the rain, gone for snow and leaves. It works for every terrain the service knows: the terrain of the toolkit, Terrain3D, HTerrain, Terra Brush. A hole in the terrain has no ground (the rain falls through).

  • The picture is made a few rows a frame and made again when the camera has moved eight metres, so nothing hitches and there is no cost while you stand still. A world with no terrain provider makes none (the height field of the effect handles the meshes).
  • It only exists while something falls. The first second of a storm that starts in a world may fall through the terrain until the picture is ready.
  • Your own weather shader gets it by declaring global uniform sampler2D weather_ground; and global uniform vec4 weather_ground_rect; and reading the height with texelFetch (the shipped shader's ground_height() is a copy to start from). Other collision nodes of Godot (a box, a sphere) work as well, for a place the height field does not cover.

Intensity ​

VFXWeather has an Intensity from 0 to 1 (a slider in the inspector, under Weather) that a weather sets while the game runs and an event can change: the effect gets thinner as it drops.

Design the effect at 1: that is its full strength, the heaviest it will ever be. Lowering the intensity only takes particles away, layer by layer; it never makes anything stronger. The script runs in the editor, so open the scene, move the slider and see the effect at 0.3 or 0.7 right there in the viewport (the rain, the splashes, the wind streaks, all of it). The value the scene is saved with is what shows when it is used on its own; the weather system sets it from the weather when the game starts.

Each particle node of the effect decides how it thins with two numbers in its Metadata (the inspector, under the node):

MetadataWhat it doesDefault
intensity_startBelow this intensity the layer emits nothing0
intensity_fullFrom this intensity the layer is at full strength1

In between the layer keeps a share of its particles: the part of the way from start to full raised to 1.5, so a light weather looks light (half way is about a third of the particles). The thunderstorm has its rain from 0 to 0.8, the spray from 0.35, the murk from 0.5 and the wind streaks from 0.1: a light storm is thin rain, a heavy one is everything. A node with no metadata follows the intensity from 0 to 1. The splash droplets (metadata weather_sub_emitter) are left alone: they follow the drops that make them.

Making your own weather effect: the hooks ​

An effect is a scene that any developer can make. This is everything the toolkit looks for, so your own scene and your own shaders get the same behaviour as the ones that come with it.

WhatWhereWhat the toolkit does with it
The sceneA .tscn in src/data/vfx/weather/ (the file name is the effect name a weather picks). The root is a Node3D with the VFXWeather script, the particles are GPUParticles3D nodes below itSpawns it at the camera when the weather starts, stops it when it ends
IntensityAn exported value of VFXWeather (Weather > Intensity, 0 to 1)The weather system sets it; you move it in the editor to test
Layer rangeNode metadata intensity_start and intensity_full on each particle nodeDecides what share of that layer is alive at an intensity
Sub emitterNode metadata weather_sub_emitter on a node that is the sub emitter of anotherLeft alone by the intensity
WindThe global shader parameter world_wind (a vec4: x and z of the direction, the strength, the speed of the gusts)Your shader reads it to lean with the wind of the weather

How a layer is thinned, in this order:

  1. If its process material is a shader that has a uniform called density, the toolkit sets density (a float, 0 to 1) to the share of the layer. If the shader also has a uniform called intensity, it gets the intensity of the weather itself (0 to 1), for a shader that wants to change more than the count: the colour, the size, the lean.
  2. Otherwise (a normal particle material, or a shader without those uniforms) the toolkit sets the Amount ratio of the node. Godot applies it only to particles that restart and with weak effect on a system that is already full, so for a good result give your shader a density.

In your shader, the density hook is two lines. A particle gets a fixed random number for its life and is alive only while density has reached it:

glsl
shader_type particles;
uniform float density = 1.0;   // set by VFXWeather
uniform float intensity = 1.0; // set by VFXWeather (optional)
// ... a random number from 0 to 1 for this particle, kept for its life (see weather_particles.gdshader)
void start() {
    // ... place the particle ...
    ACTIVE = my_random <= density;
}
void process() {
    if (my_random > density) { ACTIVE = false; } // the weather got lighter
    // ... move it ...
}

Nothing restarts when the intensity changes, so it can fade smoothly. A scene shares its materials between copies, so while the game runs each particle node gets its own copy of the process material; in the editor the intensity is put back to 1 when you save, so the file keeps the full-strength numbers.

The shaders that come with the toolkit ​

Shader (assets/vfx/vfx_shaders)What it is forIntensity hooks
weather_particlesFalling and blowing particles: rain streaks, snow, leaves, dust, wind streaks. Leans with world_wind, fades at the edge of the box and near the lens, makes splashes where a particle landsdensity, intensity
weather_splashThe droplets of a splash: the sub emitter of a weather_particles nodenone (they follow the particles that make them)

The settings of weather_particles are the table above (Shape, Area, Spread y, Floor below, Fall speed, the wind numbers, Flutter, Size, Streak, Stretch, Spin speed, the colours, the fades, the splash numbers). The shaders of the world that react to the weather are set by the weather too, through shader globals: the terrain shader (wet ground, cover, tint), the plant shaders (world_wind) and the sky (clouds, darkening): they follow the weather's own numbers scaled by its intensity, so they need nothing from you.

Using an effect in an ability ​

Where an effect goes, and which way it faces ​

A loop or oneshot selection has a Location: a point of the model (see Skeletons), Base, Weapon or Hands. Front and Behind sit in front of and behind the chest and turn with the model but not with its animations, so an effect there suits any body; the tomes, scrolls and front circles that come with the toolkit are made for Front.

Orientation says which way the effect faces on its point. It follows the point's position whichever you pick:

OrientationThe effect facesFor
PointHowever the point is turned (a hand turns with its bone)What is held in a hand, enchants, effects made for a point
FacingThe way the model faces, not its animationsAn effect at a hand that should point ahead
AimThe way the entity aims when the effect starts (its target, or the crosshair)Shoots and muzzles
UprightLevel, the way the model faced when it startedEffects that must stay level

Facing, Aim and Upright point the effect's front (its -Z, the way shots and projectiles are made) that way.

A oneshot also has Follow the point while it plays: off, the effect is left where it started (a muzzle flash does not drag along with a moving hand). Picking a shoot in the window sets these for you: a muzzle, burst or arc gets Aim and Follow off; a launch goes on Feet and stays on the ground. Picking a tome, scroll, ancient scroll or front circle puts it on Front.

In the VFX tab, Attach puts the effect on a point of the figure and Turn shows the orientation (the preview has nothing to aim at, so Aim faces the way the figure faces).

What goes where ​

A projectile ability uses a loop as its projectile VFX (it flies with the projectile), a oneshot in its casting VFX (at the hands) and a oneshot as the hit effect. A buff or debuff effect points at a loop (placed at Overhead), a hit at a oneshot (placed at Chest), a material in a VFX Selection Material with its blend mode. A beam goes in a beam VFX selection (the ability gives its two ends), a wall or trail in a path selection (the ability gives the points), an environment effect in a weather (it fades with the weather's intensity), a telegraph outline in a telegraph selection (below).

Tinting an effect ​

An effect can be put in another colour without making a new one. A tint is one colour put on the whole effect (every mesh and particle of it, and its lights):

  • Multiply multiplies the colours of the effect by the tint. It is made for neutral effects (white, grey, steel): a white effect becomes the colour.
  • Colorize keeps the brightness of the effect and replaces its colour, so an effect that has its own colours (a red flame) becomes another colour (a blue flame) and stays bright. Multiply on a coloured effect only darkens it.
  • Strength (0 to 1) mixes the tint with the colours the effect was made with. The brightest parts of an effect lean back to white, so a tinted bolt is still hot in the middle.

Where a tint is set:

  • In the Select VFX window of an ability or an effect: the Tint section at the bottom of every kind has a switch, a colour, the mode and the strength. That tint is put on the effect every time it plays, and an effect that plays next without a tint has none (effects are pooled, and a tint never stays on the next use).
  • On the root node of an effect scene: Tint Color, Tint Strength and Tint Mode are the tint the scene is saved with (strength 0 = none). A selection that sets its own tint wins.
  • In the VFX tab: the Tint row under the preview puts a colour on the effect you are looking at, to try it. It stays on while you pick other effects, so you can look at a set in one colour.

The tint works through the shaders of the toolkit (fx_tint.gdshaderinc, an instance uniform vfx_tint). The water and refraction shaders and shaders you wrote yourself do not have it, so they are not tinted; add the include to your own shader to make it follow the tint.

Variety: a different effect each time ​

An effect that plays often (a hit, a cast) looks the same every time unless it changes. Two things change it:

  • Variance, on the effect scene: the root node's Variance Node (usually a node called Vary that holds the whole effect) is turned by a random amount round Variance Axis (up to Variance Turn degrees) and resized by up to Variance Size each time it plays. The same effect, a little different.
  • Variety, on the selection: more effects of the same kind played in its place. Each time it plays, one of the main effect and its variety is picked at random. A sword hit can be any of several hits of the same look.

In the Select VFX window, the Variety section (under Tint) lists the effects of the variety. The list next to Add offers the effects with the same theme and category as the one chosen; Add all like it adds every number of the same theme, category and name (for vfx_fire_hit_impact_03: every vfx_fire_hit_impact_NN); Remove takes the selected ones off. An effect in the variety that is not in the library any more is skipped. Materials, telegraph outlines and weather have no variety (they play one fixed thing).

Name your variants with the naming rule so they group: the same theme, category and name, numbered 01, 02 ...

Beam layers ​

A beam is stretched between two points, so every part of it has to follow the length. The game does this for these parts of a beam scene (all under BeamRotation):

  • The Beam tube and every layer tube: a MeshInstance3D with a CylinderMesh (no caps, resource_local_to_scene on) and the metadata beam_layer, a number: its width as a part of the beam's width. Layers of different widths and shaders make the beam's onion layers: a thin hot core (0.3), the body (the Beam itself), a sleeve round it (1.5 to 2), a faint haze (2.5 and up). Every tube is as long as the beam at any length.
  • Particles along the beam: a GPUParticles3D with a box emission shape, local coordinates and the metadata beam_along, a number: the part of the length its particles are born over (0.9: all but the ends). Make it for a beam 10 m long: a shorter beam shows a part of the particles, so they stay as dense at any length. Particles that fly toward the target (snow streaking, shards in a stream) get the metadata beam_travel, the metres they go in their life: they are born that far from the end, so none fly past the target.
  • BeamStart and BeamEnd: the flare at the caster and the contact where the beam touches the target.

The Select VFX window of a beam has:

  • Width (1 = as the beam was made): a scale of the beam's own width. The layer tubes and the particles along it widen with it.
  • Show the start and Show the end: hide the flare at the caster or the contact at the target. An ability that plays its own hit effect where the beam lands can turn the end off, so the beam's contact and the hit do not double up. A beam made for the toolkit keeps its end small (a glow, a little mist, a few chips) rather than a full hit, so both work together too.

The beam shader (fx_beam_add for light, fx_beam_mix for matter) has, besides its flow, pulses and jitter: edge (0 is a glow bright in the middle, 1 a glass tube bright at its outline), twist (the streaks wind round the tube), helix strands (clean strands wound round it: how many, turns a metre, width, speed), and body (0 hides the tube's own glow so only its strands show).

Fading in and out ​

Every effect and every material fades: it comes in when it starts and goes when it is stopped, instead of popping. There are two styles:

  • Fade: the whole effect gets fainter.
  • Dissolve: the effect breaks up in patches that grow, with a soft edge.

On a solid, lit mesh (a rock, a skin) a fade is a fine dither and a dissolve cuts the mesh in patches, so the mesh stays solid while it fades.

An effect scene. The Fade group on the root node has three settings:

  • Fade In: seconds to come in when the effect starts.
  • Fade Out: seconds to go when the effect is stopped before it ends by itself. That means a loop or a beam that is stopped, an effect that is cleared, or a duration cut short. The effect is taken away after the fade.
  • Fade Style: Fade or Dissolve. Effects dissolve by default: breaking up in patches reads better than getting fainter for nearly every effect. Pick Fade for an effect that should only get fainter, such as a soft glow or a mist.

A fade of -1 uses the default for that kind of effect:

KindFade inFade out
One shotnone (a hit keeps its punch)0.15 s when cut short (one that ends by itself just ends)
Loop, enchant0.25 sover its end animation if it has one, so both end together; 0.35 s without one
Beam0.12 sover its end animation, or 0.25 s
Path0.2 sover its sections' end animation if they have one, so both end together; 0.3 s without one
Telegraph0.1 s0.15 s when it is interrupted
Weathernonenone (a weather comes and goes by its intensity)

Start and end in a selection. The Select VFX window of a loop, a one shot, a beam, a path or an enchant has a Start and end section, so one effect can come and go in different ways in different abilities:

  • On start and On end (not for a one shot, its animation is the effect): As made (what the effect was made with), Animation and fade, Animation only (its start or end animation, no fade), Fade only (the fade, the animation is skipped: a book that is just there, open) or Neither (it is there at once, or gone at once).
  • Fade in and Fade out: the seconds of this selection's fades; -1 keeps the effect's own (or the default of its kind, the table above). A loop that skips its end animation and has no fade out of its own fades over the plain loop time (0.35 s), not over the length of the end it skips.
  • The style: as made, Fade or Dissolve.

The preview in the window plays as the selection: Play (and the Fade row) uses its start, end and fades, and its tint and scale are shown.

Scale in a selection. A loop or a one shot selection has Scale (0.05x to 10x, 1 = as made). It is on top of the size of the point the effect is on (a big model's points are bigger) and of the effect's own variance.

Offset in a selection. Under Scale, Offset moves a loop or a one shot away from its point: Side, Up and Forward, in metres, in the effect's own frame after its turn. With the Orientation Facing, Forward is in front of the entity, so a ground mark made centred (an arc of cracks, a fissure) can be put in front of its caster. The offset grows with the Scale. Zero plays the effect where it was made. Beams, paths, enchants, telegraphs, materials and weather have no Scale: they take their size from what they cover (the two ends, the line, the weapon, the ability's area, the body, the weather box).

A material (barkskin, burning, a coat on a weapon). The Fade row of the Select VFX window sets the seconds in, the seconds out (default 0.4 s each) and the style (default Dissolve, so the material spreads over the body in patches). A skin or form that replaces the body is drawn over the body while it comes on, and replaces it only once it is all there; it is drawn over it again while it goes. The material fades out when its time is up, when the effect that put it on ends and when the entity dies.

Glowing eyes. A material can go on the Eyes of a model: pick Eyes (the eye meshes) as the Material Target. The eyes are the meshes of the skeleton named for an eye (FaceEyeLeft, FaceEyeRight), not the brows, lashes or lids. A model whose eyes are part of its body mesh has no eye meshes, so an eye material does not show on it. The library's eye glow (vfx_neutral_material_eye_glow_01) is made for this. Picking it sets the Eyes target, and the window shows an Eye colour and glow row: the colour of the glow and how bright it is. Each selection sets its own, so one eye glow serves a red-eyed demon and a blue-eyed spirit. The glow is drawn over the eye, so when it fades out the eye is as it was. In the VFX tab the eye glow goes on the eyes of the chosen skeleton (with the camera on the head), with an Eye colour and Glow row to try them.

In the VFX tab, Play and Restart fade the effect in, and End plays its end animation with its fade out. End shows for every loop, beam and enchant now, with or without an end animation.

The Fade row under the preview lets you look at a fade on its own, for an effect or a material:

  • The slider sets how much of it is on, from 100% (all of it) to 0% (gone). Drag it to see the fade at any point.
  • Fade in and Fade out play the fade over the seconds in the box next to them. On a looping effect with a start or an end animation, they play those too, as the game does: Fade in plays the start and then the loop, Fade out plays the end and fades over at least its length.
  • Loop fades it out and in again and again, with the end and the start animations.
  • Fade or Dissolve picks the style.

A material in the preview is the preview's own copy, so nothing you try there changes the material in the library.

Attach in the figure row (with a skeleton chosen) puts the effect on a point of the figure, so you see it as it plays in game: Feet, Chest, Head, Overhead, a hand, a weapon. Hands puts it on both hands, one on each, as an effect whose attachment point is Hands plays (a cast in both hands); the two play, take the tint and fade together.

The fade works through the shaders of the toolkit (fx_fade.gdshaderinc, the instance uniforms vfx_fade and vfx_fade_style; every effect shader has it). A node drawn with another material (a StandardMaterial3D, a shader you wrote) fades by its Transparency, lights by their energy, decals by their modulate. To make your own shader fade as the toolkit's do, include fx_fade.gdshaderinc and, in fragment(), multiply ALPHA by fx_fade(UV). For a solid shader, discard when fx_fade_cut(UV, FRAGCOORD.xy) > 0.5.

Decals and render layers. The toolkit's effect decals (marks on the ground under a caster, scorch marks, circles) draw on render layer 1 only: their cull mask is bit 1 (value 1). Characters are never on layer 1 (the rig puts its meshes on their own visual layer), so a decal under a character never lands on its legs, and a decal can keep a low normal fade (about 0.25) so it still covers the ground on a slope. Keep your ground, terrain and scenery on layer 1, and keep characters off it. A decal of your own that should only mark the ground takes the same cull mask.

The projectile mesh ​

A projectile effect that has a node called ProjectileMesh (a MeshInstance3D) can show the mesh of an item instead of its own. In the Select VFX window of a loop effect (the projectile VFX of a projectile effect) pick Projectile mesh:

  • The effect's own mesh: as it was made.
  • An item: the mesh of one item (its ID).
  • The weapon the user holds: the first weapon the user has equipped (a thrown axe looks like the axe).
  • The ammo the ability spends: the ammo that was spent (an arrow for a bow), then the ammo that is equipped, then the Ammo Model of the weapon in hand.

The mesh is the item's Projectile Model (a field under Item Model in the Items tab; its item model when that is empty), turned by its Turn (Projectile Rotation) so its tip points along +Y (the way projectile effects fly), scaled to the length of the effect's own mesh (or left at its own size) and centred, so the glow and the trail of the effect stay where they are. Keep the mesh's own materials shows it as the item looks; turned off, it gets the material of the effect (a glowing weapon). A ranged weapon has an Ammo Model field (with its own turn) at the end of its weapon section: the arrow it shoots when no ammo item is spent (an NPC's bow). To make your own effect take a mesh, name a MeshInstance3D ProjectileMesh, lay it along +Y and give it a metadata value projectile_slot_length (its length in metres).

Telegraph outlines ​

A telegraph is the warning an ability shows while it is being cast. Its picture is the shape, and the game draws three things from it: the outline (a line that is the same width on the screen at any distance), the shape faintly, and the fill, which sweeps through the shape as the cast goes on with a bright front and gets stronger as the cast nears its end (diagonal stripes run through the fill so it reads as danger). Choose the picture by its name as the VFX type of a telegraph selection; the size of the selection is the size of the picture on the ground, in metres, and Color tints it.

A shape that points somewhere points forward (the way the caster faces); turn them with the orientation offset. Make your own: a telegraph picture is any image in src/data/vfx/telegraph/ with the shape in the red channel (white inside, black outside, with a soft edge), how far inside the edge a point is in the green channel (0 on the edge, 1 deeper than about a sixth of the width) and the order of the fill in the blue channel (0 where it starts, 1 where it ends). In the import settings of the picture set Compress > Mode to Lossless and Detect 3D > Compress to to Disabled, or the engine compresses it and the edges break. The library's are drawn by tools/vfx/make_telegraphs.gd, which you can copy and add shapes to. A telegraph with no picture still draws the old circle and square.

Where VFX are used ​

  • An ability or effect picks an effect (and where on the character it plays: head, chest, hands, feet, the ground) with a VFX selection.
  • A world's default weather is a weather effect.
  • Destructibles play a VFX when they are destroyed, interactables when they are used.
  • An event can create one (Create VFX) or change the weather.

Deleting an effect, and missing VFX ​

A VFX selection keeps its effect by name (the file name, without the folder: the selection's kind picks the folder). Moving an effect between subfolders of its type keeps it working; deleting or renaming it leaves every selection that used it pointing at nothing. The game does not break: the effect is simply not played, and a warning is printed.

  • Settings > Delete Selected VFX in the VFX tab asks before deleting. If nothing uses the effect it deletes it. If abilities, effects, items or other data use it, it lists them and offers Delete and Clear Selections (their VFX slot becomes empty; a selection in a list is taken out of it), Delete Only (they are left pointing at nothing) or Cancel. The file goes to your system's trash.
  • Deleting from the FileSystem dock: Godot deletes the file at once; if any of your data used it, the toolkit then lists those selections and offers to clear them.
  • Settings > Find Missing VFX looks through all of your data (src/data) for selections whose effect is not in the library (deleted, or renamed outside the toolkit) and offers to clear them. Run it after deleting or renaming effects by hand.

To swap an effect instead of clearing it, open the ability or effect and pick a new VFX.

Performance ​

Every effect is loaded and compiled while the game loads, and effects are kept in a pool and reused, so playing one costs almost nothing. See Pooling.

See also ​