Particles: Texture Sheet Animation

Tutorial

·

Beginner

·

+10XP

·

15 mins

·

(27)

Unity Technologies

Particles: Texture Sheet Animation

In the Particle System, you can use the Texture Sheet Animation module to select images for the Particle System to use in an animated effect.

In this workflow, we’ll set up a Texture Sheet animation to randomly spawn different star images on the particles in a single emitter.

Languages available:

1. What is Texture Sheet Animation?

If you are using Unity 2019.3 or above, click here.


A Texture Sheet is a series of images inside one Texture file that can be played on a particle in the Particle System. In the Particle System, you can use the Texture Sheet Animation module to set a Texture Sheet’s parameters. Some artists put all their VFX Textures into one image called a Texture Atlas to optimize performance and then use the Texture Sheet Animation module to select which image the Particle System uses.


In this workflow, we’ll set up a Texture Sheet animation to randomly spawn different star images on the particles in a single emitter.


When creating a sparkle effect, it’s nice to have some visual variety. Instead of copying the emitter four times and assigning a different Material to each emitter, we’ll use a Texture Sheet animation to set up a 2 x 2 Texture that randomly selects one of the Texture’s four stars.


2. Animate Particles with a Texture Sheet

  • Create a Texture Sheet with four unique star images evenly spaced in a square. You can use guides to make sure the stars are centered (Figure 01).

Figure 01: Texture Sheet with four images

Figure 01: Texture Sheet with four images


  • Import the Texture into Unity.

  • Create a Material for the Texture.

  • Create a new Particle System and assign the Material to it. You will see all four stars displayed on each particle.

  • Enable the check-box to the left of Texture Sheet Animation and set Tiles X and Y to 2 (Figure 02).

  • Change the Frame over Time setting by clicking the arrow on the right. Select Constant and set it to 0. This means the particle will use the same image for its lifetime.

  • Click the drop-down arrow to the right of Start Frame and select Random Between Two Constants. Set the first frame to 0 and the second frame to 4. (Unity will automatically change it to 3.9996.) This tells the Particle System to randomly select between the four star images. Once this is set, you should see all four images randomly appearing on the particles being spawned.

Figure 02: Texture Sheet Animation module settings

Figure 02: Texture Sheet Animation module settings


Texture Sheet animations allow you to play a series of images on particles or select specific images in a Texture to use on particles. It can be used to optimize projects with Texture Atlases and saves time by letting you use multiple images in one emitter.


3. Conclusion

Texture Sheet animations allow you to play a series of images on particles or select specific images in a Texture to use on particles. It can be used to optimize projects with Texture Atlases and saves time by letting you use multiple images in one emitter.


Complete this tutorial