Byte Engine Docs

.particles files

Look up the fields, modules, and shapes of a .particles file, and the resources that baking one produces.

A .particles file describes one GPU particle system as a list of data modules. Baking turns them into one simulation kernel and one draw pipeline, so a system runs no code for modules it doesn't list. For editor completion, point "$schema" at the engine's schemas/particles.schema.json, relative to your file. To place a system in the world, follow Add particles.

Fields

FieldMeaning
capacityHow many particles can be alive at once, up to 1,048,576. GPU memory is 64 bytes per particle.
lifetimeThe shortest and longest life of a particle, in seconds, from 0.016 to 1024.
spawnrate in particles per second and burst per publish, for emitters that don't set their own.
initializeModules that place and launch new particles in the emitter's space. Their results add up.
updateModules that change every live particle each frame, in order.
render.shapeThe camera-facing quad each particle draws as.
render.colorThe light a particle emits over its life, in nits, as stops interpolated by age from 0 to 1.

Modules

ModuleSectionFields
sphereinitializeradius: starts particles at a random point inside a sphere, in meters.
boxinitializesize: starts particles at a random point inside a box centered on the emitter, given as width, height, and depth in meters along the emitter's local axes. Set a side to 0 to spawn on a plane, such as rain falling from a ceiling.
coneinitializeangle: the half angle around local +Z, in radians. speed: the slowest and fastest launch speed, in meters per second.
accelerationupdatevalue: a world-space acceleration in meters per second squared, such as gravity or wind.
dragupdatecoefficient: the fraction of speed lost per second at low speed.

Shapes

ShapeFields
streakwidth in meters, and stretch: how many seconds of travel the streak shows behind the particle.
billboardsize: a round sprite's diameter in meters.

What baking produces

Baking effects/sparks.particles stores:

  • the ParticleSystem resource under effects/sparks.particles
  • the effects/sparks.particles#simulate and effects/sparks.particles#draw pipelines
  • their generated shaders under effects/sparks.particles#shaders/

Requesting any of them bakes them all. An invalid file fails to bake with a message that names the field.

On this page