How to Make Sparks

Discover how to create realistic sparks using Cycles and the new Particle Info Node.

Length:
24 mins
Software:
Blender 2.64 r52458
Difficulty:
Beginner
Rate:
VN:F [1.9.22_1171]
Rating: 4.8/5 (124 votes cast)

In this tutorial you will discover:

  • How to create realistic sparks using Cycles
  • How to use the new particle info node
  • How to create motion blur

I’ve always been fascinated with the beauty of sparks, and have wanted to create them for a while, but the results were always disappointing. This was mainly due to their being no way to change the color or opacity of the sparks throughout the animation.

However, the particle info node recently came to Blender and saved the day! We can now finally delve in to creating some satisfying sparks :)

Here’s what we’ll make:

Finished Result

Plus, a bonus slow mo version:

Download the Finished .blend

Reference Videos

Text Version

Not a fan of video tutorials? Not a problem. I’ve typed out the whole tutorial so that you can scroll past the stuff you know and skip to the good bits. (Italian Translation, Russian Translation)

Creating the spark emitter

1. Delete the default cube and lamp, and add a Cylinder.

 

2. Go to side view (Numpad 3) and rotate the cylinder by 90 degrees.

 

3. Go into edit mode and from the front view (Numpad 1) select 3/4 of the mesh as pictured, then press delete.

 

You should now have a quarter cylinder like this:

 

4. Scale it down along the Y axis to make it thinner, then scale the whole thing as pictured:

 

Creating the sparks

5. With the cylinder still selected, add a new particle system and set the settings as shown:

 

6. Set the normal amount to 10, and random to 5, to shoot the sparks in every which way.

 

7. For even more randomness, add a subsurf modifier above the particle system so the cylinder shape isn’t so visible in the particles:

 

8. We need a floor, so add a plane and scale it up to be the size of the grid floor.

 

9. To make the sparks bounce off the floor, go to the collision settings and change the Damping and Friction as shown:

 

10. Add an icoshere and place it somewhere below the floor. This will actually be what each particle looks like.

 

11. Select the particle emitter, go to the particle render settings and set it to use the icosphere as shown:

 

Making the Sparks change color over time

12. Since the particle system is using the icosphere to render it, the spark material must be applied to the icosphere.

 

13. Switch to the Node Editor coz it’s about to get advanced and we need more control.

 

14. Press Shift+A and add a Particle Info node (new feature!).

The Particle Info node is a wonderful addition to blender that allows you to change a particle’s material according to a particle system’s velocity, lifetime and age etc. This allows us to (finally) be able to make particles fade out, as you’ll soon see…

15. Add a Math node (Add>Convertor>Math) and set the type to Divide, then connect it to the Age and Lifetime outputs as shown:

This confusing looking setup basically takes the particles Age and Divides it by it’s Lifetime, allowing us to change it’s material based on how long it’s been alive. If you’re confused, it’ll make sense soon…

 

16. Add a ColorRamp node (Add>Convertor>ColorRamp) and connect as shown:

This Color Ramp will now act as the color of the particles. The left side will be the color at the particles birth, and the right side will be the color at it’s death.

 

17. When sparks are born they are white/yellow hot and slowly cool to a red color before dying. So change the Color Ramp node to match that:

 

Give it a render to see if our ploy worked:

Great success! The particles start white hot, but turn red as they die.

 

Making the Sparks Fade Out

Next we’ll make the sparks fade out. This will be accomplished by blending the emission shader with a transparent shader.

18. Add a transparent shader:

 

19. Add a Mix Shader node and position and connect it to the Math node and two shaders as pictured:

Success! It's not very noticeable, but the particles now fade out as they die. This will  make for a much smoother animation.

Success! It’s not very noticeable, but the particles now fade out as they die. This makes for a much smoother animation.

 

Adding Motion Blur

A new feature available in trunk is Motion Blur for Cycles. Applying it to this scene will give the sparks that familiar trailing look. Let’s try it out…

20. Go to the render panel and enable Motion Blur with a shutter speed of 0.7. Motion blur is currently only supported in CPU. Update! Motion blur now works in GPU as well! Available in any release after revision 52645 (download latest build here).

Finished!

IT SPINNIN'

Serving suggestion: Add a circular saw for some sweet particle bounces.

Hope you enjoyed the tutorial!

Creating something cool using this tutorial? Post it in the comments below.
Russian Flag IconRead the Russian Translation

How to Make Sparks, 4.8 out of 5 based on 124 ratings

About Andrew Price

User of Blender for 9+ years. I've written tutorials for 3d World Magazine and spoken at three Blender conferences. My goal is to help artists get employed in the industry by making training accessible and easy to understand. I'm an Aussie and I live in South Korea ;)
  • Shaun

    hi i have issues trying to divide the box into a quarters because when i highlight that part it selects the whole box?
    Can anyone help?

  • Pingback: 制作火花How to Make Sparks | Blender Totem

  • Dinesh Bhatt

    Hello Andrew, Great Tutorial again!
    My Result

  • Jakobeyjr

    This is what I did right now ;)

  • Евгений Фруктуоз

    Learning some cool stuff
    My Result

  • Евгений Фруктуоз

    Learning some cool stuff

  • Someonenew

    So, there is alot of noise in my final render and im rendering at 2000 samples. Is there anyway to fix this or is it a hardware problem (I’m not too sure about the second one cuz I have rendered other stuff before and it came out better with less samples)

  • Darius

    I also tried to look at it in the Rendered View, it doesn’t look appealing at all. I also tried to fully render it and it still looks very low resolution, is there any way I can make it look better?

  • Darius

    I have a problem, when I render the image it looks really low definition, 144p at best and it is really zoomed out. Is there any way to fix this?

  • Varel

    Hi Andrew
    That is a nice Tutorial and This is my Result