Write down the atlas contract first
Before touching an engine material, record the frame count, columns, rows, cell dimensions and frame rate. A PNG stores pixel data, not all of these playback decisions. The current 2VFX generator creates 16 frames in a 4×4, 512×512 atlas. Cells are 128×128 and the default playback metadata is 12 FPS.
The basic duration calculation is frame count divided by frames per second. Sixteen frames at 12 FPS take about 1.33 seconds. If you play that sheet over a two-second particle lifetime, lifetime-based playback will look slower than fixed 12 FPS playback. Neither is automatically wrong; the result must match the intended event.
duration = frameCount / fps
16 / 12 = 1.333… seconds
cellWidth = atlasWidth / columns
512 / 4 = 128 pixelsKeep image generation separate from emitter editing
Open 2VFX, choose a procedural effect and generate its flipbook. Download the PNG and save the .2vfx source. The image is generated from the preset; it is not a bake of every native Unity module. If you later change the preset’s colours or overall look, generate again when you want those changes in the atlas.
Inspect a few cells at full size before export. The centre of a soft smoke frame may be opaque enough while its border remains translucent. A hard black rectangle in an ordinary image viewer does not by itself prove missing alpha: the viewer may simply be compositing on black.
Configure Unity Texture Sheet Animation
For manual setup, select the Particle System component, enable its Texture Sheet Animation module, choose Grid and enter the exact tile counts. Whole Sheet playback walks through the grid; Single Row is a different layout contract. For the generated default use 4 by 4 and confirm that the chosen frame order matches the atlas.
Choose FPS, Lifetime or Speed timing deliberately. FPS separates animation rate from particle lifetime. Lifetime samples a frame curve as the particle ages. Speed ties playback to the velocity range. When you import the 2VFX .tgz and run its builder, inspect the resulting module instead of assuming a manually changed texture layout will be detected automatically.
Test transparency on more than a checkerboard
Compare the same frame over black, medium grey and white. A dark edge that changes with background can indicate a straight-versus-premultiplied alpha mismatch. A coloured seam can also come from filtering across neighbouring cells. Use the same texture, blend convention and colour space before adjusting brightness.
Unity’s Alpha Is Transparency option can improve RGB around transparent edges for ordinary imported textures, but it cannot reconstruct alpha that never existed. Do not use it as a substitute for checking the source. The generated package creates its own texture asset; manual texture-import options are a separate workflow.
A small acceptance checklist
A successful import is not the end of the test. View the effect at gameplay size and play the complete sequence several times. Check the first frame, the peak, the last frame and the loop transition. If your camera can orbit, check the billboard from those viewpoints too.
- No clipped flame tips or sparks in any frame.
- Correct row and column counts; no neighbouring cell appears at an edge.
- Expected loop duration and no accidental extra first-frame hold.
- No dark fringe on a bright background.
- The saved .2vfx and exported PNG identify the same variation.
- URP/HDRP and arbitrary custom materials need separate validation; the current 2VFX package targets Built-in.