-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,31 @@ | ||
# Particles | ||
|
||
## About | ||
Using **Particle Systems** you can create powerful and beautiful visual effects. | ||
You can use particles to create a virtual firework, smoke, fire, atmospheric dust, car trails and much more. | ||
Particles are batched together which allows for fast and performant rendering - even on low-end devices! | ||
|
||
**Particle system** is a system that animates small pieces of geometry by a predefined set of rules such as color over time which can animate the color of the particle. The particles are rendered as 3D **quads** or can be set to render more complex meshes. | ||
Explore the scenes listed below to see various usecases: | ||
|
||
## Performance | ||
|
||
Particle System is, in both Unity and Needle, CPU bound. Be careful with the number of particles you have. We generally recommend keeping the number of particles below 1000 on the high-end system. On mobile devices and mobile VR you should keep it under 100. Always test for performance. | ||
|
||
Another important aspect to keep in mind is the overdraw of transparent objects. Transparency is very expensive mainly if you stack multiple objects on each other. You can reduce this cost by using fewer particles. Or if applicable, set your material to opaque and enable alpha clipping. | ||
|
||
--- | ||
|
||
## Scenes | ||
|
||
### **Overview** | ||
Scene name: `Particles` | ||
### **Particle Overview** - [Live Sample](https://engine.needle.tools/samples/particles) | ||
|
||
Showcase of individual modifiers of the particle system. | ||
|
||
### **Impact** | ||
Scene name: `ParticlesOnCollision` | ||
### **Particle on Collision** - [Live Sample](https://engine.needle.tools/samples/particles-on-collision/) | ||
|
||
Example of how to control the particle system from code in reaction to a collision. | ||
Example of how to emit particles from code and use Needle Engine collision events. | ||
|
||
|
||
### **On click** | ||
Scene name: `Particles Burst on click` | ||
### **Particles on Click** - [Live Sample](https://engine.needle.tools/samples/particle-bursts/) | ||
|
||
Example of how to control the particle system from code in reaction to click. | ||
Click in the scene to trigger a particle explosion! | ||
|
||
--- | ||
|
||
## Particle System | ||
|
||
Unity's Particle System (called Shuriken) is quite complex and is full of features. Please bare in mind that Needle doesn't support all of them, although the majority of the common ones are supported or their support is planned. | ||
|
||
We recommended watching this [beginner friendly introduction](https://learn.unity.com/tutorial/introduction-to-particle-systems#6025fdd9edbc2a112d4f0133). | ||
|
||
|
||
Please let us know when a feature you need isn't supported. | ||
|
||
## Creating your own particle system from scratch | ||
## Creating a new particle system in Unity | ||
|
||
1. Create a new game object and add the ParticleSystem component. | ||
2. Create a material by right-clicking in the Project window and selecting `Create/Material`. | ||
3. Choose a supported shader. (Recommended is `UnityGLTF/UnlitGraph`) | ||
3. Choose a supported shader. (We recommend `UnityGLTF/UnlitGraph`) | ||
4. Enable transparency and set the color of your material to white with full opacity. Choose a texture for your particles. If you don't have one, you can use the `default-particle` texture. | ||
5. Assign the material to the particle system in the **Renderer** tab to the Material property. | ||
6. _Double-check that everything works by hitting play._ | ||
6. Save the scene to see your new particle system in action. |