The 3D Cloth & Particles Expansion Pack provides a set of commands for creating emitters, effectors, colliders and cloth. Using these new commands it's possible to create all kinds of particle and cloth effects within a 3D scene. This pack is now an integral part of DarkBASIC Professional from version 7.3 onwards.
Emitters are used to emit particles. You can choose from three types of emitters; basic, box and spherical. With the basic emitter, particles are produced from a single point in space and are emitted with an initial velocity along the y axis of the emitter. When using the box emitter you can emit particles from within a bounding box region of space. The spherical emitter will produce particles from within a spherical or hemispherical region of space.
After creating an emitter its properties can be set. These include the rate of particles being emitted per second, the explosion rate of particles, velocity, mass, size, life and colour.
By creating an effector object and binding it to an emitter you can then affect the particles. For example you could make a wind effector and set its direction. By doing this you could blow particles in a specific direction. Or how about applying a gravity effector to particles to force them downwards. Maybe even create a vortex effector, which creates a tornado type of motion. Many other effector types are available including chaos, damping, drag, flock, force, point and more.
Collider objects are used to control collision. Imagine creating an emitter object and having it emit many thousands of particles. How would the collision work with other objects in the scene? This is where collider objects come in. By using these commands you can handle the collision and its response. You could, for example, create a collision box surrounding the emitter. When the particles hit the sides of the collision box they will react accordingly e.g. bouncing back off the sides. There are several types of collider objects available to use; box, disc, plane, sphere and square. All relevant properties of collider objects can be set including the bounciness, friction and more.
The cloth commands included in the expansion pack can be applied in a whole variety of uses. Imagine a flag on the top of a huge tower blowing fiercely in the wind amidst a raging battle, or a dark and creepy mansion house where the only sounds are the drapes flapping back and forth against the walls.
Once a cloth object has been created you can set its properties e.g. its mass and elasticity. Other features for the cloth include being able to attach it to certain points. For example, you could take the top left corner of a cloth and attach to a point, then the bottom left corner and attach that to another point and in doing so get things in motion for a flag effect. Just like with the emitters you can apply effectors and colliders to cloth objects to produce effects such as a flag blowing in the wind.
Fifteen demonstration programs are included when you buy the 3D Cloth & Particles expansion pack. There are demonstrations to show you how to create a banner, a wavy bridge, using drapes, dropping a cloth object onto the floor with collision, a flag, a flame effect, a ride around a ghost train scene, view a hall with cloth and emitters inside, see how a scene can be drawn onto a cloth, several particle demonstrations, a smoke example, a spider web created from cloth and finally an example of a vortex effector being applied to an emitter. A video is also included that displays a DB Pro scene that was rendered to video in which the scene uses several particle effects.
Also included with the expansion pack is a fully featured, detailed Windows help file that outlines all of the available commands and offers facilities such as search and indexing.
Click here to see the full command list for Cloth and Particles.
















