The Collider Tag
This tag forms part of the collision engine used in X-Particles. In order to test for collision between a particle and a scene object, the scene object must have an instance of this tag attached to it.
In this version, particles can now collide with splines as well as polygon objects. You don't need to add any geometry, just a primitive or editable spline itself is sufficient.
For more information about collisions, please see the Collision Engine page.
The tag has the following tabs and sections:
- Tag tab
- Groups affected tab
- Exclusions tab
For the buttons at the bottom of the interface, please see the 'Common interface elements' page.
Note: the interface from the latest early access beta version is shown. In the current release version, the 'Groups Affected' tab does not exist, but the groups list is found in this quicktab.
If this switch is unchecked, the object to which the tag is attached will not be checked for collisions with any particles.
The collision engine in this version of X-Particles uses adaptive bounds for the collisions. Essentially, instead of testing every polygon in an object to see if a particle is colliding with it, the engine only tests relevant areas of the mesh by dividing the mesh into smaller and smaller boxes until the are containing the correct polygon is found. This makes for much faster collisions than in previous versions.
if you wish, you can show the adaptive boxes as they are created by checking this switch. This can be useful if you have multiple colliders and you aren't sure if particles are colliding with one of them.
Here is an example using particles colliding with a Landscape object. You can see clearly where the collisiions are occurring:
Bounce on Collision section
For particles to bounce from the collider object, check the 'Enabled' switch in this section. If this is switch is unchecked, no bounce will occur but note that the collision is still registered. For example, if you have an action which is triggered by a collision, it will be triggered even if this switch is unchecked.
This drop-down has three options:
Normals on objects tend to point outside of the object, so the interior of the object should be the opposite direction of the normal. This is Outside. Any particle found "inside" the object (by using the normals) is pushed out.
However, sometimes you want to keep particles inside the objects (e.g. particles in a cube); this is Inside.
If you just want to take your chances and ignore the inside/outside and just go for the particle hitting the polygons, then this is Any (and tends to leak easily!).
Bounce and Bounce Variation
The bounce controls the speed with which the particle will rebound from the object. A bounce of 100% means that the speed after hitting the object is the same as before hitting it.
Friction, Friction Variation
These settings add friction between the particle and colliding surface. Suppose you have a scenario in which particle fall onto a surface (perhaps under the influence of a Gravity modifier). They bounce, fall back and bounce again, until they simply roll along over the surface. They will do that until they fall off the object or until the scene ends.
Friction will cause the rolling particles to come to a halt. The higher the setting, the more quickly they stop. You can add some random variation to the amount of friction with the 'Friction Variation' setting.
When bouncing from flat surface, the particles will rebound at a reflected angle which is correct for the angle at which the particle strikes the surface. For example, if the particle hits the surface at an angle of 90 degrees to it, the particle will bounce back in a direction which is the exact reverse of its original course.
This is geometrically correct but not necessarily realistic. 'Scatter' does exactly that - causes a degree or spread or scatter when the particle stream rebounds from a surface.
The distance between the particle and the collider object at which the collision occurs is determined by the particle radius. This is not always appropriate for some surfaces - the particle may get too close to the surface before colliding. The 'Expand' setting is used to increase the collision radius and can therefore be applied on a per-object basis.
Connect on Collision section
Connections are part of the Constraints system. For more details of what they are, please see the Constraints object.
Connect on Collision
If this switch is checked, connections may be made between the particle and the collider object. Bear in mind that you may not see any if the nature of the collisions, friction, bounce, etc. mean that the connection can never be made, or breaks immediately it is made.
The maximum number of connections a particle may make to a collider object.
This controls how "strong" the connection effect is.
A measure of how much the connection can stretch before it breaks. 0% means that the connection will never break. 50% means that it will break when it has stretched 50% of its original length.
Dragging a vertex map into this field will alter the connection stiffness. Maximum stiffness will apply where the vertex weight is 100%, and will not apply at all if the weight is zero.
Actions on Collision section
You can drag one or more Actions into this list and those Actions will be carried out on each particle when it collides with the object. You can use any Action you like. Note that the Action you use does NOT have to be associated with a Question. The Action is triggered directly by the collision - in effect, the collision event acts as a question which triggers an Action.
Clicking this button will add an action to the scene and drop it into the Actions list.
This section is used when a PBD Fluids object is used for fluid simulation.
This adds an additional calculation to the fluid simulation to correct the fluid density along the colliders boundary. Where the smoothing radius is cut off by a collision boundary the density calculated of the surround fluid is too low. This causes the fluid to try and pull together to increase the density, making the fluid particles along collider boundary too close (density higher than set). With this option enabled a correction is applied to estimate what the true density is, but at the cost of slowing the fluid simulation down.
The collider surface attracted fluid particles near the surface.
The collider surface repels the fluid particles near it, this can be used to help push near boundary fluid particles away if they are stacking up along the collider boundary.
Attraction and Radius
This represents an attraction force between the particle and the collider. You can set the force in the 'Attraction' parameter. The particle must be as close or closer to the collider object than the value given in the 'Radius' setting before the force will have any effect.
Repulsion and Radius
This represents a repulsion force between the particle and the collider. You can set the force in the 'Repulsion' parameter. The particle must be as close or closer to the collider object than the value given in the 'Radius' setting before the force will have any effect.
By default particles are attracted to (or repulsed from) the whole mesh, subject to the 'Radius' settings. If you want the force to apply to only part of the mesh, drag a vertex map into the Falloff link field. Maximum force will apply where the vertex weight is 100%, and will not apply at all if the weight is zero.
This drop-down has two settings:
The objects the particle collides with is unaffected by the collision.
The object the particle collides with will be moved by the collision in a direction away from the particle after collision.
The colliding object can be given an initial velocity on the X, Y, or Z axes with this control.
This is the mass of the object, the lower the mass the more effect 'Translate' mode has on particle collision.
Set Rest State, To Rest State
If you add a Collider tag to an object and set 'Reaction' to 'Translate' you may find that, if you move the object and the play the scene, the object jumps back to the position it was in before it was moved. To fix the initial position of the object, click 'Set Rest State'. To move an object to its initial (rest) state, click 'To Rest State'.
The collision engine can spawn new particles on collision. You don't need a spawn modifier or action to do this; the collision engine triggers the spawning directly.
This switch must be checked before spawning takes place.
Drag an emitter into this field; this emitter will be used to generate the new particles. As explained in the Spawn modifier page, it is NOT a good idea to use the same emitter which is producing the particles which collide and trigger the spawning. Use a different emitter instead. When you drag an emitter into this field, the 'Emission Mode' setting in that emitter will automatically be set to 'Controlled Only'. You can change that setting manually if you really need to.
Add Spawning Emitter
Click this button to create a new emitter and add it to the 'Spawning Emitter' field.
Spawned Particle Position
This drop-down determines where the particle will be emitted. It has two choices:
The spawned particles will be emitted from the point of collision. In this mode, the direction of the spawned particles is determined by the Direction setting (see below).
Determined by Emitter
In this mode the spawning emitter decides where the particles are emitted. So you can have the spawning emitter emit particles from an object which may be at a completely different position from where the collision occurred. The spawning emitter also determines the direction of the spawned particles.
This is how the direction of the spawned particles is determined. It is only available if 'Spawned particle position' is set to 'Collision point'. The collision engine page gives more details, especially on the difference between 'Source particle' and 'Face normal' directions. There are three options:
The direction of the spawned particles is set to a random value, which in practice means that the spawns adopt a spherical distribution.
In this mode the direction of the new particle is the same as the source particle (but can be modified by the Spread and Reverse settings - see below).
In this mode the direction of the new particles is along the normal of the face the source particle collided with. The direction can be modified by the Spread and Reverse settings - see below.
These parameters are only available if the 'Spawned Particle Position' is set to Collision Point' and the 'Direction' parameter is set to 'Source Particle' or 'Face Normal'.
If Direction is set to Source Particle, the spawned particles have the same direction as the source particle which spawned them. If Direction is set to Face Normal, they all travel along the normal of the collision face. This isn't very useful, so you can modify the direction with these parameters. Spread is a deviation to the particle heading, in percentage terms, from the direction of the source particle. Given a low value of, say, 10%, this causes the spawns to follow a narrow cone along the path of the source particle; set to 100%, you will get a hemisphere of particles.
The Reverse setting, if checked, will reverse the direction of the spawned particles so that instead of following along the path of the source particle they head directly away from it (useful for rocket trails, for example).
Spawned Particle Speed
This drop-down menu has two settings:
With this option, the spawned particles will have the speed given in the spawning emitter.
If you select this option, the speed in the spawning emitter is added to the current speed of the source particle. For example, if the spawning emitter has a speed of 50 and the source particle has a speed of 150, the new particles will have a speed of 200 (150 + 50). This is a really a convenience function so you don't have to calculate the speed the spawned particles should have.
Number to Spawn
This is the number of particles to be spawned from the source particle.
This allows you to specify the group to which the spawned particles will belong. If there is nothing in this field, the group is determined by the spawning emitter. To specify the group, drag the desired Group object into this field.
This setting is useful if you want to ensure that the spawned particles are, or are not, affected by a specific modifier, for example.
Spawn Once Only
If this switch is on, the tag will only spawn once from a specific particle. The reason for this to prevent multiple spawning from a particle which is repeatedly colliding with the collider object, for example, under the influence of a gravity modifier.
Kill Original Particle After Spawning
This switch, if checked, will remove the source particle from the scene after it has spawned. This can be used to ensure that each source particle spawns only once.
The spawned particles will inherit the colour of the source particle.
Groups Affected tab
In this version, the 'Groups Affected' list from the General quicktab of the previous version has been moved into its own tab. This is for greater consistency with other X-Particles objects which use particle groups, and to add the enable/disable and use hierarchy icons that are part of the usual Cinema 4D interface.
Drag the particle Group object(s) you want to be affected by the tag into the 'Groups' list. If the list contains at least one group, groups not in the list will not be affected by the collider object. But if no groups are in the list, all groups are affected.
Note that if there are groups in the list but they are all disabled (i.e. have a red cross icon instead of a green tick) this is treated the same as if there were no groups in the list - so all groups will be affected.
By default, the collider tag will look for collisions with particles emitted from all the emitters in the scene. It might happen that you don't want to detect collisions with particles from a particular emitter, but you do want that emitter's particles to collide with other objects (so you can't simply disable collisions in the tag or the emitter). Alternatively, you might want to specify that only certain emitters will collide with this object. You can use this tab to do either of these actions.
This drop-down has two options:
In that mode drag the emitter(s) into this list and then collisions will not be detected for this object and any emitters in this list.
This is the opposite of 'Exclude': only particles from emitters in this list will collide with the object. With all other emitters, no collisions will take place.
The list of emitters to exclude from or include in collisions. (Note: this was labelled 'Exclude From Collision' in earlier versions of X-Particles.)