Question Object

The Question object determines when to carry out one or more Actions which are present in the Question object's Actions list. It does not produce a visible presence in the editor or at render time.

You can only add a Question object to the scene by clicking the ‘Add Question’ button in the emitter’s Questions tab, which adds the Question to the scene and inserts it into the emitter’s Questions list. Once that is done, you can also drag the Question object into the Questions list of any other emitter in the scene, if required. You can also duplicate the object and change the copy to a completely different question.

Each question has at least one parameter and sometimes a list of conditions. These conditions would include tests such as whether the particle value is less than or greater than the value you specify. The particle is compared to the value you give, and if the conditions are satisfied the question is said to have ‘passed’ and any Action or Actions listed in the Question are carried out on the particle. If the conditions are not satisfied the question is said to have ‘failed’ and the Action is not carried out.

An emitter may have any number of Questions. Each Question object MUST be present in the emitter’s Questions list for it to be tested.

Important: a Question won’t do anything at all until you have:

  • inserted it into the Questions list of an emitter
  • added at least one Action object to the Actions list of the Question, or made use of the modifiers to activate or deactivate lists (see below)

You can use the same Question object in more than one emitter if you wish. Just drag the Question object into the Questions list of each emitter where you want to use that same Question.

Question object interface

By default the Question object's interface looks like this:

Parameters

Question Type

There are a large number of possible questions in X-Particles, so that a single long list is not practicable. Therefore they have been divided into 6 groups, as follows:

Question Type Notes
Particle Data Tests various data items associated with a particle, such as speed, radius, etc.
Particle Position Tests any aspect of the particle's position in the scene.
Particle Flags The particle maintains a series of internal flags to indicate that some event has happened. Some of these flags can be tested with these questions.
Fluid Data Questions relating to fluid simulations.
Geometry Questions relating to geometry associated with a particle.
Physical Data The data relating to the FLIP solver can be tested with these questions.
Other Miscellaneous questions not fitting into another category

To select a question, first choose the category of question from the first drop-down menu. Then you can choose a specific question from the second drop-down menu. This menu will change depending on the selected category.

Parameters to Test

After you choose the question, you will be shown a variety of parameters to test. Most parameters apply to individual particles but some (such as Current Frame) are scene-wide.

The parameters depend on what kind of question it is so the interface will vary. Each question is described below in the Question types section.

Test Sub-Questions Mode

This is described in the Sub-Questions section below.

Create Sub-Question

Click this button to add a Sub-Question to the main Question. It will appear as a child object of the Question object.

Actions and Add Action

The Actions which will be carried out if the question is passed can be dragged into the 'Actions' list. You can create an Action object from the X-Particles menu or by clicking the 'Add Action' button, in which case the Action will be created and automatically added to the list.

Modifiers to Activate

If all you need to do is activate an action-controlled modifier, then you don't need to create a separate Action object (though you can do it that way, too). Simply drag the modifier to be activated into this list and if the question is passed, the modifier will be activated directly. You can also activate the modifier with an Action but this feature reduces the number of objects and is faster to set up.

Modifiers to Deactivate

The same as for 'Modifiers to Activate' but modifiers in this list will be deactivated.

Multiple questions

If you only have one Question in the emitter, then this section is not relevant. If you have more than one Question, X-Particles can treat them in two different ways, which can be selected by the ‘Mode’ drop-down list in the Questions tab of the emitter.

To try these modes out, create two Question objects. The first should ask if the particle age is greater than 30 frames, the second if the particle age is greater than 60 frames. Make sure that the 60-frame Question is below the 30-frame Question in the list, and change the 'Mode' to ‘Strict Sequential Order’. Next, add an Action object to each Question. In the 30-frame Question, make the Action change the particle colour to red; in the 60-frame Question make the Action change the colour to yellow. The Questions tab of the emitter should now look like this:

Play the animation. The particles should change colour from their default (blue, unless you changed it) to red when each particle is 30 frames old, and then to yellow when the particle is 60 frames old.

Testing each Question once only

In most cases you will probably want to test each question until it passes, then not test it again. To do this, ensure that the question in the list has the 'yellow tick' icon (if it has the blue dial icon, click it to toggle it to the yellow tick). Questions with the yellow tick icon have two possible modes. The mode is selected in the 'Questions' tab of the emitter and will be the same for all questions with the yellow tick icon. The possible modes are as follows.

Mode: Strict Sequential Order

This mode is easy to understand. If the selected mode is ‘Strict Sequential Order’ then each question with the yellow tick is asked in strict sequence.

Suppose you have the setup described above. The second question will not be asked until the first has been passed as true. In other words, the 60-frame question won’t be asked of a particle until the 30-frame question has been passed. That’s fine, and completely logical. But what if you drag the 60-frame question to be above the 30-frame question in the question list? Now the 30-frame question won’t even be tested until after the 60-frame question has been tested. In this scenario, what you will see is that the 60-frame Question takes effect when a particle is more than 60 frames old, then in the very next frame the 30-frame question will be asked (and will pass, since the particle is of course more than 30 frames old).

Mode: Bypass Unanswered Questions

Let’s go back to the original setup with two Questions, one testing the particle age to be more than 30 frames and the other more than 60 frames. The 60-frame question is below the 30-frame question in the list.

If you play the animation, you will see exactly the same as in the ‘Strict Sequential Order’ mode. Now drag the 60-frame question above the 30-frame question in the list, and run the animation again. You see that the particles change to red when each is 30 frames old, but never change to yellow. Why?

In this mode, the emitter will test each question in turn until it finds one which passes. In this case the 30-frame Question will pass before the 60-frame question, even though it is below the 60-frame Question in the questions list. But, in the next frame the particle ‘knows’ that the 30-frame question has passed and will look for the next question in the list. Since there is no next question, the 60-frame question will never be executed; it’s been bypassed by the 30-frame question.

Although this sounds complicated, it is in fact the more useful mode of the two and is therefore the default setting.

There is one important lesson from this: always make sure your questions are in the right order and you have selected the correct mode for what you want to do. If they aren't, you WILL get unexpected results!

You can prevent individual questions from being asked by disabling them in the object manager or by removing them from the questions list.

Testing questions repeatedly

So far, we have assumed that each question will only be tested and passed once - that is, any Action linked to the question will only ever be triggered once.

Sometimes it is desirable to test the Question in each frame, and trigger the Action(s) every time it passes. To do this, click the yellow tick icon to change it to the blue dial icon. Now the Question will be tested in every frame and will trigger its Action(s) each time it passes. The 'Mode' setting has no effect on questions with this icon, so you can mix questions with the two different icon types freely.

To demonstrate this, add a third question which will test the particle age to be greater than zero, and add an Action to it to change the colour to green. Alter the list of questions like so:

What will happen here? The question with the blue dial icon will be tested each frame, so the particles will be coloured green from the start. When the 'Particle Age > 30' question passes, the colour will change to red - for one frame only, because the next frame the question with the blue dial icon will be tested again and since it will pass, it will turn the colour back to green. The same will happen when the 'Particle Age > 60' question passes - the colour will for one frame turn yellow.

Sub-Questions

What if you want to ask two questions at the same time? Suppose you want to carry out an Action if the particle is both more than 60 frames old AND has a speed of more than 200 units/second? You can do this by adding one or more Sub-Questions to a Question.

To do this, click the ‘Create Sub-Question’ button in the Question object. This will add another Question object as a child object of the Question. This is the only way to add a Sub-Question; you cannot add one via the X-Particles menu or using the System object.

In this version of X-Particles, the separate Sub-Question object from previous versions no longer exists. There is only the one Question object which is also used when you want to use sub-questions. As well as clicking the 'Create Sub-Question' button, you can now copy/paste an existing Question object then drag it in the object manager to be a child object of another Question object. Doing that will force it to act as a sub-question.

If you import an older scene which used the original Sub-Question object, these will automatically be converted into Question objects.

When used as a sub-question, the Questions are almost identical to ordinary Questions except that you cannot add actions or modifiers to them. If you copy/paste an existing Question to act as a sub-question, and that object already contains links to actions and/or modifiers, these are ignored. Other than that, you set up the sub-question just as you would any other question. The interface is therefore very similar to the Question object except that it no longer contains the actions and modifier lists, or the button to create a sub-question.

How sub-questions work

Back in the Question object, there is an option titled ‘Test Sub-Questions Mode’. There are two modes:

AND (the default mode)

Both the main Question and all sub-questions must pass in order to carry out an action (so in the example above a particle would have to be more than 30 frames old and have a speed of more than 200 before the associated Action(s) were carried out)

OR

Either the main Question or any of the sub-questions must pass in order to carry out an action (so in the example above a particle would either have to be more than 30 frames old or have a speed of more than 200 before the associated Action(s) were carried out)

The use of sub-questions can be very useful in deciding if an action is to be triggered since you can set precise conditions in which the action can occur.

Question types

There are several types of question which can be tested by the Question object. These are as follows.

Random seed

The seed value for the random number generator. Currently this is only used for questions with a 'Fixed Within Range' question type, and for the 'Random Probability' question.

Range settings

Many questions have a range setting. This is used to create a range either side of the base value. For example, suppose you want to test particle speed and you set a basic speed value of 200 and a range value of 10. The question tests whether the particle speed is within the range of values from 190 to 210 (i.e. 200 +/- 10).

Questions using a range almost always have two modes to use the range: you can select if the parameter being tested falls within the range or falls outside it. The range is not used unless you select one of these options.

You should be aware of a problem when using ranges. For example, suppose you have a particle age question and specify an age of 30 frames with a range of 10 frames. This means that any particle with an age of 20 to 40 frames will pass the question (30 +/- 10). But since the particle always increments its age each frame, what will actually happen is that as soon as a particle is aged 20 frames, it will pass the question.

This is almost certainly not what you intended. What you probably wanted was that, when the question was asked, the particle would pass the question at some random point within that range. So one particle might pass aged 25 frames, another at 21, another at 36 and so on. To do this, select the question type 'Fixed Within Range'. Now each particle will pass the question at some point in the specified range, and it will always be the same for an individual particle each time you run the animation.

At the moment only the Age question has this option, but it will be extended to other questions in due course. Note that if the result is not to your liking you can change the age at which each particle passes the question by changing the 'Random Seed' parameter.

Particle Data Questions

Age

This is the default mode. This question tests whether a particle has a certain age. You should note that this does not mean the animation frame of the scene. For example, a particle may be emitted at frame 20 of the scene; if the Question tests whether the particle has an age exceeding (say) 30 frames, then at scene frame 30 this particle will only be 10 frames old (30 – 20) and so will not pass the question.

Parameters

There are three parameters for this question:

Mode

The question mode: whether the particle age is less than, equal to, or greater than the specified age; a fourth mode tests whether the particle is within a certain number of frames of death - see below for more details; two modes test whether the particle age is within a specified range, and the last mode tests if the particle has a specific age within the range.

Age

The age of the particle. (Or, if the mode is set to 'Is Within Time of Death the time before the particle dies.)

Range

The possible range either side of the age value.

Is Within Time of Death

In the Question mode setting, there is an option called 'Is Within Time of Death'. What it does is take the value in the 'Age' parameter and tests whether the particle will die within that many frames (or seconds). How does this work?

Suppose you have an emitter generating particles with a lifespan of 100 frames. At 95 frames old, you'd like the particle to spawn some new particles. This is easy: just add a Question testing for age equals 95 frames and use that to trigger a Spawn action. But what if the particles all have different lifespans because some variation was set in the emitter? Now you don't know what the age of each particle is. Some will spawn too long before death (if they have longer lifespans than 100 frames) while some won't spawn at all (if they have lifespans of under 95 frames). This question mode solves this problem by letting you specify an action to be triggered within a certain number of frames before death. In the above example, you would set this mode and then set the 'Age' value to 5. Now, 5 frames before death, the particle will trigger the action, no matter how long its lifespan is.

A couple of small points: the value in 'Age' now becomes the time before the expected particle death, NOT the age of the particle. If you set it to zero, the action(s) will be carried out at the moment of particle death. Of course, you may not see anything because the particle is now dead, but you can use this to spawn particles when a particle dies, for example. If you set the 'Age' value to the lifespan of the particle, the action(s) will be triggered as soon as the particle is created.

Secondly, this question uses the expected lifespan of the particle. If the particle is killed by another action, modifier, etc., these actions will not be triggered.

Fixed Within Range

>For this mode setting, the range is supplied as with the inside or outside range modes. The difference is this. Suppose the age range is 50 +/- 20 frames, that is, 30 to 70 frames. The 'Is Within Range' setting will pass the question as soon as the particle is 30 frames old - because at that point, it is within the specified range. The 'Fixed Within Range' setting assigns a specific, randomly-chosen frame to each particle within that range, so any given particle may pass the test at a specific age within that range. The advantage of this is that the question will pass, and any actions triggered, at a specific age for each particle, so it doesn't happen all at once as it does for the 'Is Within Range' mode.

Color

This question lets you test a particle's colour.

Parameters

Component to Test

This drop-down selects which of the three colour components (Red, Green, and Blue) are tested, alone or in combination:

  • RGB (Brightness)
  • Red Only
  • Green Only
  • Blue Only
  • Red and Green
  • Red and Blue
  • Green and Blue
Mode

The question mode: less than, equals, greater than, is in range or is not in range.

Component Values

The colour you want to test the particle colour against. By default this is mid-grey (RGB 127, 127, 127).

Range

Only available if the mode is one of the range questions. The lower limit of the range is the 'Component Values' colour minus the 'Range' colour, while the upper limit is those two values added together.

Be careful of the colour you select here. The default is black (RGB 0, 0, 0) so with this colour the question is the same as if 'Mode' was set to 'Equals'. If you make this colour mid-grey, and leave the default colour as it is, the question will always pass since then range is then between pure black and pure white.

Direction Change

This question tests whether a particle has changed direction in the last frame.

Note: to use this question you MUST enable 'World Speed' in the emitter's Extended Data tab. If you do not, the question will never pass.

Parameters

The parameters are:

Direction Axis

This is the axis along which the direction may have changed. There are several options:

  • Any: any change of direction of any amount along any axis will cause the question to pass. There are no specific settings for this option.
  • X, Y, Z: the direction must have changed along the selected axis. For these options, the 'Mode' and 'Direction Change' settings are available.
Mode

Only available if 'Direction Axis' is not set to 'Any'. The options are:

  • Less Than: the change in direction must be less than the value in 'Direction Change'
  • Equal To Or Greater Than: the change in direction must be equal to or greater than than the value in 'Direction Change'
Direction Change

Only available if 'Direction Axis' is not set to 'Any'. This is the amount of change in degrees to be tested along the selected axis.

Min. Age

The question will only pass if a direction change has occurred and the particle is older than the time in this field. By default it is set to zero, in which case this part of the question will always pass.

Group

This question tests whether a particle is, or is not, in a particular group.

Parameters

The two parameters are:

Mode

Whether a particle is in a group or if it is not in a group.

Groups

The list of groups to test; multiple groups can be dropped into this list.

If no group is in the groups list, the question will never pass. If more than one group is in the list and the mode is set to 'Is in Particle Group' the question will pass if the particle is in any of those groups. If the mode is set to 'Is not in Particle Group' the question will only pass if the particle is not in any of the groups.

MetaGroup

This question tests whether a particle is, or is not, in a particular MetaGroup.

Parameters

The two parameters are:

Mode

Whether a particle is in a group or if it is not in a group.

MetaGroup

A link field for the metagroup to test. The question will pass if the particle belongs to this group.

ID

Each emitted particle has its own unique ID value. This question enables an action to be carried on one specific particle, or for any particles whose ID falls into a range of values.

Note that this is NOT the actual index of the particle in the emitter's particle array, as this can change over time. It is a unique identifier for each particle.

This is not the same as testing the particle count. The particle count question looks at live particles only. In this question, if you specify an ID of 100, then the action will affect the particle with that ID if one exists. If no particle with that ID currently exists, the question will not be passed.

Parameters

There are three parameters for this question:

Mode

The question mode, which can be one of the following:

  • Equals: the particle ID is equal to the specified ID value
  • Is greater than: the particle ID is greater than the specified ID value
  • Is in range: the particle ID is between the the specified ID value and the specified ID value plus the range (e.g. if the ID is 10 and the range is 8, the particle must have an ID of 10 to 18 to pass the question)
  • Is Not in range: the particle ID is outside the specified ID value and the specified ID value plus the range (e.g. if the ID is 10 and the range is 8, the particle must have an ID of less than 10 or greater than 18 to pass the question)
  • Even-numbered particles: the particle ID must be an even number
  • Odd-numbered particles: the particle ID must be an odd number
Particle ID

The unique identifier of the particle.

Range

The ID range (used for the 'Is in range' or 'Is Not in range' tests - see above).

Radius

This question tests the radius of the particle.

Parameters

There are three parameters for this question:

Mode

The question mode, whether the radius is equal to, smaller than, or greater than, the test value, or is within or outside of the range.

Radius

The radius value to test.

Range

The possible range either side of the radius value.

Rotation

This question lets you test a particle's rotation on any axis.

Parameters

Axis to Test

The rotation axis, either H, P, or B.

Mode

The question mode: less than, equals, greater than, is in range or is not in range.

Rotation Amount

The value to test the particle's rotation against.

Range

This value is subtracted from the 'Rotation Amount' to provide the lower limit of the range, and added to it to give the upper limit.

Scale

This question tests a particle's scale.

Parameters

Axis to Test

The axis to test, alone or in combination:

  • XYZ
  • X Only
  • Y Only
  • Z Only
  • XY
  • XZ
  • YZ
Mode

The question mode: less than, equals, greater than, is in range or is not in range.

Component Values

The values to test for each axis. Not all values are used (e.g. if you are testing the scale along the X-axis, only the X component is tested and the others are ignored).

Range

Only available if the mode is one of the range questions. The lower limit of the range is the 'Component Values' setting minus the 'Range' setting, while the upper limit is those two values added together.

Speed

This mode is the same as the particle age mode except that it tests particle speed instead of age. This can be used to change (or remove) particles which are of too high or low a speed.

Important: you CANNOT use this question to test the speed of a particle stuck to its source object. The question will never pass in that case. If you need to test the speed, you must use the 'Particle Speed (World)' question instead.

Parameters

There are three parameters for this question:

Mode

Whether the particle speed is less than, equal to, or greater than the specified speed, or is within or outside of the range.

Speed

The speed of to test in scene units per second.

Range

The possible range either side of the speed value.

Speed (World)

To use this question you MUST have activated 'World Speed' in the emitter's Extended Data tab.

This question works in exactly the same way as the 'Particle Speed' except that it tests the particle's "world speed". This is the particle's actual speed in the 3D world. If a particle is stuck to an object and its internal speed (as measured by the 'Particle Speed' question) is zero, it may still be moving if the object it is stuck to is moving. That is what this question tests.

Parameters

These are identical to the 'Particle Speed' question. Please refer to that question for details.

Important: to measure the particle world speed takes at least two frames as the speed is calculated from the distance travelled between its current and previous positions. Therefore, if you test for a world speed of less than a given value, the question will pass as soon as the particle is created, since for the first two frames of a particle's life a value of zero is returned. When using this question it is recommended that you combine it with a sub-question testing that the particle age is greater than two frames. Otherwise the question may pass incorrectly, especially when using the 'less than' or 'within range' tests.

Time in Group

This question tests how long a particle has been a member of its current group. A particle can only be a member of one group at a time, but the group it belongs to can be changed. When the particle is created, or when the group changes, the time it has been in the group is set to zero then increments each frame. You can use this question to test how long it has been in its current group.

Parameters

There are three parameters for this question:

Mode

Whether the time in the group is less than or greater than the specified time, or is within or outside of the time range.

Time

The time of to test in time units (either frames or seconds, depending on user preferences).

Range

The possible range either side of the time value.

Custom Data

In the emitter 'Extended Data' tab, you can add customised particle data of your own choosing. See the Custom Data page for full details.

This question lets you query the custom data you added and trigger actions accordingly, just as with the inbuilt data such as particle speed or age.

Parameters

This question has six parameters.

ID & Name

These two fields are used to identify which custom data item to query. You should enter either ID value of the data item you want to test, or its name, or both. How these fields are used to identify a data item is explained on the Custom Data page.

Mode

This drop-down has five options which test whether the data item in the particle is equal to the value in the 'Value' field (or 'String' or 'Time' field, depending on the chosen 'Data Type' option), greater or less than the value, or within or outside of a range centred around the value.

Data Type

The type of data in the custom data item. Can be one of:

  • Float
  • Integer
  • Matrix
  • String
  • Time
  • Vector

More detail can be found on the Custom Data page.

It is up to you to make sure that the data type in the question matches the data type in the custom data item, as specified in the emitter 'Extended Data' tab. If the two are different, the results are unpredictable; you cannot, for example, really test a Matrix against a String.

Value

As with other questions, this is the value to test the data item against.

String

If the data type is 'String', then instead of the 'Value' field you will see this field instead. Enter the string to test the custom data against.

Time

If the data type is 'Time', then instead of the 'Value' field you will see this field instead. Enter the time to test the custom data against.

Range

The possible range either side of the 'Value' or 'Time' fields. Not available for the 'String' datatype.

Particle Position Questions

Distance Along Spline

This is used in conjunction with the Follow spline modifier.

Parameters

The question has four parameters:

Parameter

The test to make:

  • whether the particle has reached the end or start of the spline
  • the distance it has travelled along the spline
  • or the number of loops the particle has made along the full length of the spline

Important note: if the particle is travelling in the forwards direction along the spline, it will never reach the start of the spline as it's moving away from the start. Likewise, if it is travelling backwards, it will never reach the end of the spline as it is moving towards the start.

Confusion can arise because in a closed spline the start and end positions appear to be in the same place, so you might assume that reaching the end is the same as reaching the start. However, that is not the case for an open spline, when the start and end locations are different. Therefore, be sure to choose the appropriate parameter to test depending on the direction of movement along the spline.

Mode

For the distance and loops tests only, whether the value should be greater or less than the corresponding test value.

Distance

For the distance test only, the distance to test for in terms of a percentage value of the spline length.

Loops

For the loops test only, the number of loops to test for.

Distance to Camera

This question compares the distance of the particle from the current camera (in scene units) to the value specified in the question. You can use this to carry out an Action (for example, changing generated geometry from a high-poly version to a low-poly version when the particle is sufficiently far away from the camera).

Please note that the distance tested is the particle distance to the camera used in the current render view, not the current editor view (these may, of course, not be the same).

Parameters

There are three parameters for this question:

Mode

Whether the distance is less than, equal to, or greater than the specified distance, or is within or outside of the range.

Distance

The distance from the particle in scene units to the camera.

Range

The possible range either side of the distance value.

When using this question, you would normally use the 'is greater than' test for particles travelling away from the camera, so that the question is passed once the particle gets far enough away. The 'is less than' test is most useful for particles coming towards the camera. If you use the 'is greater than' test for far-away particles coming towards the camera, please note that the test may be passed immediately the particle is released, which is probably not what you intended.

Be very careful when testing for equality as testing for an exact distance may never succeed. If you test for 1500 units and the actual distance is 1500.1, the question will not pass.

Distance to Object

This question compares the distance of the particle from a scene object to the value specified in the question.

Parameters

There are several parameters for this question:

Distance To

There are two options:

  • Object Position: here, the distance from the particle to the object's axis is tested. Any object can be used in this case.
  • Nearest Surface Point: the distance tested is from the particle to the nearest point on the object's surface. Only polygon objects or those which, if made editable, would be a polygon object can be used.
Mode

Whether the distance is less than or greater than the specified distance, or is within or outside of the range.

Object

The object to test (the question will always fail if this is link field is empty).

Accuracy

Only available if 'Distance To' is set to 'Nearest Surface Point'. To find the nearest point the nearest polygon is calculated and random points from the surface of that polygon are tested to find the closest one. The more points are tested, the more accurate this will be. In many cases the default value of 50 is fine, and lower values may also be satisfactory. In other cases you may need more test points for an accurate result.

In general, the larger the polygons in the object and/or the shorter the 'Distance' value, the higher the accuracy that may be required. Needless to say, the higher this value, the longer it takes to test the question. This may be very noticeable with large numbers of particles and high accuracy.

Distance

The distance from the particle in scene units to the object.

Range

The possible range either side of the distance value.

Distance Travelled

This question compares the distance travelled by the particle (in scene units) to the value specified in the question.

Please note that what is tested is the actual distance travelled by the particle, not the distance from its origin to its current position. If a particle was to reverse its course and travel back to its point of origin, the actual distance travelled would be that from the origin to the point at which it changed direction, multiplied by 2.

Parameters

There are four parameters for this question:

Recorded Distance

A particle can move in the scene in two ways. Either it moves by being stuck to an object, or it moves independently. If it is stuck to its source object, the distance it moves is not recorded as part of its 'own' movement; if it is never unstuck from the object, the distance travelled by itself is zero.

However, a stuck particle is still moving. To record that distance, first turn on the 'World Speed' switch in the emitter's extended data tab. Now all movement - whether stuck or not - is recorded.

To choose which distance you want to test, use this setting. The options are:

  • Local to Particle: tests only the distance the particle moves independently
  • World: tests the distance moved by the particle either independently or when stuck to its source object (note: this will be zero if the 'World Speed' switch has not been turned on in the emitter)
Mode

Whether the distance travelled is less than, equal to, or greater than the specified distance, or is within or outside of the range.

Distance

The distance travelled by the particle in scene units.

Range

The possible range either side of the distance value.

Illumination

This question tests whether a particle is illuminated by a light. Note that this only tests if the particle falls within the illumination field of the light. It does NOT take account of any scene objects which may block the light from reaching the particle.

Currently, this question only works with Spot or Omni lights.

Parameters

Mode

Whether the particle is, or is not, illuminated by the light.

Light

The light to test - the question will always fail if this field is empty.

Use Falloff

Whether to take account of any falloff in the light's parameters; if this is unchecked, falloff is ignored.

Illumination Threshold

A threshold value - this is the illumination value of the light falling on the particle. If the threshold value is more than zero, and the test is whether a particle is illuminated, the light falling on the particle, taking the falloff into account if required, must exceed this value. If the test is if a particle is not being illuminated, the light on the particle must be below this value.

In Camera FOV

This question tests if a particle is, or is not, in the field of view of the current camera. Note that this means the camera currently in use, which can be the editor camera or some other camera. In other words, the question will fail unless the particle is in the field of view of a camera AND that camera is the current scene camera.

Parameter

There is only one parameter:

Mode

Whether the particle is in the camera FOV or if it is not be in the FOV.

Inside Volume

This question tests whether a particle is inside or outside the space occupied by an object.

Parameters

There are two parameters:

Mode

This has two options, whether the particle is inside the volume or outside the volume.

Object

The object whose volume is to be tested. This must be a collapsed polygon object or a C4D generator object or an object primitive. Objects in a Mograph Cloner or an Array object will not work. If you need to use one of these objects, drop the Cloner or Array into a Connect object and drop that into this field.

Modifier Falloff

This question tests whether a particle is within a particular modifier's falloff field.

Modifier

Drag the modifier to test into this field.

Parameters

The parameters are:

Mode

The question Mode, which can be one of the following:

  • Particle Within Falloff - passes the question if the particle is within the modifier's falloff; will always pass if the falloff is set to Infinite
  • Particle Outside Falloff - passes the question if the particle is outside the modifier's falloff; will never pass if the falloff is set to Infinite
  • Falloff > - passes if the falloff value is greater than the value given in the 'Low Falloff Value' parameter
  • Falloff < - passes if the falloff value is less than the value given in the 'High Falloff Value' parameter
  • In Range - passes if the falloff is equal to or greater than the 'Low Falloff Value' AND equal to or less than the 'High Falloff Value'
Low Falloff Value, High Falloff Value

See the 'Mode' parameter above.

Weighting

This is a random factor which affects the chance of a particle passing the question. Suppose the mode is 'Particle Within Falloff' and the Weighting is 100%. The question will always pass if the particle is within the falloff. But if the Weighting is 50%, then the question only has a 50% chance of passing even if the particle is within the falloff. This enables you to introduce some random variation and ensures that each particle does not pass the question at exactly the same point.

Nearest Particle

To use this question you MUST have activated 'Nearest Particle Data' in the emitter's Extended Data tab.

This question tests how far away is the nearest particle to or furthest particle from the one being tested. Note that it will never pass if there is only one particle in the scene - for obvious reasons, there must be at least one other particle to return a valid result!

Parameters

Parameter

There are two options:

  • Nearest Particle: the question looks at the nearest particle to the one being tested
  • Furthest Particle: the question looks at the furthest particle from the one being tested
Mode

This drop-down menu has two options:

  • Is Less Than: this tests if the nearest or furthest particle is closer than the distance given in the 'Distance' parameter
  • Is Greater Than: this tests if the nearest or furthest particle is further away than the distance given in the 'Distance' parameter
Distance

The distance to test.

Particle Position

This question tests a particle's position, either in relation to the centre of the 3D world or from an object.

Parameters

There are five parameters:

Position Space

The position space, either the centre of the 3D world or the position of an object.

Object

The object, if 'Position Space' is set to 'Object'.

Axis

This is the axis to test the distance along, can be X, Y, or Z. In other words, if set to 'X' the particle distance along the X-axis is tested against zero (if 'Position Space' is set to 'World') or the X-axis position of the object (if 'Position Space' is set to 'Object').

Mode

The question mode - is the particle position less than or greater than the distance in the 'Distance' parameter.

Distance

The distance to test.

Vortex Radius

This question tests the vortex radius of a particle. It requires a Vortex modifier to generate the required data; without one, the question will never pass. You can use this question (for example) to remove particles which have a vortex radius outside specific values.

Note that the 'Vortex Radius' is NOT simply the distance of the particle from the centre of the vortex. It is the value of the vortex radius applied to the particle being tested. Since the radius can change over time, the value will be different for particles of different ages. See the Vortex Modifier page for more details. As explained there, the vortex radius is not an absolute value for the actual size of the vortex.

Parameters

Mode

Whether the vortex radius is less than or greater than the specified distance, or is within or outside of the range.

Radius

The radius to test.

Range

The possible range either side of the Radius value.

Particle Flags Questions

Particle Collided (Object)

This question tests whether a particle has recently collided with a scene object. When that happens an internal flag is set in the particle and this question tests for that flag. The question will pass if the flag is set.

Note: this flag is NOT set for particle-particle collisions.

Parameter

This flag has no parameters.

Due to the way collisions are handled the flag is cleared automatically by the emitter in the same frame that it occurs. Therefore the question will only pass in the frame that the collision takes place, and the flag is not persisted to later frames.

It is possible to add a persistent flag by using custom data. To do this, add a new custom data item to the emitter, with an Integer type and a starting value of zero. Add an Action to the collider tag which will change the value of this custom data item to 1 when a collision takes place. This data value will remain set so you can test it at any required time.

Particle-Particle Collision

This question tests whether a particle has recently collided with another particle. When that happens an internal flag is set in the particle and this question tests for that flag. The question will pass if the flag is set.

Note: this flag is NOT set for collisions with a scene object.

Parameter

This flag has no parameters. Note that the internal flag is cleared by the emitter in the same frame that the collision occurs - see 'Particle Collided (Object)' above for more details.

Has Exploded

This question tests whether a particle has been 'exploded' by an Explode modifier. If it has, the question will pass. Note that this internal flag is only set by the Explode modifier, NOT by the Explode action in direct mode.

Parameters

There are no parameters for this question.

Has Connections

This question tests whether a particle is connected to an object or to another particle. These connections can be created by the Constraints object, the Collider tag, or the Particle-Particle Collision object.

Parameters

The only parameter is a drop-down menu from which you choose the connection type you want to test for.

Note that the question will pass if the number of the connections of the selected type for the particle is greater than zero.

Particle Frozen

This question tests whether a particle has been frozen by a Freeze modifier or a Freeze action.

This question does not test if X-Particles has been halted by a Freeze tag! By definition it cannot do so, since a halted X-Particles will no longer be able to test any questions.

Parameters

There are four parameters:

Operation

This drop-down has two settings:

  • Match any: the question will pass if any of the movement, spin, or scale switches are checked
  • Match exact: the will only pass if the switches match the frozen parameters exactly.
Frozen Movement, Frozen Spin, Frozen Scale

These switches indicate which aspect of the particle must be frozen to pass the test. For example, a particle whose movement has been frozen but not the spin will pass the test if 'Frozen Movement' is checked but not if 'Frozen Spin' is the only checked switch, since the particle spin has not been frozen.

As an example, assume the Frozen Spin and Frozen Scale switches are checked, but that only the particle's scale has been frozen. This arrangement will pass the question if 'Match Any' is selected since the 'Frozen Scale' switch is set and the scale has been frozen. However, if 'Match Exact' is selected the question will not pass because to pass it both the particle's scale and spin would have to be frozen.

Particle Stick Question

This question is used in conjunction with the Cover/Fill modifier. It tests whether a particle has reached its target point on the object to be covered or filled. It can then be used to trigger any Action(s) in the Actions list of the Question.

Parameters

There are no parameters for this question.

Snapped (Inheritance Mod.)

This question tests whether a particle has been snapped to its target position by an Inheritance modifier. If it has, the question will pass. It requires an Inheritance modifier to generate the required data; without one, the question will never pass.

Parameters

There are no parameters for this question.

Stuck to Source Object

When emitted from an object, particles can be stuck to the source object so that they move with it if the object moves. This question tests whether a particle is stuck to its source object.

Parameters

There are no parameters for this question.

Fluid Data Questions

These questions all concern fluid simulations. They require either a PBD Fluids object (Fluid Density question) or a Fluid FX object (Fluid Surface and Granularity questions) to return any useful data.

Fluid Density

This question tests the fluid density at the particle location. It requires a PBD Fluid object in the scene to return useful data.

Fluid Surface

This question tests a value which measures how close to the surface of a fluid a particle is. Note that this is not an actual distance setting. Higher values indicate that the particle is close to the surface.

The question requires a Fluid FX object in the scene to return useful data.

Granularity

This question returns the 'granularity' of a particle, which is directly related to the number of neighbouring particles. Granularity levels are therefore lower nearer the edges of the fluid since the number of neighbours is lower.

The question requires a Fluid FX object in the scene to return useful data.

Geometry Questions

Branching

This question will only work if the particle is under the influence of a Branching modifier. There are several branching parameters which can be tested.

Parameters

Question Type

This can be one of the following:

  • the length of the branch controlled by this particle, expressed in frames
  • the branch level (for use with multiple sub-branch levels - see the Branching modifier for details)
  • the maximum length of the branch, expressed in frames
  • the number of branches associated with this particle
Mode

The question mode, whether the parameter to be tested is equal to, smaller than, or greater than, the test value.

Value to Test

The value to test against the particle branching data.

Important: in the Branching modifier, the length of a branch can be set either by scene units or by the length of time the branch grows for. The Branching question always tests for the length of the branch in terms of the number of frames it has grown for (not in time or in scene units). Once the branch has reached its maximum length the number of frames will not increase (i.e. this is not testing the age of the branch but the number of frames it has grown for until stopping).

Generated Object

This question enables you to test which object is being generated by a Generator or Sprite object.

Parameters

There are four parameters:

Object Type

This can be either the Generator or the Sprite object.

Mode

Whether or not the particle is associated with a generated object.

Object Index

For the Generator only, the index of the object being generated; it is up to you to make sure that the index is a sensible one - if you enter '3' here, and Generator has only two child objects, the question will always fail.

Sprite Type

For the Sprite object only, which type of sprite is being generated; this is the same drop-down list as found in the Sprite object'

Morph Value

This question is used in conjunction with particle morphing, and tests the amount that a particle has been morphed.

Parameters

Mode

It has the following modes:

  • Morph at Maximum - this tests if the particle has reached its maximum morph value
  • Morph Value Higher Than - tests if the morph amount is greater than the value in the 'Morph Value' setting
  • Morph Value Equals - tests if the morph amount equals the value in 'Morph Value' setting
  • Morph Value Less Than - tests if the morph amount is greater than the value in the 'Morph Value' setting

Morph Value

In the last three modes, the value to test against is found in this setting.

Particle Trail

This question in in two parts. The first tests whether the particle trail, if there is one, is at one of three possible states. The second enables you to test the actual length of the trail. The interface initially looks like this:

Parameter

Trail Length

The options are:

  • Trail is at Maximum Length
  • Trail Has Zero Length
  • Trail is Less Than Max. Length (i.e. the length is somewhere between zero and maximum length)
  • Trail Length (Percent)
  • Trail Length (Absolute)

The first three options are self-explanatory. If you choose 'Trail Length (Percent)' the interface changes to this:

Choosing 'Trail Length (Absolute)' shows the same interface but the units are actual lengths in scene units rather than percentages, and the names of two parameters change slightly.

Length Mode

This drop-down menu selects the mode to use to test the length. The options are:

  • Is Less Than - the trail length is less than the specified value
  • Equals - the trail length equals the specified value
  • Is Greater Than - the trail length is greater than the specified value
  • Is in Range - the trail length is in the range given by the value setting plus or minus the range setting
  • Is Not in Range - the trail length is outside the range given by the value setting plus or minus the range setting
Length Value (Percent) or Length Value (Length)

The length value to use. This is either a percentage of the expected maximum length of the trail or an absolute value in scene units.

Length Range (Percent) or Length Range (Length)

Only available if 'Length Mode' is set to 'Is in Range' or 'Is Not in Range'. The lower limit of the range is the value minus this setting; the upper limit is the value plus this setting.

Tolerance

Only available if 'Length Mode' is set to 'Equals'. A problem arises when testing the equality of floating-point numbers. Even the slightest difference between two values leads to the numbers being considered not equal, and tiny differences can be introduced by any floating-point calculation. This setting enables a certain tolerance when considering equality. For example, at the default value of 1%, two numbers are considered equal if the difference between the values is 1% or less.

This is really a convenience setting. You could do the same by setting 'Length Mode' to 'Is in Range' with a very small range value.

Physical Data Questions

Burn, Fuel, Mass, Smoke and Temperature; Friction & Bounce; User Value

These questions in the Physical Data section all test the various physical data used with the FLIP solver. The data which can be tested include:

  • Burn
  • Fuel
  • Mass
  • Smoke
  • Temperature

These two questions test the particle friction and bounce used in collisions with scene objects or other particles:

  • Friction
  • Bounce

Finally, there is a 'User Value' which is set in the emitter's 'Extended Data' tab and this value can be tested if you select this option.

Parameters

Mode

The question mode - less than, equals, greater than, is in range or is not in range.

Value

The name of this setting will change depending on the physical data selected. In each case it is the value to test the particle data against.

Range

The possible range either side of the physical data value.

Other Questions

Boolean Input

The purpose of this question is to allow you to feed the result of an Xpresso calculation into the question object. It is used as follows.

  1. Create a Question object and set it to 'Boolean input'
  2. Add an Xpresso tag to a screen object and drag the Question object into the Xpresso editor
  3. Create (or load from a preset) an Xpresso expression of some kind - it can be anything you like but must result in a boolean output
  4. Connect the boolean output of the Xpresso expression to the Input value port of the Question object

Once this is done, you can test if the output from the Xpresso is either TRUE or FALSE and trigger an Action accordingly.

Parameters

There are two parameters:

Mode

Whether the input value should be TRUE or FALSE to pass the question.

Input Value

The input value (this is set to TRUE by default, but this has no meaning because you would normally connect up an Xpresso expression to this value).

Special note regarding Boolean questions

One problem you may see here is that the Boolean output from the Xpresso node may not be reset to the initial value when the scene rewinds to the start frame. Suppose a node outputs FALSE at the start, then TRUE at some point during the animation. Then you rewind the scene and you would expect this to be reset to FALSE. This is usually what happens but it may not in some cases. For example, if you are testing a particle state which can either be TRUE or FALSE, at the start frame there are no particles and the node cannot execute - so it retains the value it currently has. It will be reset the next frame (assuming there are particles in this frame) but if the question has already been tested and passed, it's too late.

The solution to this if you encounter this problem is to add a sub-question to the Boolean question. The sub-question should test for current frame > (start frame + 1) - i.e., if the start frame is 0, this should test for current frame > 1. This will allow the Boolean value to be reset before the question will pass.

Current Time

This mode tests whether the current scene time is either equal to or greater than the specified value. Note that its effect is quite different from the particle age question. As an example, suppose you have a Question which tests whether the current scene time is greater than 30 frames, and if so, passes control to an Action which changes the particle colour. The moment the scene frame exceeds 30, all the particles which have been produced so far will change colour, but new particles will continue to have the colour specified in the emitter.

Parameters

There are three parameters for this question:

Mode

Whether the scene time is equal to or greater than the specified time, or is within or outside of the range.

Time

The scene time to test.

Range

The possible range either side of the time value.

Particle Count

This mode tests the particle count. It looks at currently ‘live’ particles and does not include previous particles which have been deleted.

Parameters

There are three parameters for this question:

Mode

Whether the particle count is less than or greater than the specified count, or is within or outside of the range.

Particle Count

The particle count to test.

Range

The possible range either side of the count value.

Python Script

With this question, you can write a Python script to test particle parameters and trigger an Action. For details, please see the page 'Using Python in X-Particles'.

Random Probability

This question doesn't test anything in the particle. It simply generates a random probability based on the 'Probability' parameter. If this is set to 100%, the Question always passes; if it is 0%, it will never pass. Set to 50% gives the question a 1 in 2 chance of passing.

By itself this isn't very useful, but as a sub-question in combination with other questions it is quite powerful because it introduces some random variation into the actions carried out on a particle. For example, you could combine it with a particle age question and set the probability to 50%. Without the random factor, the particle age question would pass, and trigger an Action, every time a particle reached the specified age, giving a rather too uniform appearance. But with the random probability set to 50%, the Action will only be triggered in 50% of cases even when the main particle age question passes.

If necessary you can alter the seed for the random probability by changing the 'Random Seed' parameter.

Parameters

It has two parameters:

Mode

This enables you to choose between two methods of working. In X-Particles 3.5, using this question could give a different result each time the animation was run. So you might have got the perfect animation, but when it came time to render it, it wasn't the same. Now, this question will now give the same result each time the animation is run, giving more consistency. You can select which method to use with this drop-down menu. The options are:

  • Constant - the new method giving consistent results
  • Varying - the legacy mode from X-Particles 3 (switch to this one if you load an older scene which uses this question and it doesn't give the results you expect)
Probability

The probability that the question will pass.

Note: in Constant mode this question should give consistent results each time you run the animation. But if you change the number of subframes, this will change the result obtained from the question so the animation may be rather different as a result.

Number of Collisions

X-Particles keeps track of the number of collisions that have been made with scene objects (not particle to particle collisions). You can test for number of collisions with this question.

Note: this is the total number of collisions made by all particles, NOT the number made by an individual particle.

Parameters

There are three parameters for this question:

Mode

Whether the number of collisions is less than, equal to, or greater than the specified value, or is within or outside of the range.

Collisions

The number of collisions to test.

Range

The possible range either side of the number of collisions.