Skip to content

Commit ebc7fa7

Browse files
committed
Finished complex emission shape docs
1 parent 63830c4 commit ebc7fa7

8 files changed

+91
-3
lines changed

tutorials/3d/particles/complexshapes.rst

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,90 @@
33
Complex emission shapes
44
-----------------------
55

6-
todo
6+
.. figure:: img/particle_complex_emission.webp
7+
:alt: Complex emission shapes
8+
9+
When it is not enough to emit particles from one of the simple shapes available
10+
in the :ref:`process material <doc_particleprocessmaterial3d_shapes>`, Godot provides
11+
a way to emit particles from arbitrary, complex shapes. The shapes are generated from
12+
meshes in the scene and stored as textures in the particle process material. This is a
13+
very versatile workflow that has allowed users to use particle systems for things that
14+
go beyond traditional use cases, like foliage, leaves on a tree, or complex
15+
holographic effects.
16+
17+
.. note::
18+
When you create emission points from meshes, you can only select a single node as
19+
emission source. If you want particles to emit from multiple shapes, you either
20+
have to create several particle systems or combine the meshes into one in an
21+
external DCC software.
22+
23+
.. figure:: img/particle_create_emission_points.png
24+
:alt: Creating emission points
25+
:align: right
26+
27+
Create particle emission points...
28+
29+
.. figure:: img/particle_select_emission_mesh.png
30+
:alt: Select mesh for emission
31+
:align: right
32+
33+
\...from a mesh instance as the source
34+
35+
.. figure:: img/particle_emission_density.png
36+
:alt: Set emission density
37+
:align: right
38+
39+
More points = higher particle density
40+
41+
To make use of this feature, start by creating a particle system in the current scene.
42+
Add a mesh instance that serves as the source of the particle emission points. With the
43+
particle system selected, navigate to the viewport menu and select the *GPUParticles3D*
44+
entry. From there, select ``Create Emission Points From Node``.
45+
46+
A dialog window will pop up and ask you to select a node as the emission source.
47+
Choose one of the mesh instances in the scene and confirm your selection. The next
48+
dialog window deals with the amount of points and how to generate them.
49+
50+
``Emission Points`` controls the total number of points that you are about to generate.
51+
Particles will spawn from these points, so what to enter here depends on the
52+
size of the source mesh (how much area you have to cover) and the desired density of
53+
the particles.
54+
55+
``Emission Source`` offers 3 different options for how the points are generated.
56+
Select ``Surface Points`` if all you want to do is distribute the emission points across the
57+
surface of the mesh. Select ``Surface Points + Normal (Directed)`` if you also want to
58+
generate information about the surface normals and make particles move in the direction
59+
that the normals point at. The last option, ``Volume``, creates emission points everywhere
60+
inside the mesh, not just across its surface.
61+
62+
The emission points are stored in the particle system's local coordinate system, so
63+
you can move the particle node around and the emission points will follow. This might be
64+
useful when you want to use the same particle system in several different places. On the
65+
other hand, you might have to regenerate the emission points when you move either
66+
the particle system or the source mesh.
67+
68+
Emission shape textures
69+
~~~~~~~~~~~~~~~~~~~~~~~
70+
71+
.. figure:: img/particle_emission_textures.png
72+
:alt: Emission textures
73+
:align: right
74+
75+
The available emission shape textures
76+
77+
All the data for complex particle emission shapes is stored in a set of textures. How
78+
many, depends on the type of emission shape you use. If you set the ``Shape`` property
79+
in the ``Emission Shape`` group on the particle process material to ``Points``, you
80+
have access to 2 texture properties, the ``Point Texture`` and the ``Color Texture``.
81+
Set it to ``Directed Points`` and there is a third property called ``Normal Texture``.
82+
83+
``Point Texture`` contains all possible emission points that were generated in the
84+
previous step. A point is randomly selected for every particle when it spawns.
85+
``Normal Texture``, if it exists, provides a direction vector at that same location.
86+
If the ``Color Texture`` property is also set, it provides color for the particle,
87+
sampled at the same location as the other two textures and modulating any other color
88+
that was set up on the process material.
89+
90+
There is also the ``Point Count`` property that you can use to change the number of
91+
emission points at any time after creating the emission shape. This includes dynamically
92+
at runtime while the playing the game.
414 KB
Loading
10.4 KB
Loading
7.79 KB
Loading
10.5 KB
Loading
15.8 KB
Loading

tutorials/3d/particles/materialproperties.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ lifetime. A value of ``0`` means there is no randomness at all and all particles
2626
the same amount of time, set by the :ref:`Lifetime <doc_particleproperties3d_time>` property. A value of ``1`` means
2727
that a particle's lifetime is completely random within the range of [0.0, ``Lifetime``].
2828

29+
.. _doc_particleprocessmaterial3d_shapes:
30+
2931
Emission shape
3032
~~~~~~~~~~~~~~
3133

tutorials/3d/particles/turbulence.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ a particle to move faster and all particles to follow along narrower paths as a
9191

9292
Notice how the particle paths are more narrow and less spread out at high influence values (right)
9393

94-
Displacement
95-
~~~~~~~~~~~~
94+
Displacement properties
95+
~~~~~~~~~~~~~~~~~~~~~~~
9696

9797
Displacement changes a particle's starting position. Use ``Initial Displacement Min`` to set a
9898
lower limit and ``Initial Displacement Max`` to set an upper limit. When a particle spawns, the

0 commit comments

Comments
 (0)