CLEAR

There may be differences between your version of Spark AR Studio and this tutorial because the product is currently in beta and we update it regularly.

Tutorial: Using Particles

In Spark AR Studio you can generate, display and move objects in great numbers using particles. The tool you use to do this is called a particle system.

You can use a particle system to produce all kinds of visual experiences in your effects, like rain or smoke.

In this tutorial, you'll learn:

  1. How to insert a particle system.
  2. How to edit its output, for example how many particles are produced and the direction they move in.
  3. How to edit the particles themselves, for example their size and whether or not they tilt at an angle.

For most effects with particles you'll import a texture. You can also create particles with a color texture in Spark AR Studio. For this effect, we've given you 2 custom textures - download the sample content to follow along.

If you open the finished effect in the sample content, you'll see the effect we're going to build has particles that look like slices of pizza. Some of the falling slices show the front of the pizza and some show the back.

The Particle System

Open Spark AR Studio and create a new project.

First, insert a particle system. To do this click Insert, select Particle System and then click Insert.

You should now see a single vertical stream of planes generated from the center of the Viewport and moving upwards. The particle system should also be listed in the Scene tab.

For this tutorial we want some particles to show the front of the pizza slices and some to show the back. To achieve this effect we need two particle systems, so insert another one.

Importing Textures and Applying Materials

No materials are applied to the particles when they're inserted, so you'll need to create a new one and apply it to them.

To do this:

  1. Select the first particle system in the Scene tab and go to the Inspector panel.
  2. Click + next to Material to create a new one and double-click on it to open its properties.
  3. Click the arrow next to Texture, select New Image Texture and open pizza_front.png from the sample content.

The particles should now look like little pizza slices.

You can adjust the Opacity of the particle material by moving the slider. For this tutorial, we're going to leave it at 100%.

Make sure to check the box next to Double Sided.

Next, add a material to the second particle system:

  1. Select the second particle system in the Scene tab and go to the Inspector panel.
  2. Click the + next to Material to create a new one and double-click on it to open its properties.
  3. Click the arrow next to Texture, select New Image Texture and open pizza_back.png from the sample content you downloaded earlier.

Rename the particle systems to make it easier to keep track of which particle system you're working with. To do this, select each one in the Scene tab, right-click and select Rename. Name the first one 'pizza front' and the second one 'pizza back'.

You should now see two streams of particles in your scene, emitting from the center of the Viewport.

Editing the System Output

You can edit the particle system in the Inspector panel.

To edit the output of the first particle system, select it in the Scene tab and go to Emitter in the Inspector panel.

Emitter type

There are 4 types of emitters: Point, Line, Plane and Ring.

For this tutorial, we're going to use Plane, so click the arrows next to Type and select Plane. Then change the Size values in both the Width and Height boxes to 300.

Repeat these steps for the second particle system. When you're done, the particles should be displayed across the whole scene.

Editing position and rotation

You can edit the position and rotation of the particle system like any other objects in the scene, either by editing the values in the Transformations area or manipulating the axes in the Viewport.

To make sure the particles are in the right place for this effect, go to the Inspector panel for the first particle system. Below Transformations, you should see Position. Change:

  1. The X value to -4.5, the Y value to 80 and the Z value to 10 - for the first particle system.
  2. The X value to -4.5, the Y value to 80 and the Z value to 20 - for the second particle system.

To change the direction the particles travel, edit the rotation. To do this, go to Rotation in the first particle system's Inspector panel.

We'll reverse the direction for this effect, which means we'll have to change the X value to 180 degrees. When you've done that, repeat this step for the second particle system.

The particles should now be moving downwards, but there aren't many of them.

Birthrate

To produce more particles, you can edit the birthrate. The birthrate controls the rate at which particles are emitted and, by default, it's set to 20 per second.

To change this, select the first particle system in the Scene tab and go to Birthrate in the Inspector panel. For this effect, change the birthrate to 70 and 40%. This means that every second between 42 and 98 pizza slices will be created, which makes the effect look less uniform and more realistic. Repeat this step for the second particle system.

You should now see more particles in the Viewport.

Lifespan

You can change this by editing the Lifespan property. This defaults to 0.4s, meaning that each particle is removed after it's been shown for 0.4s. To change it, select the first particle system, go to Lifespan and change it to 5s. Do the same for the second particle system.

Warmup

To make sure that it looks like it's raining pizza as soon as you opened the effect, you can edit Warmup. To do this, select the first particle system in the Scene tab and go to Emitter. To enable this feature, check the box next to Warmup, then set Warmup to 5s. Repeat these steps for the second particle system.

Editing Particles

You can alter the properties of the particles themselves in the Particle section.

To edit their size, select the first particle system in the Scene tab and go to Particle. Then, change the box next to Scale to 5 and repeat these steps for the second particle system. Some of the particles should be larger now.

Each particle is traveling at the same vertical angle, which doesn't look very realistic. You'll need to change the tilt of the particles as they fall.

To do this, select the first particle system, go to Tilt and change the values in the two boxes to 180 degrees and 270 degrees. Do the same for the second particle system. Now the particles are falling at an angle.

The last two changes to make to the particles involve their force and drag. Select the first particle system in the Scene tab and check the box next to Force. The Y value is set to -0.05 by default, so keep it as it is. Then, check the box next to Drag and change the second value next to Rotation to 50%.

Repeat these two steps for the second particle system. Changing these values means that the pizza slices no longer move at constant speed, which makes them look more natural.