Curves targets have a special feature which allows you to convert them from standard targets into curve containers.
The concept of a container essentially means that all particles will attempt to stay within the container, a bit like an inverted Obstacle. You can read more about this steering behaviour in Containment.
To turn a curve target into a curve container you need to enable the Containment attribute shown below
Once the container is activated, the Minimum Separation Urge attribute becomes available. This attribute is provided to allow you to fine tune how the particles’ behaviour is affected when inside a curve container.
How it Works
When containment is activated on a curve target, certain behaviour changes will happen:
- Particles outside the container volume will now be affected by the target. In fact they will use their full force to try and get inside the volume as quickly as possible.
- Once inside the container volume, particles will have their Boid Separation Urge value modified dynamically by the system.
- While outside the container volume, particles will have their Boid Separation Urge value set to 0.
The reasons for the above changes are to ensure that particles can be channeled through the curve container in a smooth and efficient way.
The main technical issue with curve containment is that particles are trying to do 2 opposing things at once; they are trying to stay inside the container volume but are also trying to honor the Separation rule. If the container is wide, with plenty of space this is probably not an issue, but if the container is narrow, this fighting of forces can cause particles to be pushed out of the container volume.
Particle Flocker gets around this problem by modifying the particles’ Boid Separation Urge while inside a container volume. While the container volume is narrow, the separation urge is reduced allowing particles to bunch up more closely and so fit through narrower gaps. Likewise when the container volume is wider, particles can re-establish their normal separation urge.
The Minimum Separation Urge attribute is provided as a way of fine tuning this adjustment. Essentially you can choose the minimum separation urge value which you will allow particles to drop down to. This value will be used at the narrowest parts of the container. The widest parts of the container will use the system value.
By tweaking these settings you can usually achieve a great balance between keeping particles inside your container and keeping the separation between particles looking correct.