Particle Systems with Image Textures
Nature of Code Lesson #4.4
It’s time to expand beyond grayscale particles! In this video I demonstrate how to make a fire or smoke-like effect by using image textures and additive blending with a particle system.
Topics
- 0:00 - One more particle system video!
- 0:57 - Hopefully you'll make something neat.
- 1:25 - Code! Adding applyForce() to our particle class.
- 3:24 - Discuss! I've already made an image texture.
- 4:37 - Code! Adding the image texture to the sketch.
- 6:28 - Code! Adjusting the way the particles look.
- 7:17 - Whoops! Let's see if there's a way to improve performance.
- 8:58 - Explain! blendMode(ADD).
- 9:53 - Code! Let's try using blendMode(ADD)!
- 10:36 - Code! Adding in color, yay!
- 11:53 - Please share what you create!
- 12:22 - What's next?
Community Contributions
- Secret Contributution by Indrayudh Chakraborty (Source Code)
- Opposite Particles System by Indrayudh Chakraborty (Source Code)
- Electric Sparks by Krishanth (Source Code)
- Recursive Explosions by LemurDaniel (Source Code)
- Burning torch by wojtekpaszo (Source Code)
- Boxy fire by wojtekpaszo (Source Code)
- Firecracker by Dong-Gkyun Yang (Source Code)
You can also add your own version! (See how)
Videos discussed in this lesson
- Purple Rain - Coding Challenge #4 by The Coding Train
- Snowfall - Coding Challenge #88 by The Coding Train