# Particle Tips and tricks

## Individualized random behavior

To randomize behavior/parameters per particle, use the particle ID as part in the seed of the rand function:

```rand(\$ID + <<some number>>)
```

For parameters with three components, you can add different offsets to each component to make sure they're seeded differently:

• `rand(\$ID + 1.0001)`

• `rand(\$ID + 10.0001)`

• `rand(\$ID + 100.0001)`

The rand function always returns a value from 0 to 1. To quickly convert that number to some other range, use the fit01 function. For example, to make a random number between 0.2 and 0.8:

```fit01(rand(\$ID + 492.58), 0.2, 0.8)
```

## Scale effects by mass

It is often useful to use the Scale parameter of various nodes to scale the effect of the node as a function of the particle’s mass, as set with the Property POP.

For example, if all your particles have a mass between 0.2 and 0.8, you can make a node such as Torque affect “heavy” particles less by setting the Scale parameter to:

```1 - \$MASS
```

## Manually delete problem particles

As you fine tune a simulation close to a good solution, you may find that your network is working great except for a few rogue particles (for example, you have have collisions working perfectly except for one or two escaping particles).

Depending on time constraints, you may find that instead of going back and refining the network again, it’s easier to just delete the particles manually before they can cause trouble.

1. Go up to the geometry level above your POP network.

2. Add a Delete node after the POP network and turn on its display and render flags.

3. Run the animation with point numbers on in the viewer. Note the particle numbers of the particles causing problems.

4. In the parameter editor, set Entity to Points and turn on the Enable checkbox on the Number tab. In the Pattern field, enter the space separated list of points to delete.