- Published on
Creating Sparkling Effects for Rare Items in Unity
- Authors
- EvelynFull-time IndieDev.I'm Japanese, so please forgive me if my English is strange.
Welcome to the Evelyn GameDev Blog! In this article, we'll be using Unity's Particle System to create an effect that makes rare items more attractive!
If you read this article to the end, you will be able to create the following effect, so I hope you will read it to the end.
I also explain the same in the video, so if you find any part in the blog post difficult to understand, please watch the video. It is a short video, less than 3 minutes.
Table of Contents
import image files
First of all, please download the image files for this effect from the following link
You can download it for free, but if you can pay a little of your feelings, I can continue my activities.
Download links for image filesThen drag and drop the downloaded files into your Unity project to import the image file into your project.
Place the image of the treasure chest in the center of the screen so that you can easily visualize the effect. Right-click on the hierarchy to create an Image for the UI. Then change the position to the center and adjust the size to a larger size. Then display the treasure chest image.
Then, change the background of the main camera to black to make it easier to see the effect.
setup material
Now that the screen has been prepped, the next step is to create the material for use in the effect. This time we will create two effects.
Create a new material and change the shader as follows.
Mobile > Particles > Alpha Blended
Then assign a Twinkle image. The first material is now ready.
Next, create a new material and change the shader to Alpha Blended as before.
Mobile > Particles > Alpha Blended
After that, assign the Ring image. This completes the creation of the material.
Now let's move on to creating the effect.
create an effect
To make the Particle System appear in the camera, change the canvas settings as follows.
Render Mode: Screen Space - Camera
Render Camera: Main Camera
Select the Image that displays the treasure chest and create a new Particle System as a child element.
We will then adjust the parameters of the created Particle System.
Prewarm | checked |
Start Lifetime | 1 ~ 2 |
Start Speed | 0 |
Start Size | 2 ~ 8 |
Start Rotation | 0 ~ 360 |
In addition, change the Start Color to Yellow.
Start Color: Yellow
Turn off Shape and change it so that the generated Particles stay in the center.
Then activate Color over Lifetime and set the alpha value on the right to zero.
Color over Lifetime | checked |
alpha value on the right | 0 |
Activate Size over Lifetime and change the value on the left side to be larger and the value on the right side to be smaller.
Size over Lifetime | checked |
value on the left | bigger |
value on the right | smaller |
Apply the previously created Twinkle material to the Renderer material.
Now that the first Particle System has been created, we will create the last Particle System.
Go to the scene window and click the Restart button. By doing so, you will be able to see the behavior of the newly created Particle System.
Then, we will change the parameters as follows.
Prewarm | checked |
Start Lifetime | 2.5 |
Start Speed | 0 |
Start Size | 7 |
And then, change the Start Color to Yellow.
Start Color: Yellow
Set the Rate over time of Emission to 1 and turn off Shape.
Rate over Time in Emission: 1
Shape: unchecked
Apply a Ring to the Renderer material.
Then activate Color over Lifetime and set the alpha value on the right to zero.
Color over Lifetime | checked |
alpha value on the right | 0 |
Activate Size over Lifetime and change the value on the left side to be middle and the value on the right side to be bigger.
Size over Lifetime | checked |
value on the left | middle |
value on the right | bigger |
Summary of this article
How did you like it? If you have completed the work up to this point, you should have created an effect that looks like the following
I've included screen shots with as much detail as possible, but if there are any parts along the way that are difficult to understand, please watch the video as well. And if you like, please subscribe to my youtube channel.
I would be happy to contribute to your game development in any way I can. I hope to see you in another blog post. Thank you for reading to the end!!!