Standardize RST header syntax

This commit is contained in:
tetrapod00
2024-12-04 17:17:05 -08:00
parent 56a3dc697f
commit c4d3aa134a
101 changed files with 695 additions and 694 deletions

View File

@@ -70,7 +70,7 @@ This will simply play back the animation. Make sure that the ``AnimationTree`` i
Following is a short description of available nodes:
Blend2 / Blend3
^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~
These nodes will blend between two or three inputs by a user-specified blend value:
@@ -84,7 +84,7 @@ This is very useful for layering animations on top of each other.
.. image:: img/animtree6.png
OneShot
^^^^^^^
~~~~~~~
This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
@@ -122,7 +122,7 @@ After setting the request and changing the animation playback, the one-shot node
animationTree.Get("parameters/OneShot/active");
TimeSeek
^^^^^^^^
~~~~~~~~
This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an ``Animation`` from the start or a certain playback position inside the ``AnimationNodeBlendTree``.
@@ -150,12 +150,12 @@ After setting the time and changing the animation playback, the seek node automa
animationTree.Set("parameters/TimeSeek/seek_request", 12.0);
TimeScale
^^^^^^^^^
~~~~~~~~~
Allows scaling the speed of the animation (or reverse it) connected to the `in` input via the `scale` parameter. Setting the `scale` to 0 will pause the animation.
Transition
^^^^^^^^^^
~~~~~~~~~~
Very simple state machine (when you don't want to cope with a ``StateMachine`` node). Animations can be connected to the outputs and transition times can be specified.
After setting the request and changing the animation playback, the transition node automatically clears the request on the next process frame by setting its ``transition_request`` value to an empty string (``""``).
@@ -190,7 +190,7 @@ After setting the request and changing the animation playback, the transition no
animationTree.Get("parameters/Transition/current_index");
BlendSpace2D
^^^^^^^^^^^^
~~~~~~~~~~~~
``BlendSpace2D`` is a node to do advanced blending in two dimensions. Points are added to a two-dimensional space and then a position
can be controlled to determine blending:
@@ -214,12 +214,12 @@ This mode can be changed in the *Blend* menu:
.. image:: img/animtree10.png
BlendSpace1D
^^^^^^^^^^^^
~~~~~~~~~~~~
This is similar to 2D blend spaces, but in one dimension (so triangles are not needed).
StateMachine
^^^^^^^^^^^^
~~~~~~~~~~~~
This node acts as a state machine with root nodes as states. Root nodes can be created and connected via lines. States are connected via *Transitions*,
which are connections with special properties. Transitions are uni-directional, but two can be used to connect in both directions.

View File

@@ -110,7 +110,7 @@ Once you've configured and enabled Movie Maker mode, it will be automatically us
when running the project from the editor.
Command line usage
^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~
Movie Maker can also be enabled from the :ref:`command line <doc_command_line_tutorial>`:
@@ -157,7 +157,7 @@ Godot has 2 built-in :ref:`MovieWriters <class_MovieWriter>`, and more can be
implemented by extensions:
AVI (recommended)
^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~
AVI container with MJPEG for video and uncompressed audio. Features lossy video
compression, resulting in medium file sizes and fast encoding. The lossy
@@ -173,7 +173,7 @@ To use AVI, specify a path to an ``.avi`` file to be created in the
**Editor > Movie Writer > Movie File** project setting.
PNG
^^^
~~~
PNG image sequence for video and WAV for audio. Features lossless video
compression, at the cost of large file sizes and slow encoding. This is designed
@@ -193,7 +193,7 @@ To use PNG, specify a ``.png`` file to be created in the
file will have the same name as the ``.png`` file (minus the extension).
Custom
^^^^^^
~~~~~~
If you need to encode directly to a different format or pipe a stream through
third-party software, you can extend the MovieWriter class to create your own
@@ -371,7 +371,7 @@ Some common post-processing steps are listed below.
.. _doc_creating_movies_converting_avi:
Converting AVI video to MP4
^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~
While some platforms such as YouTube support uploading the AVI file directly, many
others will require a conversion step beforehand. `HandBrake <https://handbrake.fr/>`__
@@ -398,7 +398,7 @@ cost of a worse size/quality ratio.
.. _doc_creating_movies_converting_image_sequence:
Converting PNG image sequence + WAV audio to a video
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you chose to record a PNG image sequence with a WAV file beside it,
you need to convert it to a video before you can use it elsewhere.
@@ -428,7 +428,7 @@ storing transparency, so you can use WebM/VP9 as an alternative:
.. _doc_creating_movies_motion_blur:
Cutting video
^^^^^^^^^^^^^
~~~~~~~~~~~~~
You can trim parts of the video you don't want to keep after the video is
recorded. For example, to discard everything before 12.1 seconds and keep
@@ -442,7 +442,7 @@ Cutting videos can also be done with the GUI tool
`LosslessCut <https://mifi.github.io/lossless-cut/>`__.
Resizing video
^^^^^^^^^^^^^^
~~~~~~~~~~~~~~
The following command resizes a video to be 1080 pixels tall (1080p),
while preserving its existing aspect ratio:
@@ -455,7 +455,7 @@ while preserving its existing aspect ratio:
.. _doc_creating_movies_reducing_framerate:
Reducing framerate
^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~
The following command changes a video's framerate to 30 FPS, dropping some of
the original frames if there are more in the input video:
@@ -465,7 +465,7 @@ the original frames if there are more in the input video:
ffmpeg -i input.avi -r 30 -crf 15 output.mp4
Generating accumulation motion blur with FFmpeg
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Godot does not have built-in support for motion blur, but it can still be
created in recorded videos.

View File

@@ -45,7 +45,7 @@ Setting up VideoStreamPlayer
desired.
Handling resizing and different aspect ratios
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
By default in Godot 4.0, the VideoStreamPlayer will automatically be resized to match
the video's resolution. You can make it follow usual :ref:`class_Control` sizing
@@ -85,7 +85,7 @@ to fit the whole screen while avoiding distortion.
aspect ratios in your project.
Displaying a video on a 3D surface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using a VideoStreamPlayer node as a child of a :ref:`class_SubViewport` node,
it's possible to display any 2D node on a 3D surface. For example, this can be
@@ -117,7 +117,7 @@ See :ref:`doc_viewports` and the
for more information on setting this up.
Looping a video
^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~
For looping a video, the **Loop** property can be enabled. This will seamlessly
restart the video when it reaches its end.
@@ -196,7 +196,7 @@ below with almost any input video format (AVI, MOV, WebM, …).
at the ``configuration:`` line in the command output.
Balancing quality and file size
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The **video quality** level (``-q:v``) must be between ``1`` and ``10``. Quality
``6`` is a good compromise between quality and file size. If encoding at a high
@@ -218,7 +218,7 @@ for a table listing Ogg Vorbis audio quality presets and their respective
variable bitrates.
FFmpeg: Convert while preserving original video resolution
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following command converts the video while keeping its original resolution.
The video and audio's bitrate will be variable to maximize quality while saving
@@ -230,7 +230,7 @@ static scenes).
ffmpeg -i input.mp4 -q:v 6 -q:a 6 output.ogv
FFmpeg: Resize the video then convert it
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following command resizes a video to be 720 pixels tall (720p), while
preserving its existing aspect ratio. This helps decrease the file size
@@ -253,14 +253,14 @@ Chroma key, commonly known as the "green screen" or "blue screen" effect, allows
We will achieve the chroma key effect by writing a custom shader in GDScript and using a `VideoStreamPlayer` node to display the video content.
Scene Setup
^^^^^^^^^^^
~~~~~~~~~~~
Ensure that the scene contains a `VideoStreamPlayer` node to play the video and a `Control` node to hold the UI elements for controlling the chroma key effect.
.. image:: img/chroma_key_scene.webp
Writing the Custom Shader
^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~
To implement the chroma key effect, follow these steps:
@@ -307,7 +307,7 @@ The code above represents a simple demonstration of the Chroma Key shader,
and users can customize it according to their specific requirements.
UI Controls
^^^^^^^^^^^
~~~~~~~~~~~
To allow users to manipulate the chroma key effect in real-time, we created sliders in the `Control` node. The `Control` node's script contains the following functions:
@@ -375,7 +375,7 @@ also make sure that the range of the sliders are appropriate, our settings are :
.. image:: img/slider_range.webp
Signal Handling
^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~
Connect the appropriate signal from the UI elements to the `Control` node's script.
you created in the `Control` node's script to control the chroma key effect.