Tags: 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.
Particles can 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.
Interface
The tag has the following tabs and sections:
For the buttons at the bottom of the interface, please see the 'Common interface elements' page.
Tag tab
General quicktab
Enable collisions
If this switch is unchecked, the object to which the tag is attached will not be checked for collisions with any particles.
Draw Bounds
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 area 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 collisions are occurring:
Bounce on Collision section
Enabled
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.
Self-Collision
This option is used when emitting from an object which has a collider tag attached to it. If the switch is checked (the default setting) then the emitted particles will collide with the object from which they are emitted. If it is unchecked, they will not collide with it.
This is useful, for example, when you want to attach a collider tag to an xpCloth object. Unchecking this switch will prevent the particles which are emitted from the cloth object from colliding with the cloth and stopping the simulation from working correctly. Other particles of course will still collide with the cloth.
Normals
This drop-down has three options:
Outside
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.
Inside
However, sometimes you want to keep particles inside the objects (e.g. particles in a cube); this is Inside.
Any
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 (which tends to leak more 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.
Scatter
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.
Expand
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.
Radius
This setting will only appear if the tag is attached to a spline object.
Particles can now collide with splines without needing to create geometry to detect collisions. This setting is the distance around the spline where collisions will occur. If the particle is farther away from the spline than this distance, there will be no collision.
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.
Connection Limit
The maximum number of connections a particle may make to a collider object.
Stiffness
This controls how "strong" the connection effect is.
Break
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.
Falloff
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
Actions
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.
Add Action
Clicking this button will add an action to the scene and drop it into the Actions list.
Please note: due to the way the collision engine works, any action which changes the speed of the particle will have no effect. Although the particle speed will change internally, the change is then negated by the collision bounce. Only the speed is affected; all other actions should work as expected. You can still modify the speed on collision by using a Speed modifier instead of an action. Set the modifier to be action-controlled then add an action to enable the modifier for a particle when it collides.
Forces quicktab
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.
Falloff
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.
Reaction quicktab
Reaction
This drop-down has two settings:
None
The objects the particle collides with is unaffected by the collision.
Translate
The object the particle collides with will be moved by the collision in a direction away from the particle after collision.
Initial Velocity
The colliding object can be given an initial velocity on the X, Y, or Z axes with this control.
Mass
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'.
Spawn quicktab
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.
Enabled
This switch must be checked before spawning takes place.
Spawning Emitter
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:
Collision Point
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.
Direction
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:
Random (Spherical)
The direction of the spawned particles is set to a random value, which in practice means that the spawns adopt a spherical distribution.
Source Particle
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).
Face Normal
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.
Spread, Reverse
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:
Absolute
With this option, the spawned particles will have the speed given in the spawning emitter.
Relative
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.
Group
This enables 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.
Inherit Color
The spawned particles will inherit the colour of the source particle.
Groups Affected tab
Groups
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 tag. 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.
Exclusions tab
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.
Mode
This drop-down has two options:
Exclude
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.
Include
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.
Emitters
The list of emitters to exclude from or include in collisions. (Note: this was labelled 'Exclude From Collision' in earlier versions of X-Particles.)