On this page
Create and review stylized VFX
Write stylized, game-ready visual effects in native .ashfox source (ashfox 1, vfx <id>) and compile them with the CLI. Each effect delivers triple runtime output (.glb with KHR_materials_unlit and extras.ashfoxBlendMode, .vfx.json shader/timing recipe, and a Bedrock resource-pack fragment under <target>.bedrock/ with particles/*.particle.json plus the textures/particle/*.png sprites they reference), alongside optional 2D flipbook sprite sheets (sheet = flipbook).
Author a stylized VFX effect
ashfox 1
vfx flame_cleave {
duration = 0.65s;
fps = 30;
loop = once;
palette { core = #fff6d6; mid = #ff9f38; edge = #e34224; smoke = #4a2a24; }
preview flipbook { sheet = flipbook; background = dark; width = 512; height = 512; }
preview peak { time = 0.22s; background = dark; azimuth = 35; elevation = 24; width = 640; height = 480; }
element main_slash : slash_arc {
at = 0.08s..0.38s;
blend = additive;
radius = 7u..18u;
arc = -85deg..105deg;
pitch = 16deg;
crossed = true;
texture slash_streak { posterize = 4; bristles = 60%; seed = 11; }
dissolve directional_wipe { frames = 9; edge_glow = core; }
scale = 0.72 -> 1.08 ease_out -> 1.18;
alpha = 0.4 -> 1.0 snap -> 0.0 ease_in;
}
emitter sparks : voxel_burst {
at = 0.10s..0.60s;
seed = 42;
count = 28;
shape = cone(55deg, 3u);
particle = shard;
speed = 18u..34u;
life = 0.25s..0.52s;
gravity = -28u;
drag = 1.4;
turbulence = curl(1.8, 7u);
ground { y = 0u; bounce = 45%; friction = 70%; }
size_over_life = 1.2u -> 0.9u -> 0u;
color_over_life = core -> mid -> edge;
velocity_stretch = 1.4;
blend = additive;
}
}
npx --no-install ashfox check flame_cleave.ashfox
npx --no-install ashfox render flame_cleave.ashfox --view peak --output flame-peak.png
npx --no-install ashfox render flame_cleave.ashfox --view flipbook --output flame-sheet.png
npx --no-install ashfox build flame_cleave.ashfox --json
Craft, blend, and runtime budgets
- Layered readability: Combine crisp geometric elements (
slash_arc,ribbon,ring,beam,dome) with deterministicemitterparticle bursts, quantized color palettes (core->mid->edge->smoke), and sharp dissolve silhouettes (voronoi,simplex,directional_wipe,radial_noise). - Blend modes & soft alpha: Use
blend = additivefor fiery or arcane cores,blend = premulorblend = blendfor soft smoke and impact dust. Exporters emitKHR_materials_unlitandextras.ashfoxBlendModewith 8-bit soft straight-alpha textures (glTF's convention for every mode;additiveshapes its glow through alpha), so each runtime applies alpha exactly once andpremulcomposites likeblend. - Inspect flipbooks & peak frames: Declare
preview flipbook { sheet = flipbook; }for a sprite-sheet grid plus.flipbook.jsonmetadata, and render singletime = ...views withbackground = darkortransparentto verify silhouette timing. The sheet holds at most 36 cells, so.flipbook.jsonfpsis the sheet's own playback rate (frameCount / durationSeconds, which can differ from the recipe'sfps), and cellishows the middle of its interval. Replay GIFs play in real time and honour the clip loop mode: aonceeffect holds its last frame instead of restarting. - Budget targets & stdlib recipes: Built
.glbartifacts stay within stylized game limits (<= 4draws,<= 2,500triangles,<= 150 KB). Reuse parameterizedstd/vfx/*recipes viause(std/vfx/weapon/plasma_bolt,std/vfx/shield/*,std/vfx/magic/*,std/vfx/weather/*,std/vfx/impact/*) — inspectshowcase/assets/vfx/plasma_bolt.ashfox. - Runtime GLB layout: Each particle burst becomes rigid skinned meshes. A burst has one joint per particle plus one STEP-switched child joint per color stage, and its stage tint is stored in
COLOR_0. Each chunk binds at most 64 joints and is one draw call; all chunks share one unlit material and are taggedextras.ashfoxKind = "vfx_burst_skin". Skinned chunk nodes are scene roots with no local transform. Every particle joint starts at scale0, so runtimes should turn off per-object frustum culling for these chunks (the generated runtime SDK does this). Every dissolve or alpha-fade element is one draw call: its frames are copies of the element mesh in one skinned primitive taggedextras.ashfoxKind = "vfx_frame_skin", each bound to a STEP-switched frame joint under the element node, all sharing one material. Dissolve frames bake their opacity into their atlas cell, and alpha-only frames carry flat per-frame vertex alpha. - Bedrock particle lowering: Each
emitterbecomes one.particle.jsonwith its start time, spawn window, speed and lifetime ranges, shape, gravity, drag, spin, size-over-life curve and palette gradient, in blocks (16 authored px = 1 block, the GLB scale). Copy<target>.bedrock/into a resource pack root. Behaviour Bedrock cannot express (mesh elements,turbulence,vortex,ground, velocity stretch length,arcsweep) is reported as avfx.bedrock.unsupportedbuild warning; the GLB and flipbook keep it.
See VFX syntax reference for the full ashfox 1 VFX grammar and block options.
Ready to make something?
Get agent instructions →