Freeze property

When this modifier is inserted into a modification pipeline, it takes a snapshot of the current values of the selected particle property. It will subsequently write the stored values back to the selected output particle property (which, by default, is the same as the source property), overwriting the current values of that property. Thus, this modifier can be used to freeze a particle property that, otherwise, would be changing with simulation time.

The modifier automatically takes a snapshot of the current state whenever the user selects a new source property for the modifier. The snapshot is always taken at the current animation time. You can explicitly take a new snapshot at any later time by clicking the Take new snapshot button, which will replace the per-particle values stored by the modifier with the current values produce by the modification pipeline.

By default, the stored property values are written back to the same property from which the snapshot was originally taken, overwriting the current values of that property. If you want to preserve the current values, you can let the modifier write the stored snapshot to a new property instead by entering a different name in the Output property field. Then both the current property values and the ones stored by the modifier will be available to other modifiers following in the modification pipeline.

Example 1

Initial frame:Without Freeze Property modifier:With Freeze Property modifier:

The first picture shows the initial frame of a simulation sequence where the Color coding modifier has been used to color particles according to their position along the X axis. Then the solid is sheared and particles move (second picture). This motion causes the colors of individual particles to change, because they are dynamically computed by the Color coding modifier on every simulation frame based on the current positions.

To suppress this dynamic updating of particle colors, we can use the Freeze property modifier. It allows us the take a snapshot of the particle colors at the beginning of the simulation. Subsequently, the modifier will overwrite any new colors generated by the Color coding modifier with the stored colors (third picture). Thus, the Freeze property modifier allows us to "bake in" a dynamic particle property such as the color so that it becomes static and does not change with simulation time.

Example 2

The modifier is also useful if we want to compare per-particle properties that change over time with their initial values at the beginning of a simulation. Let's suppose, for instance, we want to determine the amount by which the charge of each particle changes during a simulation. We assume in this example that the current particle charges have been computed by our simulation code for each simulation frame and that they are stored in the particle property Charge.

We can use the Freeze property modifier to take a snapshot of the initial particle charges at frame 0 by selecting Charge as the source property. In this case we do not want to overwrite the current charge values with the initial ones, because we want to compare them with each other. This is why we set the modifier's Output property to the name InitialCharge. This will let the modifier write its stored values to a new property with a different name and preserve the current values stored in the Charge property.

Finally, we can use the Compute property modifier to compute the difference between the particle properties Charge (which is time-dependent) and InitialCharge (which is static thanks to the Freeze property modifier) at each frame of the simulation sequence.

Example 3

Another typical scenario for this modifier is described in this tutorial.

Implementation note

If the Particle Identifier property is defined, the modifier use the IDs to assign the stored property values to the correct particles. If no particle IDs are defined, then the number of particles and the order in which they are stored must not change in between simulation frames.