Skip to main content
Version: 4.55.1

Particles

The Particles Template includes a number of particles that can be easily exported and imported into other templates. The template guide covers the parameters used in our shader driven particle system. We've created several variations using the same shader each time to demonstrate the various types of effects you can create.

Tutorial

Guide

Exporting & Importing Particles

The Particles Template includes a number of particles that you can use in your Lens experiance. To use one of the included particles in another template, you need to first export the particle. To do this, select the particle in the Objects panel, right click and select Export Object. Then, in the Lens project you want to import the particle to, right click in the Objects panel and select Import Object.

Simple Particles

To demonstrate the functionality that you can achieve with scripting in conjunction with the particle material we've constructed a number of simple particles including Rain, Snow, Blizzard, Bokeh and Sparkles. Each simple particle has an Intensity slider that allows you to easily increase or decrease the intensity of the effect.

Spawn Over Time

Some effects you may want to spawn over time in which there are 0 particles at the start and over time they begin to emit. This is done by using a couple of scripts we've provided.

You can attach the scripts ExternalTimeController.js and GlobalTime.js and bind them both to the On Awake event in the inspector panel. Place these scripts on the SceneObject that contains the MeshVisual referencing the particle material you'd like to control.

Next, enable the External Time box for the material you'd like to control the time for. In this example we've done this for our smoke effect material.

The particles should start to spawn from 0 once you refresh the view in Lens Studio.

3D Mesh Particles

You can also create particle systems that use 3D Meshes, like geometric shapes, clouds and asteroids, and even animated objects! This can add a great amount of versatility to your scene while still being highly optimized.

When using 3D Mesh particles, make sure to use the following settings on your material:

  • Depth Write enabled
  • Two-sided disabled
  • Mesh Type set to 3D Mesh

image alt text

The Particles template has 3 examples of 3D Mesh particles.

Simple Example

The Simple example shows the basic set-up for 3D particles using boxes.

To use a different mesh, simply replace the Box mesh on the Render Mesh Visual component with the new mesh you want to use (such as Sphere).

image alt text

Animated Example

The Animated example shows how to set up 3D Mesh particles that use Skinned Animation. In order to use skinned meshes, the original object must be in the scene. Then, make sure that the object’s skin is assigned to Particle’s Render mesh Visual component.

image alt text

The Red Panda Particles also have a setting for Material Parameters Map, which contains information about Roughness and Metallic values. You can add as many parameters as you want to the PBR section of any Particles material by using the Material Editor.

Complex Example

The Complex example uses 2 separate particle systems to create flying rocket ships: one for the rocket body, and one for the rocket’s fiery tail.

image alt text

This is possible because GPU Particles is a deterministic particle system. This means that particle systems with the same input values will always result in the same output values. This allows us to give the ships and tails the same position settings (instance count, spawn, lifetime, velocity, noise, gravity, local force, and scale), and results in both systems moving together.

Creating and Modifying Particles

Refer to the Particles guide for additional information on using and creating particles.

Please refer to the guides below for additional information:

Was this page helpful?
Yes
No