(Added navigation) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
− | ==Particles Basic== |
||
⚫ | |||
'''User level:''' Beginner |
'''User level:''' Beginner |
||
− | '''Blender version:''' 2. |
+ | '''Blender version:''' 2.49 |
'''Results:''' a basic Particle system usable in the GameEngine |
'''Results:''' a basic Particle system usable in the GameEngine |
||
Line 13: | Line 12: | ||
Since Blender 2.42a it is required that added objects are dynamic actors to take care of the initial movement by the edit object actuator. Where dynamic actors are not applicable the particle should get appropriate logic bricks to perform the required movement. This tutorial deals with non-dynamic particles. |
Since Blender 2.42a it is required that added objects are dynamic actors to take care of the initial movement by the edit object actuator. Where dynamic actors are not applicable the particle should get appropriate logic bricks to perform the required movement. This tutorial deals with non-dynamic particles. |
||
− | + | =Preparation= |
|
*Create the texture with any paint program. Name it '''Particle_basic.png'''. It does not need an alpha channel. You can take it from here: [[Image:Particle_basic.png]] |
*Create the texture with any paint program. Name it '''Particle_basic.png'''. It does not need an alpha channel. You can take it from here: [[Image:Particle_basic.png]] |
||
*Create a new scene in Blender. |
*Create a new scene in Blender. |
||
*Remove the default cube <nowiki><x></nowiki>. |
*Remove the default cube <nowiki><x></nowiki>. |
||
+ | =Add the Objects= |
||
− | + | ==The basic Particle== |
|
⚫ | |||
*Add a plane <nowiki><space></nowiki> (add->mesh->plane). |
*Add a plane <nowiki><space></nowiki> (add->mesh->plane). |
||
[[Image:Tut_part_basic_00.png]] |
[[Image:Tut_part_basic_00.png]] |
||
+ | |||
+ | |||
+ | |||
+ | *Enter edit mode <nowiki><tab></nowiki>. |
||
⚫ | |||
+ | *Rotate the vertices that the face looks to the left side (along -X) <nowiki><r>,<-90>,<CR></nowiki>. |
||
*Leave edit mode <nowiki><tab></nowiki>. |
*Leave edit mode <nowiki><tab></nowiki>. |
||
− | *Apply |
+ | *Apply scale and rotation <nowiki><ctrl>+<a></nowiki> to make the face point along -X (required for halo mode, see remarks). Reset any rotation <nowiki><alt>+<r></nowiki>. |
*Select camera view <nowiki><num 0></nowiki>. |
*Select camera view <nowiki><num 0></nowiki>. |
||
*Alter the mesh name and the object name to ''Particle_basic'' to identify the particles later. |
*Alter the mesh name and the object name to ''Particle_basic'' to identify the particles later. |
||
[[Image:Tut_part_basic_01.png]] |
[[Image:Tut_part_basic_01.png]] |
||
+ | |||
⚫ | |||
+ | |||
⚫ | |||
+ | *apply a texture <nowiki><u></nowiki>->unwrap |
||
+ | *Got to Editing buttons <nowiki><F9></nowiki> texture face panel |
||
+ | *If it is saying there is no active face switch to face select mode <nowiki><ctrl>+<tab>,<3></nowiki> and select the face <nowiki><a></nowiki> |
||
*Switch on ''Tex'', ''Halo'' and ''Add'' under Texture face. ''Collision'' can be switched off. |
*Switch on ''Tex'', ''Halo'' and ''Add'' under Texture face. ''Collision'' can be switched off. |
||
− | NOTE: My particle would not appear unless 'Halo' was turned off. |
||
[[Image:Tut_part_basic_02.png]] |
[[Image:Tut_part_basic_02.png]] |
||
+ | |||
+ | |||
*Switch to the UV/Image Editor |
*Switch to the UV/Image Editor |
||
− | *Open the texture file '''Particle_basic.png''' (Image |
+ | *Open the texture file (Image->Open...) '''Particle_basic.png''' (Open Image). |
[[Image:Tut_part_basic_03.png]] |
[[Image:Tut_part_basic_03.png]] |
||
+ | |||
+ | |||
+ | |||
*Return to the 3D View. |
*Return to the 3D View. |
||
− | *Leave |
+ | *Leave Edit mode <nowiki><tab></nowiki>. |
− | *Switch the |
+ | *Switch the Draw type to texture mode <nowiki><Alt><z></nowiki>. |
+ | |||
+ | ===Material Settings=== |
||
+ | additional settings for '''Multitexture Materials''': |
||
+ | *Apply a material in Shading buttons <nowiki><F5></nowiki> in Links and Pipeline panel ADD NEW |
||
+ | *Optional: Change the material name to "Particle_basic" |
||
+ | *In Material panel switch on ''Shadeless'' |
||
+ | *In Texture panel add a texture (optional: Call it Particle_basic) |
||
+ | |||
+ | additional settings for for '''GLSL Materials''': |
||
+ | *Apply the settings for Multitexture Materials |
||
+ | *In Material panel switch on ''ObColor'' |
||
+ | *In Map Input panel switch to UV |
||
+ | *In Texture buttons <F6> |
||
+ | **Set ''Texture Type'' to "Image" |
||
+ | **In Image panel select image "Particle_basic.png" |
||
+ | |||
+ | ===Particle Logic=== |
||
*Go to the logic buttons <nowiki><F4></nowiki>. |
*Go to the logic buttons <nowiki><F4></nowiki>. |
||
*Add and connect following Logic bricks to the Particle_basic (necessary since 2.42a): |
*Add and connect following Logic bricks to the Particle_basic (necessary since 2.42a): |
||
Line 42: | Line 73: | ||
:*an AND controller and |
:*an AND controller and |
||
:*an motion actuator with the parameters dloc: 0.00, 0.00, 0.50, L disabled |
:*an motion actuator with the parameters dloc: 0.00, 0.00, 0.50, L disabled |
||
+ | |||
+ | |||
*Now it is time to test the particle in game mode. Press <nowiki><ctrl><down></nowiki> to make a full size window. |
*Now it is time to test the particle in game mode. Press <nowiki><ctrl><down></nowiki> to make a full size window. |
||
⚫ | |||
− | :*Go to View and make sure Orthographic is selected (particle won't show up in Perspective mode!) |
||
⚫ | |||
[[Image:Tut_part_basic_05.png]] |
[[Image:Tut_part_basic_05.png]] |
||
+ | |||
+ | |||
*Leave the Gameengine with <nowiki><Esc></nowiki>. |
*Leave the Gameengine with <nowiki><Esc></nowiki>. |
||
*If you couldn't see the white dot, check the alignment of the face <nowiki><alt>+<r></nowiki>. |
*If you couldn't see the white dot, check the alignment of the face <nowiki><alt>+<r></nowiki>. |
||
Line 53: | Line 87: | ||
*The basic particle is ready. |
*The basic particle is ready. |
||
− | + | ==The basic Emitter== |
|
*Go to the first layer <nowiki><1></nowiki>. The particle should [[not]] be on a visible layer when running the gameengine. |
*Go to the first layer <nowiki><1></nowiki>. The particle should [[not]] be on a visible layer when running the gameengine. |
||
*Select the top view <nowiki><num 7></nowiki>. |
*Select the top view <nowiki><num 7></nowiki>. |
||
*Add an Empty <nowiki><space></nowiki> (add->empty) |
*Add an Empty <nowiki><space></nowiki> (add->empty) |
||
− | * |
+ | *Go to Editing buttons <nowiki><F9></nowiki> and name it Emitter_basic (optional). |
[[Image:Tut_part_basic_07.png]] |
[[Image:Tut_part_basic_07.png]] |
||
+ | |||
+ | |||
+ | *Go to Logic Buttons <nowiki><F4></nowiki> |
||
*Add and connect following logic bricks to the Emitter_basic: |
*Add and connect following logic bricks to the Emitter_basic: |
||
− | :*an always sensor, |
+ | :*an always sensor (TRUE pulse mode on), |
:*an AND controller and |
:*an AND controller and |
||
− | :*an edit Object actuator with the parameters [add Object], OB: |
+ | :*an edit Object actuator with the parameters [add Object], OB:Particle_basic, time 6, linV [0][0][0]. |
:'''Attention''': LinV does not work in Blender 2.42a and above as long the particles are not dynamic actors. Dynamic actor particles can cause unexpected behaviour and performance issues. |
:'''Attention''': LinV does not work in Blender 2.42a and above as long the particles are not dynamic actors. Dynamic actor particles can cause unexpected behaviour and performance issues. |
||
Line 68: | Line 105: | ||
[[Image:Tut_part_basic_08.png]] |
[[Image:Tut_part_basic_08.png]] |
||
+ | |||
+ | |||
*Select camera view <num 0>. |
*Select camera view <num 0>. |
||
*Press <nowiki><ctrl><down></nowiki> to make a full size window. |
*Press <nowiki><ctrl><down></nowiki> to make a full size window. |
||
Line 73: | Line 112: | ||
*Press <nowiki><p></nowiki> to start the Gameengine. |
*Press <nowiki><p></nowiki> to start the Gameengine. |
||
[[Image:Tut_part_basic_09.png]] |
[[Image:Tut_part_basic_09.png]] |
||
⚫ | |||
+ | |||
⚫ | |||
⚫ | |||
⚫ | *The particle object (Particle_basic) in halo mode will be rotated to the camera around the local axis (rotation in edit mode). The camera will see the particle object as it would see it when looking along the X-axis. Rotations performed in object mode will not apply. For easier editing the particle object can be rotated to the camera in object mode without effecting the halo faces. |
||
+ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | *The particle object (Particle_basic) in halo mode will be rotated to the camera around the local axis (rotation in edit mode). The camera will see the particle object as it would see it when looking along the X-axis. The particles face must face the opposite direction (-X). Rotations performed in object mode will not apply. ''For easier editing the particle object can be rotated to the camera in object mode without effecting the halo faces.'' |
||
⚫ | |||
⚫ | |||
+ | *Added objects (the particles) will all have the same name. This is important when referenced by scripts. |
||
{{View Add Comments|Particlebasic}} |
{{View Add Comments|Particlebasic}} |
||
+ | |||
+ | {{Row Of Boxes}} |
||
+ | {{Red Box}} |
||
+ | Continue with [[Particleflame|Particle flame]] or up to [[Special_Effects_Tutorials|Special Effects Tutorials]] |
||
+ | |} |
||
[[Category:Tutorials]] |
[[Category:Tutorials]] |
Latest revision as of 11:34, 28 May 2010
General[]
User level: Beginner
Blender version: 2.49
Results: a basic Particle system usable in the GameEngine
Particles in the Blender Gameengine are not the same as particles in the Blender Editor. Gameengine Particles are objects of any type added at runtime. Usually this are small faces with a texture that forms the shape of one or more particles. Particles can be combined to produce some eyecandy effects such as flames, smoke or fireworks. This tutorial describes how to set up a simple particle system. Advanced tutorials will describe how to get some nice effects.
Since Blender 2.42a it is required that added objects are dynamic actors to take care of the initial movement by the edit object actuator. Where dynamic actors are not applicable the particle should get appropriate logic bricks to perform the required movement. This tutorial deals with non-dynamic particles.
Preparation[]
- Create the texture with any paint program. Name it Particle_basic.png. It does not need an alpha channel. You can take it from here:
- Create a new scene in Blender.
- Remove the default cube <x>.
Add the Objects[]
The basic Particle[]
- Add a plane <space> (add->mesh->plane).
- Enter edit mode <tab>.
- Select front view <num 1>.
- Rotate the vertices that the face looks to the left side (along -X) <r>,<-90>,<CR>.
- Leave edit mode <tab>.
- Apply scale and rotation <ctrl>+<a> to make the face point along -X (required for halo mode, see remarks). Reset any rotation <alt>+<r>.
- Select camera view <num 0>.
- Alter the mesh name and the object name to Particle_basic to identify the particles later.
- Enter edit mode <tab>. The one face of the basic particle should be selected already. If not select the face <a>.
- apply a texture <u>->unwrap
- Got to Editing buttons <F9> texture face panel
- If it is saying there is no active face switch to face select mode <ctrl>+<tab>,<3> and select the face <a>
- Switch on Tex, Halo and Add under Texture face. Collision can be switched off.
- Switch to the UV/Image Editor
- Open the texture file (Image->Open...) Particle_basic.png (Open Image).
- Return to the 3D View.
- Leave Edit mode <tab>.
- Switch the Draw type to texture mode <Alt><z>.
Material Settings[]
additional settings for Multitexture Materials:
- Apply a material in Shading buttons <F5> in Links and Pipeline panel ADD NEW
- Optional: Change the material name to "Particle_basic"
- In Material panel switch on Shadeless
- In Texture panel add a texture (optional: Call it Particle_basic)
additional settings for for GLSL Materials:
- Apply the settings for Multitexture Materials
- In Material panel switch on ObColor
- In Map Input panel switch to UV
- In Texture buttons <F6>
- Set Texture Type to "Image"
- In Image panel select image "Particle_basic.png"
Particle Logic[]
- Go to the logic buttons <F4>.
- Add and connect following Logic bricks to the Particle_basic (necessary since 2.42a):
- an always sensor,
- an AND controller and
- an motion actuator with the parameters dloc: 0.00, 0.00, 0.50, L disabled
- Now it is time to test the particle in game mode. Press <ctrl><down> to make a full size window.
- Make sure you are in camera view (perspective mode). Press <p> to start the Gameengine. You should see following:
- Leave the Gameengine with <Esc>.
- If you couldn't see the white dot, check the alignment of the face <alt>+<r>.
- Press <ctrl><down> to return from full size window.
- Move the particle to another layer <m>. This is required for the basic emitter.
- The basic particle is ready.
The basic Emitter[]
- Go to the first layer <1>. The particle should not be on a visible layer when running the gameengine.
- Select the top view <num 7>.
- Add an Empty <space> (add->empty)
- Go to Editing buttons <F9> and name it Emitter_basic (optional).
- Go to Logic Buttons <F4>
- Add and connect following logic bricks to the Emitter_basic:
- an always sensor (TRUE pulse mode on),
- an AND controller and
- an edit Object actuator with the parameters [add Object], OB:Particle_basic, time 6, linV [0][0][0].
- Attention: LinV does not work in Blender 2.42a and above as long the particles are not dynamic actors. Dynamic actor particles can cause unexpected behaviour and performance issues.
- Note: No actor needed in 2.45, LinV works fine.
- Select camera view <num 0>.
- Press <ctrl><down> to make a full size window.
- Test the Emitter in game mode.
- Press <p> to start the Gameengine.
- The basic Emitter is done.
Remarks[]
- The particle object (Particle_basic) in halo mode will be rotated to the camera around the local axis (rotation in edit mode). The camera will see the particle object as it would see it when looking along the X-axis. The particles face must face the opposite direction (-X). Rotations performed in object mode will not apply. For easier editing the particle object can be rotated to the camera in object mode without effecting the halo faces.
- New particles cannot instanciated by the Gameengine if the layer with the original particle is visible. The original particle will be shown instead.
- Halo faces require a perspective view (e.g. cameraview). In othogonal view the halo faces are not correctly aligned to the screen mostlikely invisible.
- Added objects (the particles) will all have the same name. This is important when referenced by scripts.
Continue with Particle flame or up to Special Effects Tutorials |