Realization of Unity fireworks special effects (with source code)

Unity fireworks special effects with code

written in front

My friend passed his birthday, and I don’t know what gift to give, so I thought about using the knowledge I learned to make a special effect as a gift, hey.
Mainly refer to the video of this up , thanks

Effect

insert image description here

code address

https://github.com/hahahappyboy/UnityProjects/tree/main/%E7%83%9F%E8%8A%B1(%E7%B2%92%E5%AD%90%E7%B3%BB%E7%BB%9F)

core steps

The main thing is 1 main firework particle system with 3 sub-particle systems, these three small particle systems are trailing particle system, explosion particle system, and explosion astigmatism particle system (1) The main firework launch special effect cone emitter,
insert image description here
launching
upwards
insert image description here
Select Unity’s default particle texture as the particle material
insert image description here
. Turn on the trailing effect. Just choose a cone-shaped texture for
insert image description here
the trailing texture. It will look better if the trailing color is set to gradient
insert image description here
.
insert image description here
The center fires other small fireworks around, so the speed and size of the firework of the launcher ball launcher are
insert image description here
smaller than that of the main firework. The other settings are the same as the main firework. The trailing effect and the material of the firework are the same, so the color should be lighter. One
insert image description here
point: At this time, you need to set up a launcher in the main firework, and start the trailing streamer effect from birth
insert image description here
(3) The explosion effect of the main firework
insert image description here
is a special effect that is only produced when it explodes, so you need to select it in the sub-launcher of the main firework This special effect is also very simple when you die
insert image description here
, just use a ball launcher, the speed and size are smaller than the main firework,
insert image description here
and the emitted particles are fired in an instant
insert image description here
(4) The main firework explosion flash special effect
insert image description here
has an explosion flash when it explodes, to achieve It is also very simple, it is also generated when the main firework dies, only one is generated, there is no speed, no trailing effect
insert image description here

written in the back

You can add some text yourself, for example
insert image description here

Guess you like

Origin blog.csdn.net/iiiiiiimp/article/details/130914314