Value types in the Emitter Guide

Value types in the Emitter Guide

Almost every number in the Emitter Guide — a starting size, a speed, a colour — is a value, and every value has a type that decides where its number comes from. The type button at the left of each value opens the menu of types that make sense in that particular slot.

This page is a reference to those types. How a value becomes several rows combined by an expression is a separate topic — see Multi-values in the Emitter Guide.

Why the menu differs from slot to slot

The menu never shows every type that exists. A type appears only when it can actually produce a number in that slot:

  • Dimension. A type that yields one number (like Random) is offered for a 1D slot; a spatial type such as Sphere only for a 3D one.
  • Stage. Camera direction exists only while the particle is being drawn, so it is offered on construction-stage values and nowhere else.
  • What the emitter is made of. Types that read another part of the emitter are offered only when that part exists: Particle velocity needs a moving particle, and the generator-backed types below need a generator that has the thing they read.

If a value is set to a type and the emitter later loses what that type needs — you switch to a generator without it, for example — the value quietly falls back to its default type rather than becoming invalid.

The everyday types

  • Fixed — one constant number, the same for every particle.
  • Random — a number drawn from a range, once per particle.
  • Graph — a curve; the value follows it over the graph's own X axis.
  • Over particle life / time / speed — a graph driven by how far the particle is through its life, how long it has lived, or how fast it moves.
  • Over emitter time / system time — a graph driven by the emitter's or the whole effect's clock, so all particles change together.
  • Emitter property — a number your game sets at runtime.

Spatial types

Offered for 3D slots — most usefully for a starting position:

  • Sphere, Circle, Area — a random point on or inside a shape.
  • Point from path, Point between paths — a point taken from a path you draw.
  • Grid — a node of a rectangular grid, so particles snap to regular positions.
  • Particle position, Emitter position — the current position of the particle or of the emitter itself.

Reading the particle and the camera

  • Particle velocity — how fast and in which direction the particle moves.
  • Particle direction — the direction of movement as a unit vector. Unlike velocity it stays meaningful when the particle stands still, which is why it is the better choice for orienting geometry.
  • Camera direction — the direction from the camera to the particle; available on construction-stage values, typically to face geometry at the viewer.
  • Noise — smooth 3D noise sampled at a point you choose (by default the particle's own position).

Reading the generator

These types read the generator that spawns the particles, so they are offered only when the current generator kind actually provides them. Both are frozen at the moment the particle is born: they describe the shot the particle came from, not the generator's state later on.

  • Gen burst position — where the particle sits inside its own burst: 0 for the first particle of the shot, 1 for the last one. Available for the Periodic, Distance and Even Ring generators. Use it to spread a burst along a gradient, a circle or a line.

  • Number of shots — how many shots the generator had already completed when the particle was born: 0 for the particles of the very first shot, 1 for the second one, and so on. Available for the Periodic and Even Ring generators. Use it to make each shot differ from the ones before it — every volley a different colour, each wave slightly larger than the last.

    On GPU33 this count is not stored anywhere but computed from the emitter's time. That gives the same numbers as the other backends as long as the generator's timing (rate, burst, delay, start phase) stays constant. If any of those is driven by a changing value, exporting reports a warning, because the count may then drift.

Reading the emitter

  • Number of particles — how many particles this emitter instance currently has alive. Useful to make an effect react to its own density: thin out the colour as the count grows, or drive a value from how crowded the emitter is.

    Not supported by GPU33. On the GPU there is no way for a shader to read how many particles are alive, so exporting an effect that uses this value to GPU33 reports a validation error. If what you need is a counter that grows over time, use Number of shots instead.

Custom values

  • Custom value — a reference to a named value you defined once in the emitter's Custom values section and reuse in several places.
  • Over this value — a graph whose X axis is one of those custom values, so one number can shape many others.

See Multi-values in the Emitter Guide for how these combine with rows and expressions.