Time for action — using a ring to emit particles

Instead of a point or box we can even use a ring as emitter.

  1. Change the emitter type to Ring:
    emitter Ring
    {
    
  2. Define the Ring using width and height:
    height 50
    width 50
    
  3. Now, to create a ring and not a circle, we need to define how much of the inner part shouldn't emit particles. Here we use percentages:
    inner_height 0.9
    inner_width 0.9
    
  4. The rest stays untouched, as follows:
    emission_rate 50
    direction 0 1 0
    velocity 20
    }
    
  5. Compile and run the application. Fly with the camera over the model instance and you should see where the ring emits particles.
    Time for action — using a ring to emit particles

What just happened?

We used the ring emitter to only emit particles in a defined ring. To define the ring, we used height and width, not a point and radius. Width and height describe the largest width and height the circle will have. Here, the following small diagram shows how the circle is defined. With the inner_width and inner_height, we define how much of the circle's inner area shouldn't emit particles. Here we don't use space units, but percentages.

What just happened?
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.134.188