Unity3D Game Development ten particle systems

Source: Internet
Author: User

The Shuriken particle system is a new particle system in Unity3.5. It adopts modular management. The personalized particle module works with the particle curve editor to make it easier for users to create a variety of colorful and complex particle effects.

Choose GameObject> Greate Other> Particle System from the menu bar, and create a new Particle game object in the scenario, for example:


The control panel of the Particle System consists of the attribute Panel of the Particle System component in the Inspector view and the Particle Effect panel in the Scene view. The attribute Panel of the Particle System component consists of the Particle System initialization module, Emission, Shape, and other modules. Each module controls the behavior characteristics of a Particle, the bottom of the attribute panel is the Particle System Curves Particle curve, for example:


Click the Open Editor button to bring up the Particle Editor dialog box, which integrates the Particle System attribute panel and the Particle curve Editor to facilitate the management and adjustment of complex Particle effects, such:


Initial Module initialization Module, which is an inherent Module of the particle system initialization Module and cannot be deleted or disabled, this module defines a series of basic parameters such as duration, Cycle Mode, emission speed, and size during particle initialization, such:



Emission Module)

The emission module controls the particle emission rate. During the particle duration, a large number of particles can be produced in a specific event, this is very useful when a large push particle is required to simulate the explosion effect. Rate: emission Rate, the number of particles emitted per second or each distance unit, click the lower triangle button on the right to select whether the emission quantity is controlled by a constant or a particle curve. Click the lower triangle button under the right to select whether the particle emission rate changes by time or distance; bursts: particle Bursts. A large number of particles are added at a specified time point during the particle duration. This option only appears when the particle rate change mode is time change, for example:


Shape Module, which defines the Shape of a particle transmitter. It can provide initial recognition force along the normal or random direction of the Shape surface and control the position and direction of the particle emission.

Shape: the Shape of the particle transmitter. The initial velocity of the emitted particle varies with the Shape of the transmitter. The parameters of each transmitter are also different. For example:


Sphere: Sphere transmitter; hemisloud: Hemisphere transmitter; Cone: Vertebral transmitter; Box: Cube transmitter; Mesh: Grid transmitter; for example:



The following describes how to use the particle system and enable existing scenarios through specific cases, such:


Click the Play button to run the scenario. As the camera moves, the robots, fans, and devices in the camera can be viewed, and they are very vivid and vivid. Observe the scene to find the rotating fan, if you can add some particles will be better, the following will explain how to increase the effect of falling snow and cold air particles in the fan.

Switch to the Scene view, double-click the fan model, or expand the DynamicObjects level in the Hierarchy view. Double-click the Prop_fan_large game object to move the current view to the fan game object, here we need to create two particle systems near the fan to simulate the effect of snow particles blown in by the fan from the outside and the effect of cold air.

Create a new particle system game object, such:


We can see that the position of the particle is near the fan and the particle has a default effect similar to that of the white light ball. The new particle effect makes the default effect, it does not match the snowflake effect required by the project. Therefore, you need to adjust the attribute parameters of the newly created particle step by step.

On the home page, you need to set the particle Material. In the Inspector view, click the Renderer module label, click the circle button on the right of the Material attribute, and select the part_bokeh_mat Material in the pop-up Material selection box, for example:


Particle effect:


We will continue to adjust the attributes, set Start Lifetime to 3.5, and click the lower triangle button on the Right of Start Speed (particle initial Speed, in the drop-down list, select the speed value change mode as Random Between Two Constants (Two Constants are randomly selected). The Two constant values are set to 1 and 2, in this way, the falling speed of snowflake is a random value. Similarly, the value of Start Size is set to a random value between 0.015 and 0.035 constants. Click the lower triangle button on the Right of Start Color (particle initial Color) and select Random Between Two Colors from the drop-down list (Random selection of Two solid Colors ), let the color of the particle be randomly selected in two solid colors, and finally set the maximum number of Particles (the maximum number of Particles) to 5000, so that the parameters of the particle initialization module are set, such:


Set the parameter value of the Emission module to 30,

Set the parameters of the Shape module, select Cone, set the Angle value to 20, and the Radius value to 1.7.

Force over Lifetime Module (Life Cycle Force Module), which controls the Force of particles in the life cycle. The vertical Force of the xyz3 axis is set to-0.74, space is the World (World coordinate system). Adjust the parameters so that the particle is affected by a force.

Color over Lifetime Module (lifecycle Color Module), which controls the parameter settings of the Renderer Module for each particle in its lifecycle, select the check boxes on the Right of Cast Shadows and Receive Shadows so that the particles can accept and reflect light, for example:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.