Particle System for Buildbox – DOCUMENTATION

Version 1.0.0 released on December 18, 2020.
Documentation updated on January 4, 2021.
🛈 Visit indym.itch.io for nodes and assets made by IndyM Software.

First of all I wish to thank you for purchasing this asset pack!
Next I’ll show you how to use the particle system.

GETTING STARTED

You can setup a particle system in just a few seconds, check this clip.

It’s that easy to setup a particle system in your project!
Now you might want to customize an effect or create your own, just keep reading, that’s easily accomplished.

TIP: If you prefer to get your hands dirty instead of reading the documentation I urge you to load a little project included in the package named:
Buildbox Particle System Xmas Demo 1.0.bbdoc
Play around with it, you’ll get a solid grasp of how the particle system works.

A QUICK OVERVIEW

This particle system has been designed to be powerful, flexible, easy to use, highly configurable and extremely reusable; it has many options and features through which you’ll be able to create an unlimited number of effects.
Inside the asset package you’ll find several BBASSET files.
These are of five different types and are all used by this particle system:

  • BPS.Emitter: the emitter is the object which creates particles; you drop it in your world, load a preset asset into it and you’re done! You can have as many emitters as you wish in game.
  • BPS.Preset: loaded by the emitter, this is the most important component. Presets are set of rules that define how particles will behave once created. You can have as many presets as you wish, you might have a preset to create a fire, one to create blue flames, one for trails, etc. Presets are fully configurable and of course can be duplicated to create variants or new effects. A few BPS.Presets are included with the particle engine, others will be available for download at indym.itch.io.
  • BPS.Particle: loaded by the preset, this is a 3D Model that will be created by the Emitter and will follow the rules specified in the selected Preset. Most effects works best with flat particles but you might have particles in any shape, it can be a sphere, a cube or even a more complex model. A few BPS.Particles are included with the particle engine, others will be available for download at indym.itch.io.
  • BPS.Mark: this is an optional component you can enable and load in the Preset object, it can be used to leave a mark on the ground/path when a particle hits it; consider an explosion or a fire, you can use this to leave burns or maybe white hot splinters on the ground or blood stains when your character gets killed and so on.
  • BPS.Global_Settings: an optional component you may drop into a world and use to manage performance settings for all the particle emitters in game at once. More on this in the section ABOUT PERFORMANCE.

IMPORTANT: The BPS.Emitter is the only object you actually have to drop in a world to create a particle emitter in game. The BPS.Emitter will load the BPS.Preset you’ve selected in its ‘BPS.Preset Asset’ attribute.

The BPS.Emitter will load the BPS.Preset you’ve selected in its ‘BPS.Preset Asset’ attribute.

Question: what if I want to spawn a particle emitter when a specific event occurs?
You can do that! Let’s say you wish to add an explosion effect to a character when it is defeated and let’s assume there is a Defeat node inside this character, all you have to do is:

  • duplicate the emitter in the Asset panel on the left, I suggest to change the name of this new specialized emitter, for example call it ‘Emitter + Player Defeat’.
  • now in the Options panel on the right add the BPS.Preset you wish to use, like BPS.Preset Explosion_04 for example.
  • add a Spawn node to your character and add to it the emitter you’ve just created.
  • connect the Spawn node to the Defeat node and you’re done!
On the left you can see a duplicated BPS.Emitter, on the right a BPS.Preset has been added to this emitter; it is now ready to be spawned through a Spawn node.

CREATE YOUR OWN EFFECTS

Here’s a map of the attributes available in a BPS.Preset; by changing the values of such attributes you can easily customize a particle system and create your own collection of effects.

It might be frightening at first but don’t worry, you just put in your values and that’s all.
To customize a BPS.Preset select it from the Asset panel on the left, now change any of its attributes in the Options panel on the right.
To create a new BPS.Preset you have two ways: if you want to create a variation of an already existing effect you can just duplicate one of the Presets in the Asset panel, assign a new name to the duplicate and change its attributes in the Option panel on the right.
If you prefer to start from scratch you can use the file ‘BPS.Preset Empty.bbasset’, as the name says it is an empty preset with no Particle or Mark asset preloaded and most of its parameters at 0 or disabled.
Here’s a detailed explanation of all of the available attributes in BPS.Preset assets.
Given the large amount of attributes these have been subdivided into groups and sections.

Group 0 – Particle Generator, Wakeup and Emitter Easing

This group contains attributes to set the particle generator emission rate, particle asset, particles and emitter lifespan, wakeup distance and optional attributes to enable emission rate Easing In/Out.

[0.0] Particle Generator
Particles Per Second: emission rate expressed as the number of particles generated per second by the emitter.
Particle Asset: the asset to be used as particle model, every BPS.Preset has one already set but you can change it with a different one, it must be of type BPS.Particle.
Kill particle after (seconds): time in seconds after which a particle is removed.
Kill Emitter after (seonds): time in seconds after which the emitter is removed; set this to 0 if you want the emitter to stay alive.

[0.1] Wake Up
Distance: the particle emitter will wake up only if the distance from current path position (anchor) is below this value; this is useful in games making use of paths in Buildbox; always make sure you set path start/end position so that all of your level characters and objects stays within these boundaries; set this to a high value if you wish the emitter to wake up immediately as soon as the scene is loaded.
NOTE: this option is going to be completely rebuilt in next update to ignore paths and support real distance between characters (or other targets) and emitters.
Sleep Distance: please leave this attribute to 0, it’s not yet been implemented.

[0.2] Easing In
This optional attribute can be used to add an easing function to the emission rate (see Particles Per Second) of the emitter when it is starting; this might be useful to improve realism of certain effects, let’s say you have a fire effect made up of 60 particles and you want it to startup gradually, you can do it by enabling the Easing In.
Enable Easing In: check this box to enable Easing In.
Duration: duration in seconds of the easing in phase.
Easing Function: the easing function to be used, check Easing Functions for more information.

[0.3] Easing Out
This optional attribute can be used to add an easing function to the emission rate (see Particles Per Second) of the emitter when it is ending; this might be useful to improve realism of certain effects, let’s say you have a fire effect made up of 60 particles and you want it to go out gradually, you can do it by enabling Easing Out.
Enable Easing Out: check this box to enable Easing In.
Duration: duration in seconds of the easing out phase.
Easing Function: the easing function to be used, check Easing Functions for more information.
NOTE: Easing Out will work only if you set a value for the Kill Emitter after (seconds) attribute, if you don’t the emitter will stay alive.

[0.4] Performance Settings
Settings in this section are to be used together with the BPS.Global_Settings asset, check section About Performance for more info.
Priority: sets the priority of this emitter to Low or High.
NOTE: At the moment this attribute is at the bottom of the attributes list, scroll the list down to find it.

Group 1 – Path Collision and Physics

This group contains attributes to define the behavior of particles upon path collision and physics related parameters like: gravity, linear velocity, angular velocity, starting rotation.

[1.0] Upon path collision
Remove Particle
: check to have particles removed once they collide with the path.
Leave Mark: check to have particles leaving a mark on the path when colliding with it.
Mark Model: asset to be used when the Leave Mark attribute is checked; you can use one of the BPS.Mark type assets included with the particle system or select an asset of your choice.

[1.1] Gravity
Simply put gravity is an invisible force that pulls objects toward each other; Earth’s gravity for example pulls objects toward itself with an acceleration of about 9.8 m/s2.
Gravity: sets gravity on the X, Y and Z axes for the particles generated by this emitter.
+/-: specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the Y of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the Y of previous attribute. Random values will differ for each particle.

[1.2] Linear Velocity
Linear velocity is how fast an object moves along a specific direction.
Linear Velocity: sets linear velocity on the X, Y and Z axes for the particles generated by this emitter.
+/-: specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the X and Y of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the X and Y of previous attribute. Random values will differ for each particle.

[1.3] Angular Velocity
Angular velocity is how fast an object rotates around its center.
Angular Velocity: sets angular velocity on the X, Y and Z axes for the particles generated by this emitter.
+/-: specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the Z of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the Z of previous attribute. Random values will differ for each particle.

[1.4] Starting Rotation
Starting rotation is used to set the initial rotation of the particle on the X, Y and Z axes.
Starting Rotation: sets starting rotation on the X, Y and Z axes for the particles generated by this emitter.
+/-: specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the Y of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the Y of previous attribute. Random values will differ for each particle.

Group 2 – Starting Color and Color Animations

This group of attributes is used to set the starting color of particles and to enable color animations; if you just set the Starting color, particles will have the same color for their entire life; if you enable color animation, particle’s color will change over time.
For color animations you can have up to 5 key colors; at start the particle color will be the one set in the Starting Color section, then it will gradually change to the one set in the Color Animation 1 section within the time set with the Duration attribute and curve set in the Easing Function attribute, then it will change the color specified in Color Animation 2 and so on.
TIP: Colors can have transparency so you can have transparent particles and also achieve fade in and fade out effects.

Group 3 – Starting Scale and Scale Animations

This group of attributes is used to set the starting scale of particles and to enable scale animations; if you just set the Starting Scale, particles will have the same scale for their entire life; if you enable scale animation, particle’s scale will change over time.
For scale animations you can have up to 5 key scale set of values (X, Y & Z); at start the particle scale will be the one set in the Starting Scale section, then it will gradually change to the one set in the Scale Animation 1 set of values (X, Y & Z) within the time set with the Duration attribute and curve set in the Easing Function attribute, then it will change to values specified in Scale Animation 2 and so on.
The +/- attributes can be used to specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the Y of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the Y of previous attribute.
Random values will differ for each particle.

Group 4 – Starting Position and Position Animations

This group of attributes is used to set the starting position of particles and to enable position animations; if you just set the Starting Position, particles will have the same position for their entire life; if you enable position animation, particle’s position will change over time.
For position animations you can have up to 5 key position set of values (X, Y & Z); at start the particle position will be the one set in the Starting Position section, then it will gradually change to the one set in the Position Animation 1 set of values (X, Y & Z) within the time set with the Duration attribute and curve set in the Easing Function attribute, then it will change to values specified in Position Animation 2 and so on.
The +/- attributes can be used to specify random values within a range to be added to previous attribute, for example if you set a value of 3.6 for the Y of the +/- attribute a random value in the range -3.6 ~ +3.6 will be added to the Y of previous attribute.
Random values will differ for each particle.

About Easing Functions

Easing functions are used to make transitions smoother or more realistic. The Particle System for Buildbox supports over 30 different easing functions, way more than those usually available in Buildbox; having many easing functions gives you more control on Color, Scale and Position transitions. For more information please check easings.net, all of the easing functions described there are supported.

ABOUT PERFORMANCE

When you have a lot of particles on screen at the same time you might experience lags or slowdowns; particles should be used carefully, in most cases having more than 150-200 on screen will cause the game to slowdown.
This system has been created to allow multiple active particle emitters in the same scene; all of the emitters active at a certain time are part of the same particle system and each emitter can be set as Low or High priority.
There is an optional asset available called BPS.Global_Settings, this can be used to set some global parameters like Max Alive Particles, used to keep the overall particle count under a certain level, this is extremely useful to have good performances on mobile systems without impacting too much on the quality of effects.

HOW TO: simply drag and drop the BPS.Global_Settings.bbasset file into your world and make sure that it is on top of any BPS.Emitter and is in the World section and not the Level section. To make it simple just put it on top of every other object inside the outliner.

F.A.Q.

  • Q: Why do the Emitter doesn’t activate at the Wake Up distance I’ve set in the Preset?
    A: Remember that start and ending points must be set appropriately for the wake up to work in a scene.
  • Q: In the Wake Up section of the Preset I’ve specified a Sleep distance but it doesn’t work.
    A: Sleep is there as part of the Wake Up node but hasn’t been implemented yet; it will probably be implemented in next updates.
  • Q: I’ve placed an Emitter at the ground level and it’s not working, why?
    A: Check if the “Leave Mark” option is enabled in the Preset used by this Emitter (attributes section “[1.0] Upon path collision”). With the emitter at ground level and this option enabled particles will collide with the path right after creation and be removed; disable the “Leave Mark” option or put the emitter a little higher on the ground.