Again our Concept Art class was cancelled today so rather than let the lesson time go to waste, we stayed with another lecturer who taught us the basics of particle effects in Unity and how easy it is to get these working. Often with impressive results.
To begin with we searched for sprite sheets on Google and I found a Scott Pilgrim one. I didn’t intend to get this, I just looked for something simple for a first attempt. So here’s the sprite sheet I found.
Now came the task of getting them doing something. It was actually fairly easy to do, well in class with the lecturer present it was.
So after a little tutorial we were off. The original Scott Pilgrim gif had him running forwards then backwards, cycling through the animations pictured above but I thought I’d try and have in constantly running in one direction. So in Photoshop I cropped the bottom line out and re-imported the sprite sheet back into Unity as a new material and I was able to create a constantly running sprite.
Altering the attributes above allowed me to control how fast Scott ran, how many cycles the GIF would run through, how long it would last etc. Once I was happy with this I tried it on another sprite sheet;
And got the following sprite animation;
Again, the procedure to produce these was quite simple. It begins with creating a new material and in its options, it needs changing from a standard shader to an Alpha Blended one.
From here, and on the right hand side control panel, create a new particle system.
Import your sprite sheet (but it must have either a black background or no background, preferable none) and drag it to the area below. This assigns the sprite sheet to the new material.
In the Renderer section, drag the newly created material into the material box below and change the renderer mode to Vertical Billboard. Look at the sprite sheet and count the rows and columns of the sprite and enter those details into the Tiles section at the top of the box below. Now its just a matter of tweaking the various options to get the sprite running or displaying correctly.
Now I did try this again myself at home with another sprite sheet, the one below, and would you have it, I ran into problems and can’t seem to get it working.
Well, its working, you can see the animation playing through but its quite broken and I don’t know how to fix it. To make it worse, I followed the instructions but didn’t write them down so I’m probably missing something which if I am, would explain this mess. I’ll talk to Gary on Monday.
Even though this didn’t quite work, I did enjoy the quick particle effects lesson a lot. I may look into taking this further….