When CONTAINMENT is activated, BOIDs can be confined to stay inside or outside specified regions of space. When BOIDs venture beyond these zones, they will naturally alter their course to go back inside the closest safe region.
Zones can either be defined as "safe" or "restricted." Safe zones are regions of space that are considered safe by BOIDs. Restricted zones are regions of space BOIDs will remain out of.
You can define up to 10 different zones, each with it's own set of zone parameters.
Activate CONTAINMENT Rule
Check this box to activate the containment rule.
Note: Checking the zone's Activate Zone field will NOT activate the rule. You MUST also check the Activate CONTAINMENT Rule box to make containment work.
Use this drop-down menu to select one of the 10 zones to work with.
Each zone is defined by it's own set of parameters. The settings that show in these fields are for the zone currently selected (above). A bounding zone forces BOIDs to remain inside or outside certain regions of space. With PySwarm V0.5, there are three types of bounding containers: Box, Cylinder, and Sphere. Set this value to the type of container you wish to define: Box, Cylinder, or Sphere.
Check this box to activate this specific zone.
Select the shape of this zone - Box (Cube), Cylinder, or Sphere.
Note: Some parameters will not be visible based on what type of zone you have selected and whether you have entered a name in the Use Carrara Object field. Only those parameters relevant to the type selected will appear.
Select the zone's mode - safe (where BOIDs will try to stay inside) or restricted (where BOIDs try to stay out of).
The relative force to be applied to BOIDs.
Use Carrara Object
If you are going to use an object in your Carrara scene to determine the zone's center, enter the name in this field. You do not need to specify center values if you are using an object.
This (x,y,z) value defines the center (in feet) of the zone. This parameter group will disappear if you have entered a name in the Use Carrara Object field because the zone's center will be taken from the object.
This (x,y,z) value defines the dimensions of a Box zone (in feet).
This value sets the radius of cylinder and sphere zones (in feet). Remember that the size of a sphere or cylinder in Carrara is twice the radius.
This value sets the height of a cylinder zone (in feet).
Tips and Limitations
- Restricted zones were added to keep BOIDs from flying/swimming/moving into solid objects in your Carrara scene (like buildings and trees).
- The force to stay out of restricted zones is greater than the force to stay within safe ones.
- You can define a different zone strength value for each zone. This is useful, for example, if you want to increase the strength of certain restricted zones or decrease the strength of a safe zone.
- You do not have to create a safe zone to bound your BOIDs. Another option is to add an attractor with a low attractor strength value (e.g., 0.3) to keep BOIDs within a certain region. You can then create restricted zones to bound regions for motion.
- If you are using an object in your scene to define a zone's center, you can move and scale (overall scaling) during the animation. PySwarm will use the object's position (hot point) and overall scaling value.
Moving and Resizing Container Zone Demo
The following video illustrates the use of Carrara scene objects as zones while BOIDs move about a safe zone. There are 3 restricted cylinder zones - 2 cylinders moving across the scene, the other growing. Carrara object defined zones can be moved and resized during animation.