Surface Test operator

The Surface Test operator tests if a particle’s relationship to a nearby surface satisfies a condition.


Objects

  • Input object list: the list of input objects to test.

Sample

  • Sample type: controls which sampler will be used to determine closest-surface proximities for particles.

Surface Test Mode

  • Integrate particle velocity for test: when enabled, a particle’s test position will be its current position plus its current velocity. When disabled, only its current position will be used.

For certain tests, you may want to disable “integrate particle velocity for test”. For example, when testing whether PhysX particles are inside/outside a volume, you may want to disable this option because their current velocity will not be equal to their final velocity - due to the fact that their final velocity may be modified by the PhysX solver at the end of the time step, resulting in a less accurate surface test than if “integrate particle velocity for test” was disabled.

Inside/Outside Volume

The test condition will be satisfied if the particle is inside/outside the nearest surface.

  • Accuracy: controls the accuracy of the raycaster used to compute information about whether a particle is inside or outside of an object’s volume.
Variation: the per-particle amount of variation to apply.
Distance

The test condition will be based on the distance between the particle and the nearest surface.

Distance (first vertex)

The test condition will be based on the distance between the particle and the nearest first vertex.

Distance (last vertex)

The test condition will be based on the distance between the particle and the nearest last vertex.

First/last vertex distance tests are useful when trying to determine if a particle following a path has reached the start/end of the path.

Distance (first or last vertex)

The test condition will be based on the distance between the particle and the nearest first or last vertex.

Distance (edges)

The test condition will be based on the distance between the particle and specified edges of the mesh.

Edges
  • Open edges: the test will measure distances to open edges (edges connected to a single face).

  • By angle: the test will measure distances to edges whose adjacent faces form an angle that matches the specified angle condition.

  • Less than/greater than: the angle condition.

  • Value: the angle, in degrees, for the angle condition.

Variation %: the per-particle percentage of variation to apply.
Distance
  • Less than: the test condition will be satisfied if the distance is less than a certain value.

  • Greater than: the test condition will be satisfied if the distance is greater than a certain value.

  • Absolute distance: the test distance will be set to a specific value.

  • Value: the specific distance test value.

  • Shape radius: the test distance of each particle will be set to each particle’s shape mesh radius.

  • Scale radius: the test distance of each particle will be set to each particle’s maximum scale dimension.

  • Multiplier: the multiplier to apply to shape/scale radius values.

Variation: the per-particle amount of variation to apply.
  • Zero distance if inside volume: particles inside the volume of a mesh will be assigned a distance value of zero, even if the distance to the closest mesh face is greater than zero.

Enable “zero distance if inside volume” in order to simultaneously test for particles within the assigned distance threshold, and all particles inside the mesh.

Raycast/No-Raycast Intersection

The test condition will be satisfied if a raycast along a specified vector hits or doesn’t hit a surface.

  • Direction from vel: the ray will be cast along the particle velocity vector.

  • Absolute direction: the ray will be cast along the specified vector.

  • X/Y/Z: per-axis values for the raycast vector, in world-space.

  • Infinite length: the ray can hit any object, no matter how far away it may be.

  • Finite length: the ray will only hit objects within a finite distance of its starting point.

  • Length: the length of the finite ray.

  • Save hit location: when enabled, the location of any ray hits will be saved to the specified custom vector channel.

Raycast occlusion

The test condition will be satisfied the number of random rays that hit a surface is above a certain threshold (or don’t hit the surface if ‘invert’ is checked)

  • Num rays: the number of random rays to cast (higher = more accurate).

  • Length: the length of each ray.

  • Spread: the maximum divergence, in degrees, along computed surface normals that the rays will be cast.

For surface occlusion, a spread of 90.0 is best. For 3d space occlusion, a spread of 180.0 is best.

  • Threshold %: the percentage of rays that must hit a surface to satisfy the test condition.

  • Invert: when enabled, the condition is inverted (it will be satisfied if a percentage of rays above the threshold do not hit a surface).

Nearest Texture

The test condition will be satisfied if a texture sampled on the nearest point of the nearest surface satisfies a certain condition.

  • Texmap: the texture map to sample.

  • Surface offset as W: the distance from the particle to the closest surface will be used as the W coordinate in the UVW value which is used to sample the texture.

  • RGB less than: the test condition will be satisfied if the magnitude of the sampled RGB value is less than a specified value.

  • RGB greater than: the test condition will be satisfied if the magnitude of the sampled RGB value is greater than a specified value.

  • Value: the RGB test value.

  • Variation %: the per-particle percentage of variation to apply.
  • RGB is threshold: the normalized magnitude of the sampled RGB value will be used as test condition probability.

Nearest Material ID

The test condition will be satisfied based on properties of the nearest face’s material ID.

  • Less than: the test condition will be satisfied if the nearest face’s material ID is less than the specified value.

  • Greater than: the test condition will be satisfied if the nearest face’s material ID is greater than the specified value.

  • Equal to: the test condition will be satisfied if the nearest face’s material ID is equal to the specified value.

  • Not Equal to: the test condition will be satisfied if the nearest face’s material ID is not equal to the specified value.

  • Mat ID: the material ID test value.

Nearest Element ID

The test condition will be satisfied based on properties of the nearest face’s element ID.

  • Less than: the test condition will be satisfied if the nearest face’s element ID is less than the specified value.

  • Greater than: the test condition will be satisfied if the nearest face’s element ID is greater than the specified value.

  • Equal to: the test condition will be satisfied if the nearest face’s element ID is equal to the specified value.

  • Not Equal to: the test condition will be satisfied if the nearest face’s element ID is not equal to the specified value.

  • Element ID: the element ID test value.

Nearest Normal

The test condition will be satisfied based on properties of the nearest normal on the nearest surface.

  • Particle X/Y/Z: tests whether the nearest normal is aligned to the selected local particle transform axis, within the specified threshold.

  • By Object: tests whether the nearest normal is aligned to the local Z-Axis vector of some object, within the specified threshold.

  • Object: the object whose local Z-Axis will be used for the normal test.

  • By Value: tests whether the nearest normal is aligned to a specified normal, within the specified threshold.

  • X/Y/Z: the per-axis values of the specified normal.

  • Thresh: the threshold used to determine normal alignment.

  • Flip normal: controls whether the test normal will be flipped.

Nearest Velocity

The test condition will be satisfied based on properties of the nearest surface velocity magnitude on the nearest surface.

  • Less than: the test condition will be satisfied if the nearest velocity magnitude is less than a certain value.

  • Greater than: the test condition will be satisfied if the nearest velocity magnitude is greater than a certain value.

  • Value: the magnitude test value.

Variation: the per-particle amount of variation to apply.
Nearest face is selected

The test condition will be satisfied if the nearest face on the nearest surface is selected.

Nearest vertex is selected

The test condition will be satisfied if the nearest vertex on the nearest surface is selected.

Noise

The noise settings allow you to offset the way in which particle positions are measured during the distance/volume tests.

  • Noise mode: controls which noise algorithm will be used.

  • Noise texmap: the texmap that will be used by the noise texmap mode(s).

  • Noise preview: a preview image showing a 2D representation of the selected noise mode.

  • Strength: the strength of the noise (a multiplier on the default noise range of [-1, 1]).

  • Frequency: the speed at which the noise will evolve over time.

  • Scale: the scale multiplier for position values sent through the noise algorithm. Smaller values create larger noise patterns.

  • Roughness: controls the amount of extra detail applicable noise modes will generate.

  • Lacunarity: controls the scale of successive noise octaves for applicable noise modes.

  • Gain: controls the relative intensity of successive noise octaves for applicable noise modes.

  • Iterations/Octaves: controls the number of overlapping noise patterns that applicable noise modes will generate.

  • Phase: provides manual control over the evolution of the noise over time.

Accuracy

  • Consider particle meshes: when enabled, particle meshes will be considered during surface tests (using an implicit point method), not just particle positions.

  • Vertex multiplier: the number of extra implicit points to create for testing purposes. This value is a multiplier on the number of vertices a particle’s shape mesh has.

For various reasons, it is not practicle to perform mathematically exact calculations when doing surface tests using particle shape meshes. Instead, an implicit point method is used to approximate exact results. This method uses extra points scattered on the shape mesh to perform tests. When vertex multiplier is set to 1, all of a particle’s shape vertices will be used for the test. When vertex multiplier is greater than 1, random points on the particle’s shape mesh will be generated and used for the test as well. The total number of implicit points generated will be equal to: [(vertex multiplier) * (particle shape mesh vertices)]. The greater the vertex multiplier value, the more accurate the results (at the cost of performance).

Uniqueness

  • Seed: the seed value for all varied parameters.