Unity – Learning About Particles

We unfortunately missed out on another Concept Art class today, however Gary covered an introduction to particle effects in Unity – this was something I’ve been looking forward to learning for a long time, ever since I first tried to make rain in my walking simulator.

To start with something simple, we were shown how to add a particle system to a scene, which is essentially the same way as adding anything in Unity. All particle systems start off with the same default settings (which looks like upside down snow) and it’s the inspector settings that make all the difference to what the particles will look like.

It was then also a matter of finding a sprite sheet (I just grabbed one from online) to test with. I thought something akin to an explosion would be easy to use, so I picked the one below:

20ef05ef7376f8d44e1ff38e64133cf3

Gary did mention that it’s better to try and have your sprite sheets either with an alpha channel background or a black background, merely for the type of material that you’d be creating (Additive, Alpha Blended, or Multiply). It’s also good practice to have it so your sprite sheets are the same and you’re not having to fuss with the material settings for each one, trying to find what works best.

particleshader

I needed a little bit of help getting of the ground and getting the correct settings so the particle system would cycle through the sprite sheet properly. Changing the duration to about 2.5 seconds and the start lifetime to about 3, I got the right speed for a quicker explosion play-through. I also needed to reduce the start size down to 1 and the start speed to 0, because I was only working with the singular particle via the sprite sheet. The emission also needed to be changed to 1, for the same reason. The shape option was taken off for the time being, which resulted in the following animation:

singleexplosion

We then had a bit of fun playing with more of the settings, such as the shape radius and the emission rates, which I managed to achieve a blitzkrieg chaotic scene that seems fitting forĀ a bomberĀ game!

multiexplosions

Outside of that, I tried to emulate the boost floor effect Gary had shown us with a snowflake of my own, seeing if I could add my own spin to it. I really like what I came up with and I think it would make for a good AOE effect or boost pick-up in a game.

It’s slightly difficult to see in the screengrab, but I added a colour over lifetime effect so the particle would fade over time and then added a rotation over lifetime by about 45 degrees. I needed to remember to change the render mode to horizontal billboard, too, otherwise the particle wouldn’t sit flush on the ground in relation to any character walking up to it.

Overall, I’m loving learning about particles in Unity and I’m so glad I got a proper introduction to them! I’m looking forward to incorporating them into future games – I think I might go back to my walking simulator and try to make a better rain particle system, too!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s