Ogre particle editor tutorial-translation)

Source: Internet
Author: User

Go to: http://hghhe.blog.163.com/blog/static/3237756820097282715118/

In this tutorial, we will create a simple particle system effect. By creating this basic particle system, we will be familiar with many editor interfaces, hoping that we will know what this editor and the Ogre particle system can do.

In this tutorial, we will create such a particle system, a simple spraying effect.

Tip: This tutorial assumes that you have not modified any data files in the editor.

Okay. Open the particle editor. By default, the particle system is loaded to the background, and all main editing windows are displayed. Except for the editor options window, only the title is displayed by default.

Open the template Management window (double-click to open, similar to other windows) and select the available option. The available Particle System Script Name, Template Name, and whether to display the list. Click the unload button to uninstall the default particle system (ze Note: The currently displayed particles will not be displayed), and the particle system parameters window will no longer be able to adjust parameters, "selected particle system template not loaded" is displayed in the window )".

Let's create a new particle system. Select the new template option and enter your new Template Name below. Here, Let's enter "tutorial1". Make sure that the "use ults" radio button is selected.

Creates a new template based on the default engine settings.

Click create.
Now your new template will not be created or loaded. Select the available option. Your new particle template will be displayed in the list. The script name is "not-saved"-This is because our new template only exists in the particle editor, it does not exist in the script Unless we save it. We will save it later. Let's play here for a while.

If you have selected a new template in the list, clicking -- again will jump to the selected option. Click the Load button.
Your new template has been loaded, but you cannot see the scattered particles. Because we need to add at least one transmitter. Let's move to the participant system parameters window. There should be only one basic visible option here. In the lower part of the window, you should be able to see the Add emitter button next to a drop-down control. Select "ring" in the drop-down control of the transmitter type (ze note: the drop-down control on the left, "box" is selected by default), and click "add emitter.

A annular transmitter will be added to your particle system, and now you will see an option named "emitter 1" (Translator's note: the right side of the basic option ). Now you should see some big white blocks shaking slightly. This may not seem exciting, but don't be discouraged! What you see is the default particle size and material-width and height are equivalent to 30 units, and the material is basically white. In fact, the actual default particle width and height of ogre are 100 units, but this exceeds the parameter value in the editor configuration file. CFG is the smallest and largest value, so it is reduced to the maximum width and high value of the editor.

Add a particle transmitter with the default white material

Let's modify a few basic parameter values. Enter the following values in the basic parameters panel. Locate the parameter location and enter or select the corresponding value in the input box.
basic
quota = 2000
material = PE/lensflare
Participant _width = 3
Participant _height = 3
cull_each = false
now we can see that the particle is very small, let's modify the parameters of the transmitter.
click emitter 1. In this way, a wizard is available for the transmitter region setting wizard and the transmitter direction setting wizard. The setting of the transmitter area will better control the transmitter size and position. The transmitter direction setting controls the direction of the emitted particles.
modify emitter 1 to the following values:
emitter 1 (ring)
color = 0 0.4 1 1
emission_rate = 200
position = 0-20 0
velocity = 0.01
time_to_live = 3
width = 60
Height = 60
depth = 2
inner_width = 0.9
inner_height = 0.9

The transmitter wizard automatically sets the size of some transmitter regions.

Now you should see a small blue moving particle ring.
Before continuing our work, let's stay for a while. You do not need to open the template Management window. Click the X button on the right of the title bar to close the window. Open the editor options window and select the camera control option. Select the Camera mode as "target" from the drop-down list ". If you want the particle system to display on the left side of the editing window, click the right arrow to move the camera. Move the camera's position to an appropriate position in the particle system's proximity to the particle system parameters window. Close the editor options window.

Let's add another transmitter. In the particle system parameters window, select the basic option again. This time, select the "point" transmitter style. Click Add emitter to add a transmitter to the particle system.
An option named "emitter 2" is now available. Select it and modify its parameters to the following values:
Emitter 2 (point)
Angle = 4
Color = 0.23 0.54 0.35 1
Direction = 0-1 0
Emission_rate = 80
Position 0 20 0
Velocity_min = 10
Velocity_max = 20
Time _ to_live_min = 1.5
Time _ to_live_max = 2.5
It is advisable to save our work from time to prevent your cat from jumping off the keyboard to destroy our work ).
Click the restore button in the status bar to display the edited window we closed previously. In the template Management window, click the selected option. Enter a valid particle script file name (test. Particle here) and click Save. A confirmation box is displayed, click OK, and click OK again in the message box that shows that you have successfully saved the file.
If you have read the available option, you will find that your new particle system template has a script name.
Close the template Management window and editor opeions window again. Now it is time to add another transmitter.
In this basic option, select a point transmitter style and add a transmitter to the particle system. Select the new emitter 3 option and modify the following parameters:
Emitter 3 (point)
First, set the transmitter position to the left of the ring of emitter 1.
Position =-30-20 0
Setting the particle speed allows us to see where it moves.
Velocity = 40
Now let's modify the direction of the transmitter to make it and the emitter 2 point intersection. Test continuously in the direction helper window until the direction is set correctly. (Note: This method is simpler later) Click the small blue button next to the direction Parameter Control to open the direction helper window. Select emitter 2 from the drop-down list and click Apply direction.
Direction = 0.6 0.8 0
Enter the following parameters:
Color = 0.96 0.63 0.77 1
Colour_range_end = 0.39 0.39 0.84 1
Emission_rate = 20
Time _ to_live = 1.2
Duration = 4
Repeat_delay = 2
Set the direction of one transmitter to another

Now we already have a transmitter on the left side of the particle system. It is very stupid to add a transmitter on the right side. However, this time we will use a simpler method because we will clone emitter 3.
Return to the basic option and click the Transmitter Type drop-down box. Drag down to see an option named "clone emitter 3. Select it, and then click Add emitter.
Your fourth transmitter has been added to your particle system. It looks like emitter 3, doesn't it? The parameter we want to change is only the position and direction of the transmitter.
Emitter 4 (point)
Direction =-0.6 0.8 0
Position = 30-20 0


Cloning a transmitter is a quick and simple copy of an existing transmitter parameter.

Add the last transmitter here to give us the desired spray effect. It is also a point type, select and add it, And then modify the following parameters:
Emitter 5 (point)
Angle = 10
Position = 0 20 0
Velocity_min = 40
Velocity_max = 50
Time_to_live = 3
Duration_min = 4
Duration_max = 6
Repeat_delay_min= 0.5
Repeat_delay_max= 1.5
Let's save our work again. Click the restore window button in the status bar to display the template Management window again. Select the selected option and click Save.
Tip: the transmitter has a time delay in the new particle system so that it cannot be observed synchronously. We want to see that when a particle transmitter emits particles, other transmitters also emit particles. The reason for not synchronizing is that we added them at a random time point. The remedy is to simply click the reload button in the selected option (first make sure you have saved it ).
Haha, it's better.
Here, we create a particle system that looks more strange... to make it look more strange! Let's add an effect.
Return to the basic option, and select a "linearforce" option in the effect type drop-down box. Add to system.
When you add a filter, your particles will fall from the sky, just as gravity pulls them down.
Select the affectors option and click the randomise button several times ).
When you do not need to do so, let's manually modify the parameters. Click restore to modify the following parameters:
Affector (linearforce)
Force_vector = 0-500 0
Force_application = add


It is fun to add a linearforce effect using random values.
Well, these are the things you learned. If you are proud to see that your particle system has been created, you may want to turn around it, observe it from different angles, or screen it. Try to press F1. all gui interfaces will disappear. Use the mouse to rotate the screen, or use "A", "W", "S", and "D". Try to press the secondary attention key to see what happened to your particle.


Use the "free camera" mode to closely observe the particle system you created
The tutorial ends here. Have a good time!

Translator: One-round month

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.