|   Регистрация (Registration)   Вход  



1 ! 2 ! 3 ! 4 ! 5 ! 6 ! 7 ! 8 ! 9

Firework

яяThe main thing behind a firework with particles is spawning. You can finde some more information on this here. It is used for two things.
  • The smoke or fire trail of the rocket
  • The sparks created by the explosives
    Both are pretty different. The trail is created continously throughout the flight of the rocket while the sparks are only created at one point in time, when the rocket explodes. Also the trail particles will move in the opposite direction as the rocket while becoming slower whereas the sparks can move in any direction you want.
    In this example we will create all elements of the firework as particles: rockets, trails and sparks.

  • The rocket emitter is based on PStorm and a Null object for positioning and alignment. The only thing special on this emitter setup is the inversion of the rocket velocity that is used to create a matrix which in turn is used to align the trail particle emitter. This way the trail particles move in the opposite direction then the rocket.

    The sparks as well as the trail are made of visible lights with no illumination. Lens effects can be used too.

    The sparks are created at the moment the rocket particle dies. This can be determined by the PAge node. It allows to detect a number of events related on the particles age or a change of group. With Type set to Die the node will give us a boolean True value on the frame the particle dies. This triggers a PStorm node set to Shot which produces the stars. By using the rockets position for the PStorm node the sparks are generated at the position of the rocket. scene

    Since a real firework usualy has several types of rockets it's only logical to build a setup that can create more then one type. By using a random value this setup creates two types of sparks. The random node is fed the Random Seed value that comes with every particle. This ensures that the generation of random numbers is repeatable. In the example the nodes related to boolean operations are minimized to save screen realestate. The logic behind this is rather simple. The random node creates either a true or false value. A true value should create a spark of the Spark1 type while a false value should create a Turbulent Spark. It goes like this:
    IF Rocket dies AND Random is TRUE THEN create Spark1.
    IF Rocket dies AND Random is NOT TRUE THEN create Turbulent Spark.



    You can vary the way the sparks are emitted with the parameters of the PStorm nodes. In this example the Spark1 sparks are emitted sphericaly while the Turbulent Sparks are emitted in the direction of flight. This is done by aligning the spark emitter to a matrix calculated from the rockets velocity. scene movie
    If you want to create more then two types of sparks the Condition node and a random integer value are a good option.

    1 ! 2 ! 3 ! 4 ! 5 ! 6 ! 7 ! 8 ! 9


      К списку уроков

     новости   plugin db   а-чем-а-как   форум   ссылки   о проекте  
    Вся ответственность за содержание материалов, опубликованных на сайте, лежит на их авторах.
    Использование материалов, опубликованных на сайте, разрешено только со ссылкой на источник.

    Copyright © 2003-2011 C!NEMAXiMUS