diff --git a/tutorials/2d/2d_transforms.rst b/tutorials/2d/2d_transforms.rst index a03a165d2..0184781c6 100644 --- a/tutorials/2d/2d_transforms.rst +++ b/tutorials/2d/2d_transforms.rst @@ -40,8 +40,7 @@ resizing or stretching the screen. This transform is used internally (as described in :ref:`doc_multiple_resolutions`), but can also be manually set on each viewport. -Input events received in the :ref:`MainLoop._input_event() ` -callback are multiplied by this transform but lack the ones above. To +Input events are multiplied by this transform but lack the ones above. To convert InputEvent coordinates to local CanvasItem coordinates, the :ref:`CanvasItem.make_input_local() ` function was added for convenience. diff --git a/tutorials/2d/custom_drawing_in_2d.rst b/tutorials/2d/custom_drawing_in_2d.rst index f5c52606c..a3a82a575 100644 --- a/tutorials/2d/custom_drawing_in_2d.rst +++ b/tutorials/2d/custom_drawing_in_2d.rst @@ -58,7 +58,7 @@ The ``_draw()`` function is only called once, and then the draw commands are cached and remembered, so further calls are unnecessary. If re-drawing is required because a state or something else changed, -call :ref:`CanvasItem.update() ` +call :ref:`CanvasItem.queue_redraw() ` in that same node and a new ``_draw()`` call will happen. Here is a little more complex example, a texture variable that will be diff --git a/tutorials/2d/particle_systems_2d.rst b/tutorials/2d/particle_systems_2d.rst index f11d2f872..8bf9e7268 100644 --- a/tutorials/2d/particle_systems_2d.rst +++ b/tutorials/2d/particle_systems_2d.rst @@ -19,34 +19,34 @@ parameters and then adding randomness to them. Particle nodes ~~~~~~~~~~~~~~ -Godot provides two different nodes for 2D particles, :ref:`class_Particles2D` and +Godot provides two different nodes for 2D particles, :ref:`class_GPUParticles2D` and :ref:`class_CPUParticles2D`. -Particles2D is more advanced and uses the GPU to process particle effects, but that limits +GPUParticles2D is more advanced and uses the GPU to process particle effects, but that limits it to higher end graphics API, and in our case to the GLES3 renderer. For projects using the GLES2 backend, CPUParticles2D is a CPU-driven option with near feature parity with -Particles2D, but lesser performance. While Particles2D is configured via a -:ref:`class_ParticlesMaterial` (and optionally with a custom shader), the matching options +GPUParticles2D, but lesser performance. While GPUParticles2D is configured via a +:ref:`class_ParticleProcessMaterial` (and optionally with a custom shader), the matching options are provided via node properties in CPUParticles2D (with the exception of the trail settings). -You can convert a Particles2D node into a CPUParticles2D node by clicking on the node in the +You can convert a GPUParticles2D node into a CPUParticles2D node by clicking on the node in the inspector, and selecting "Convert to CPUParticles2D" in the "Particles" menu of the toolbar. .. image:: img/particles_convert.png -The rest of this tutorial is going to use the Particles2D node. First, add a Particles2D +The rest of this tutorial is going to use the GPUParticles2D node. First, add a GPUParticles2D node to your scene. After creating that node you will notice that only a white dot was created, -and that there is a warning icon next to your Particles2D node in the scene dock. This -is because the node needs a ParticlesMaterial to function. +and that there is a warning icon next to your GPUParticles2D node in the scene dock. This +is because the node needs a ParticleProcessMaterial to function. -ParticlesMaterial -~~~~~~~~~~~~~~~~~ +ParticleProcessMaterial +~~~~~~~~~~~~~~~~~~~~~~~ To add a process material to your particles node, go to ``Process Material`` in your inspector panel. Click on the box next to ``Material``, and from the dropdown -menu select ``New ParticlesMaterial``. +menu select ``New ParticleProcessMaterial``. .. image:: img/particles_material.png -Your Particles2D node should now be emitting +Your GPUParticles2D node should now be emitting white points downward. .. image:: img/particles1.png @@ -80,7 +80,7 @@ Lifetime: 4.0 One Shot ~~~~~~~~ -When enabled, a Particles2D node will emit all of its particles once +When enabled, a GPUParticles2D node will emit all of its particles once and then never again. Preprocess @@ -149,7 +149,7 @@ The rectangle's ``W`` and ``H`` properties respectively control its Width and it The ``X`` and ``Y`` properties control the position of the upper-left corner of the rectangle, relative to the particle emitter. -You can have Godot generate a Visibility Rect automatically using the toolbar above the 2d view. To do so, select the Particles2D node and Click ``Particles > Generate Visibility Rect``. Godot will simulate the Particles2D node emitting particles for a few seconds and set the rectangle to fit the surface the particles take. +You can have Godot generate a Visibility Rect automatically using the toolbar above the 2d view. To do so, select the GPUParticles2D node and Click ``Particles > Generate Visibility Rect``. Godot will simulate the Particles2D node emitting particles for a few seconds and set the rectangle to fit the surface the particles take. You can control the emit duration with the ``Generation Time (sec)`` option. The maximum value is 25 seconds. If you need more time for your particles to move around, you can temporarily change the ``preprocess`` duration on the Particles2D node. @@ -174,8 +174,8 @@ This controls the order in which individual particles are drawn. ``Index`` means particles are drawn according to their emission order (default). ``Lifetime`` means they are drawn in order of remaining lifetime. -ParticlesMaterial settings --------------------------- +ParticleProcessMaterial settings +-------------------------------- Direction ~~~~~~~~~ @@ -303,11 +303,11 @@ randomness ratio. Emission Shapes --------------- -ParticlesMaterials allow you to set an Emission Mask, which dictates +ParticleProcessMaterials allow you to set an Emission Mask, which dictates the area and direction in which particles are emitted. These can be generated from textures in your project. -Ensure that a ParticlesMaterial is set, and the Particles2D node is selected. +Ensure that a ParticleProcessMaterial is set, and the GPUParticles2D node is selected. A "Particles" menu should appear in the Toolbar: .. image:: img/emission_shapes1.png @@ -348,7 +348,7 @@ Emission Colors ``Capture from Pixel`` will cause the particles to inherit the color of the mask at their spawn points. -Once you click "OK", the mask will be generated and set to the ParticlesMaterial, under the ``Emission Shape`` section: +Once you click "OK", the mask will be generated and set to the ParticleProcessMaterial, under the ``Emission Shape`` section: .. image:: img/emission_shapes4.png diff --git a/tutorials/3d/csg_tools.rst b/tutorials/3d/csg_tools.rst index a654522ca..860131149 100644 --- a/tutorials/3d/csg_tools.rst +++ b/tutorials/3d/csg_tools.rst @@ -13,7 +13,7 @@ Interior environments can be created by using inverted primitives. .. note:: The CSG nodes in Godot are mainly intended for prototyping. There is no built-in support for UV mapping or editing 3D polygons (though - extruded 2D polygons can be used with the CSGPolygon node). + extruded 2D polygons can be used with the CSGPolygon3D node). If you're looking for an easy to use level design tool for a project, you may want to use `Qodot `__ @@ -29,13 +29,13 @@ Introduction to CSG nodes Like other features of Godot, CSG is supported in the form of nodes. These are the CSG nodes: -- :ref:`CSGBox ` -- :ref:`CSGCylinder ` (also supports cone) -- :ref:`CSGSphere ` -- :ref:`CSGTorus ` -- :ref:`CSGPolygon ` -- :ref:`CSGMesh ` -- :ref:`CSGCombiner ` +- :ref:`CSGBox3D ` +- :ref:`CSGCylinder3D ` (also supports cone) +- :ref:`CSGSphere3D ` +- :ref:`CSGTorus3D ` +- :ref:`CSGPolygon3D ` +- :ref:`CSGMesh3D ` +- :ref:`CSGCombiner3D ` .. image:: img/csg_nodes.png @@ -59,7 +59,7 @@ Every CSG node supports 3 kinds of boolean operations: CSGPolygon ~~~~~~~~~~ -The :ref:`CSGPolygon ` node extrude along a Polygon drawn in +The :ref:`CSGPolygon3D ` node extrude along a Polygon drawn in 2D (in X, Y coordinates) in the following ways: - **Depth:** Extruded back a given amount. @@ -71,15 +71,15 @@ The :ref:`CSGPolygon ` node extrude along a Polygon drawn in .. image:: img/csg_poly.png -.. note:: The **Path** mode must be provided with a :ref:`Path ` +.. note:: The **Path** mode must be provided with a :ref:`Path3D ` node to work. In the Path node, draw the path and the polygon in - CSGPolygon will extrude along the given path. + CSGPolygon3D will extrude along the given path. Custom meshes ~~~~~~~~~~~~~ -Any mesh can be used for :ref:`CSGMesh `; the mesh can be +Any mesh can be used for :ref:`CSGMesh3D `; the mesh can be modelled in other software and imported into Godot. Multiple materials are supported. There are some restrictions for geometry: @@ -90,10 +90,10 @@ supported. There are some restrictions for geometry: .. image:: img/csg_custom_mesh.png -CSGCombiner -~~~~~~~~~~~ +CSGCombiner3D +~~~~~~~~~~~~~ -The :ref:`CSGCombiner ` node is an empty shape used for +The :ref:`CSGCombiner3D ` node is an empty shape used for organization. It will only combine children nodes. Processing order @@ -135,44 +135,44 @@ Create a scene with a Spatial node as root node. .. image:: img/csg_overdraw.png -Create a CSGBox and name it ``room``, enable **Invert Faces** and change the +Create a CSGBox3D and name it ``room``, enable **Invert Faces** and change the dimensions of your room. .. image:: img/csg_room.png .. image:: img/csg_room_invert.png -Next, create a CSGCombiner and name it ``desk``. +Next, create a CSGCombiner3D and name it ``desk``. A desk has one surface and 4 legs: -- Create 1 CSGBox children node in **Union** mode for the surface +- Create 1 CSGBox3D children node in **Union** mode for the surface and adjust the dimensions. -- Create 4 CSGBox children nodes in **Union** mode for the legs +- Create 4 CSGBox3D children nodes in **Union** mode for the legs and adjust the dimensions. Adjust their placement to resemble a desk. .. image:: img/csg_desk.png -.. note:: CSG nodes inside a CSGCombiner will only process their operation - within the combiner. Therefore, CSGCombiners are used to organize +.. note:: CSG nodes inside a CSGCombiner3D will only process their operation + within the combiner. Therefore, CSGCombiner3Ds are used to organize CSG nodes. -Create a CSGCombiner and name it ``bed``. +Create a CSGCombiner3D and name it ``bed``. -Our bed consists of 3 parts: the bed, the mattress and a pillow. Create a CSGBox -and adjust its dimension for the bed. Create another CSGBox and adjust its +Our bed consists of 3 parts: the bed, the mattress and a pillow. Create a CSGBox3D +and adjust its dimension for the bed. Create another CSGBox3D and adjust its dimension for the mattress. .. image:: img/csg_bed_mat.png -We will create another CSGCombiner named ``pillow`` as the child of ``bed``. +We will create another CSGCombiner3D named ``pillow`` as the child of ``bed``. The scene tree should look like this: .. image:: img/csg_bed_tree.png -We will combine 3 CSGSphere nodes in **Union** mode to form a pillow. Scale the +We will combine 3 CSGSphere3D nodes in **Union** mode to form a pillow. Scale the Y axis of the spheres and enable **Smooth Faces**. .. image:: img/csg_pillow_smooth.png @@ -186,8 +186,8 @@ Try to re-parent the ``pillow`` node to the root ``Spatial`` node; the hole will disappear. .. note:: This is to illustrate the effect of CSG processing order. - Since the root node is not a CSG node, the CSGCombiner nodes are - the end of the operations; this shows the use of CSGCombiner to + Since the root node is not a CSG node, the CSGCombiner3D nodes are + the end of the operations; this shows the use of CSGCombiner3D to organize the CSG scene. Undo the re-parent after observing the effect. The bed you've built should look @@ -195,16 +195,16 @@ like this: .. image:: img/csg_bed.png -Create a CSGCombiner and name it ``lamp``. +Create a CSGCombiner3D and name it ``lamp``. A lamp consists of 3 parts: the stand, the pole and the lampshade. -Create a CSGCylinder, enable the **Cone** option and make it the stand. Create -another CSGCylinder and adjust the dimensions to use it as a pole. +Create a CSGCylinder3D, enable the **Cone** option and make it the stand. Create +another CSGCylinder3D and adjust the dimensions to use it as a pole. .. image:: img/csg_lamp_pole_stand.png -We will use a CSGPolygon for the lampshade. Use the **Spin** mode for the -CSGPolygon and draw a `trapezoid `_ +We will use a CSGPolygon3D for the lampshade. Use the **Spin** mode for the +CSGPolygon3D and draw a `trapezoid `_ while in **Front View** (numeric keypad 1); this shape will extrude around the origin and form the lampshade. @@ -218,21 +218,21 @@ Adjust the placement of the 3 parts to make it look like a lamp. .. image:: img/csg_lamp.png -Create a CSGCombiner and name it ``bookshelf``. +Create a CSGCombiner3D and name it ``bookshelf``. -We will use 3 CSGBox nodes for the bookshelf. Create a CSGBox and adjust its +We will use 3 CSGBox3D nodes for the bookshelf. Create a CSGBox3D and adjust its dimensions; this will be the size of the bookshelf. .. image:: img/csg_shelf_big.png -Duplicate the CSGBox and shorten the dimensions of each axis and change the mode +Duplicate the CSGBox3D and shorten the dimensions of each axis and change the mode to **Subtraction**. .. image:: img/csg_shelf_subtract.png .. image:: img/csg_shelf_subtract_menu.png -You've almost built a shelf. Create one more CSGBox for dividing the shelf into +You've almost built a shelf. Create one more CSGBox3D for dividing the shelf into two levels. .. image:: img/csg_shelf.png @@ -261,7 +261,7 @@ to quickly apply textures to CSG-based levels. There are two ways to apply a material to a CSG node: -- Applying it to a CSGCombiner node as a material override +- Applying it to a CSGCombiner3D node as a material override (**Geometry > Material Override** in the Inspector). This will affect its children automatically, but will make it impossible to change the material in individual children. diff --git a/tutorials/math/beziers_and_curves.rst b/tutorials/math/beziers_and_curves.rst index 5c3347269..5ff892947 100644 --- a/tutorials/math/beziers_and_curves.rst +++ b/tutorials/math/beziers_and_curves.rst @@ -193,7 +193,7 @@ Curve2D, Curve3D, Path and Path2D There are two objects that contain curves: :ref:`Curve3D ` and :ref:`Curve2D ` (for 3D and 2D respectively). -They can contain several points, allowing for longer paths. It is also possible to set them to nodes: :ref:`Path ` and :ref:`Path2D ` (also for 3D and 2D respectively): +They can contain several points, allowing for longer paths. It is also possible to set them to nodes: :ref:`Path3D ` and :ref:`Path2D ` (also for 3D and 2D respectively): .. image:: img/bezier_path_2d.png diff --git a/tutorials/math/interpolation.rst b/tutorials/math/interpolation.rst index 409e2f06b..806762a38 100644 --- a/tutorials/math/interpolation.rst +++ b/tutorials/math/interpolation.rst @@ -96,7 +96,7 @@ Using the following pseudocode: Position3D p1 = GetNode("Position1"); Position3D p2 = GetNode("Position2"); - CSGMesh monkey = GetNode("Monkey"); + CSGMesh3D monkey = GetNode("Monkey"); monkey.Transform = p1.Transform.InterpolateWith(p2.Transform, _t); } diff --git a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst index 0394dabd4..cf32a06b3 100644 --- a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst +++ b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst @@ -271,5 +271,5 @@ moving. You can move them by updating the per-instance transform for each fish e doing so will be faster than moving thousands of MeshInstances per frame, it'll still likely be slow. -In the next tutorial we will cover how to use :ref:`Particles ` to take advantage +In the next tutorial we will cover how to use :ref:`GPUParticles3D ` to take advantage of the GPU and move each fish around individually while still receiving the benefits of instancing. diff --git a/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst b/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst index 44de676bd..0b9a30fcd 100644 --- a/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst +++ b/tutorials/performance/vertex_animation/controlling_thousands_of_fish.rst @@ -8,7 +8,7 @@ update their transform array. It is great for placing many static objects around scene. But it is still difficult to move the objects around the scene. To make each instance move in an interesting way, we will use a -:ref:`Particles ` node. Particles take advantage of GPU acceleration +:ref:`GPUParticles3D ` node. Particles take advantage of GPU acceleration by computing and setting the per-instance information in a :ref:`Shader `. .. note:: Particles are not available in GLES2, instead use :ref:`CPUParticles `, @@ -48,7 +48,7 @@ Then add the following two functions: return x; } -These functions come from the default :ref:`ParticlesMaterial `. +These functions come from the default :ref:`ParticleProcessMaterial `. They are used to generate a random number from each particle's ``RANDOM_SEED``. A unique thing about particle shaders is that some built-in variables are saved across frames. @@ -138,7 +138,7 @@ This code gives you the following behavior: .. image:: img/scene.gif -Using a ParticlesMaterial you can make the fish behavior as simple or complex as you like. In this +Using a ParticleProcessMaterial you can make the fish behavior as simple or complex as you like. In this tutorial we only set Velocity, but in your own Shaders you can also set ``COLOR``, rotation, scale (through ``TRANSFORM``). Please refer to the :ref:`Particles Shader Reference ` for more information on particle shaders. diff --git a/tutorials/rendering/gles2_gles3_differences.rst b/tutorials/rendering/gles2_gles3_differences.rst index 66c7dabc5..8085aa9ab 100644 --- a/tutorials/rendering/gles2_gles3_differences.rst +++ b/tutorials/rendering/gles2_gles3_differences.rst @@ -14,12 +14,12 @@ of bugs. There may be differences that are unintentional, but they should be rep Particles --------- -GLES2 cannot use the :ref:`Particles ` or :ref:`Particles2D ` nodes +GLES2 cannot use the :ref:`GPUParticles3D ` or :ref:`GPUParticles2D ` nodes as they require advanced GPU features. Instead, use :ref:`CPUParticles ` or :ref:`CPUParticles2D `, which provides a similar interface to a -:ref:`ParticlesMaterial `. +:ref:`ParticleProcessMaterial `. -.. tip:: Particles and Particles2D can be converted to their CPU equivalent node with the "Convert to +.. tip:: Particles and GPUParticles2D can be converted to their CPU equivalent node with the "Convert to CPUParticles" option in the editor. ``SCREEN_TEXTURE`` mip-maps diff --git a/tutorials/shaders/shader_materials.rst b/tutorials/shaders/shader_materials.rst index 4185390ca..4c333e705 100644 --- a/tutorials/shaders/shader_materials.rst +++ b/tutorials/shaders/shader_materials.rst @@ -8,7 +8,7 @@ Introduction For the most common cases, Godot provides ready to use materials for most types of shaders, such as :ref:`StandardMaterial3D `, -:ref:`CanvasItemMaterial ` and :ref:`ParticlesMaterial `. +:ref:`CanvasItemMaterial ` and :ref:`ParticleProcessMaterial `. They are flexible implementations that cover most use cases. Shader materials allow writing a custom shader directly, for maximum flexibility. @@ -70,7 +70,7 @@ Converting to ShaderMaterial ---------------------------- It is possible to convert from StandardMaterial3D, CanvasItemMaterial and -ParticlesMaterial to ShaderMaterial. To do so, go to the material properties +ParticleProcessMaterial to ShaderMaterial. To do so, go to the material properties and select the convert option. .. image:: img/shader_material_convert.png diff --git a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst index b9d8ec587..b37fcfb7a 100644 --- a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst +++ b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst @@ -42,8 +42,8 @@ program (e.g. Blender). But Godot also has a few :ref:`PrimitiveMeshes importing Meshes. There are multiple node types that you can use to draw a mesh. The main one is -:ref:`MeshInstance `, but you can also use :ref:`Particles -`, :ref:`MultiMeshes ` (with a +:ref:`MeshInstance `, but you can also use :ref:`GPUParticles3D +`, :ref:`MultiMeshes ` (with a :ref:`MultiMeshInstance `), or others. Typically, a material is associated with a given surface in a mesh, but some