Leaves and Wind

In this recipe, we'll write a simple particle shader demonstrating how to create leaves in wind. We can do so using a Particle Emitter combined with a Material Shader that "shades" our leaves to give them the appearance of blowing in the wind.

Leaves and Wind

Getting ready

To begin, you'll need a leaf texture as well as a scene in which to place the falling leaves. In the Chapter11 code package, you'll find a scene called LeavesAndTree that contains a deciduous tree that you can use.

How to do it...

  1. Create a new particle emitter by right-clicking in the Content Browser, and choosing Particle System.
  2. Construct a new Material shader by right-clicking ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.