Skip to content

Commit

Permalink
Build: (2d98786) Document expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
astrsh committed Dec 31, 2023
1 parent 0daee10 commit 29dc85e
Show file tree
Hide file tree
Showing 146 changed files with 3,891 additions and 1,760 deletions.
Binary file added _images/noise_tool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 26 additions & 21 deletions _sources/config/development/noise/configuring.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,35 @@ Here is what the above example looks like with the ``salt`` key added:
All optional parameters have pre-defined default values that are set when they are not specified.
When the ``salt`` key is not included in a sampler config, it will default to its predefined value ``0``.

.. Commented out because noise tool is not yet up to date
.. Noise Tool
.. ----------
Noise Tool
----------

.. Now that we know how to write a simple sampler config, we can use a handy program aptly named the **Noise Tool** to
.. preview what our config looks like.
Now that we know how to write a simple sampler config, we can use a handy program aptly named the **Noise Tool** to
preview what our config looks like.

.. .. image:: /img/concepts/noise/noise_tool.png
.. :width: 100%
.. :align: center
.. image:: /img/concepts/noise/noise_tool.png
:width: 100%
:align: center

.. The Noise Tool was specially designed for creating, previewing, and modifying samplers, and is also what was used
.. to generate every image of noise used on this page. You can find the Noise Tool on GitHub -
.. `Source <https://github.com/PolyhedralDev/NoiseTool>`_ / `Download <https://github.com/PolyhedralDev/NoiseTool/releases>`_
The Noise Tool was specially designed for creating, previewing, and modifying samplers, and is also what was used
to generate every image of noise used on this page. You can find the Noise Tool on GitHub -
`Source <https://github.com/PolyhedralDev/NoiseTool>`_ / `Download <https://github.com/PolyhedralDev/NoiseTool/releases>`_

.. .. tip::
.. warning::

The NoiseTool does not include any addons by default. When running the Noise Tool, the folder you run it from
will require an ``addons`` folder. (This will be created when starting the tool if you do not create it yourself.)
You should copy the ``bootstrap`` folder and the ``config-noise-function`` addon from your Terra installation to the Noise Tool's
``addon`` folder, those of which can be found in ``Terra/addons``.

.. We suggest that you follow along the rest of this section with the Noise Tool, so you can try out parameters get the
.. hang of writing your own sampler configs. Playing around and experimenting on your own is a great way of learning what
.. each parameter does, and will give you an intuition on how you can fine tune them to your advantage.
.. tip::

We suggest that you follow along the rest of this section with the Noise Tool, so you can try out parameters get the
hang of writing your own sampler configs. Playing around and experimenting on your own is a great way of learning what
each parameter does, and will give you an intuition on how you can fine tune them to your advantage.

.. For a complete list of sampler types and their parameters available in Terra, please refer to the
.. :doc:`/config/documentation/objects/NoiseSampler` page.
For a complete list of sampler types and their parameters available in Terra, please refer to the
:doc:`/config/documentation/objects/NoiseSampler` page.

.. _sampler-frequency:

Expand Down Expand Up @@ -254,8 +259,8 @@ parameters already defined:
lacunarity: 2
gain: 0.75
.. Feel free to preview this config in the `Noise Tool <#noise-tool>`_, and have an experiment with each parameter to see
.. what they all do.
Feel free to preview this config in the `Noise Tool <#noise-tool>`_, and have an experiment with each parameter to see
what they all do.

To see all available fractalizers and their parameters, please refer to the
:doc:`/config/documentation/objects/NoiseSampler` page.
Expand Down Expand Up @@ -325,8 +330,8 @@ sampler:
type: OPEN_SIMPLEX_2
amplitude: 20
.. Again it's recommended that you try out this sampler config in the `Noise Tool <#noise-tool>`_ and see what changing each
.. parameter does - What happens if you use ``WHITE_NOISE`` as a warp sampler instead?
Again it's recommended that you try out this sampler config in the `Noise Tool <#noise-tool>`_ and see what changing each
parameter does - What happens if you use ``WHITE_NOISE`` as a warp sampler instead?

.. dropdown:: Under The Hood - The Math Behind Domain Warping

Expand Down
1 change: 1 addition & 0 deletions _sources/config/documentation/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Contents

configs/index
objects/index
terrascript/index

.. _config-documentation-format:

Expand Down
8 changes: 4 additions & 4 deletions _sources/config/documentation/objects/Biome.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Uses

Used by 3 parameters:

- :ref:`In EXACT in BiomeColorConverter <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-else>`:
- :ref:`In SINGLE in BiomeProvider <object-biomeprovider-template-biome-provider-single-single-parameter-biome>`:

:bdg-ref-primary:`else <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-else>` :doc:`/config/documentation/objects/Biome`
:bdg-ref-primary:`biome <object-biomeprovider-template-biome-provider-single-single-parameter-biome>` :doc:`/config/documentation/objects/Biome`

- :ref:`In MAP in BiomeColorMapping <object-biomecolormapping-template-biome-provider-image-v2-map-parameter-map>`:

:bdg-ref-primary:`map <object-biomecolormapping-template-biome-provider-image-v2-map-parameter-map>` :doc:`/config/documentation/objects/Map`\<:doc:`/config/documentation/objects/ColorString`\, :doc:`/config/documentation/objects/Biome`\>

- :ref:`In SINGLE in BiomeProvider <object-biomeprovider-template-biome-provider-single-single-parameter-biome>`:
- :ref:`In EXACT in BiomeColorConverter <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-else>`:

:bdg-ref-primary:`biome <object-biomeprovider-template-biome-provider-single-single-parameter-biome>` :doc:`/config/documentation/objects/Biome`
:bdg-ref-primary:`else <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-else>` :doc:`/config/documentation/objects/Biome`
4 changes: 4 additions & 0 deletions _sources/config/documentation/objects/BiomeProvider.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ BiomeProvider
A biome provider provides a :doc:`/config/documentation/objects/Biome` for any given position in the world. Biome providers
are the main way to determine and configure *where* biomes will generate.

You can use the aptly named `Biome Tool <https://github.com/PolyhedralDev/BiomeTool>` to preview biome distribution defined by your
pack's BiomeProvider. It is recommended to run the Biome Tool from your ``Terra`` directory so that all the addons
and packs you are developing with are loaded by the Biome Tool.


Types
=====
Expand Down
32 changes: 16 additions & 16 deletions _sources/config/documentation/objects/Block.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@ Uses

Used by 8 parameters:

- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-material-overrides>`:

:bdg-ref-success:`material-overrides <config-scattered_ore-template-config-ore-base-parameter-material-overrides>` :doc:`/config/documentation/objects/Map`\<:doc:`/config/documentation/objects/Block`\, :doc:`/config/documentation/objects/Block`\>

- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-replace>`:
- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-material-overrides>`:

:bdg-ref-primary:`replace <config-ore-template-config-ore-base-parameter-replace>` :doc:`/config/documentation/objects/Set`\<:doc:`/config/documentation/objects/Block`\>
:bdg-ref-success:`material-overrides <config-ore-template-config-ore-base-parameter-material-overrides>` :doc:`/config/documentation/objects/Map`\<:doc:`/config/documentation/objects/Block`\, :doc:`/config/documentation/objects/Block`\>

- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-material>`:
- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-material>`:

:bdg-ref-primary:`material <config-ore-template-config-ore-base-parameter-material>` :doc:`/config/documentation/objects/Block`
:bdg-ref-primary:`material <config-scattered_ore-template-config-ore-base-parameter-material>` :doc:`/config/documentation/objects/Block`

- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-material-overrides>`:
- :ref:`In MATCH in Pattern <object-pattern-template-config-locators-match-parameter-block>`:

:bdg-ref-success:`material-overrides <config-ore-template-config-ore-base-parameter-material-overrides>` :doc:`/config/documentation/objects/Map`\<:doc:`/config/documentation/objects/Block`\, :doc:`/config/documentation/objects/Block`\>
:bdg-ref-primary:`block <object-pattern-template-config-locators-match-parameter-block>` :doc:`/config/documentation/objects/Block`

- :ref:`In MATCH_SET in Pattern <object-pattern-template-config-locators-match_set-parameter-blocks>`:
- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-material-overrides>`:

:bdg-ref-primary:`blocks <object-pattern-template-config-locators-match_set-parameter-blocks>` :doc:`/config/documentation/objects/Set`\<:doc:`/config/documentation/objects/Block`\>
:bdg-ref-success:`material-overrides <config-scattered_ore-template-config-ore-base-parameter-material-overrides>` :doc:`/config/documentation/objects/Map`\<:doc:`/config/documentation/objects/Block`\, :doc:`/config/documentation/objects/Block`\>

- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-replace>`:

:bdg-ref-primary:`replace <config-scattered_ore-template-config-ore-base-parameter-replace>` :doc:`/config/documentation/objects/Set`\<:doc:`/config/documentation/objects/Block`\>

- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-material>`:
- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-replace>`:

:bdg-ref-primary:`material <config-scattered_ore-template-config-ore-base-parameter-material>` :doc:`/config/documentation/objects/Block`
:bdg-ref-primary:`replace <config-ore-template-config-ore-base-parameter-replace>` :doc:`/config/documentation/objects/Set`\<:doc:`/config/documentation/objects/Block`\>

- :ref:`In MATCH in Pattern <object-pattern-template-config-locators-match-parameter-block>`:
- :ref:`In MATCH_SET in Pattern <object-pattern-template-config-locators-match_set-parameter-blocks>`:

:bdg-ref-primary:`blocks <object-pattern-template-config-locators-match_set-parameter-blocks>` :doc:`/config/documentation/objects/Set`\<:doc:`/config/documentation/objects/Block`\>

- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-material>`:

:bdg-ref-primary:`block <object-pattern-template-config-locators-match-parameter-block>` :doc:`/config/documentation/objects/Block`
:bdg-ref-primary:`material <config-ore-template-config-ore-base-parameter-material>` :doc:`/config/documentation/objects/Block`
46 changes: 25 additions & 21 deletions _sources/config/documentation/objects/Boolean.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,56 @@ See :doc:`/config/development/config-data`
Uses
====

Used by 12 parameters:
Used by 13 parameters:

- :ref:`In DISTANCE_TRANSFORM in NoiseSampler <object-noisesampler-template-library-image-distance_transform-parameter-invert-threshold>`:
- :ref:`In GABOR in NoiseSampler <object-noisesampler-template-config-noise-function-gabor-parameter-isotropic>`:

:bdg-ref-success:`invert-threshold <object-noisesampler-template-library-image-distance_transform-parameter-invert-threshold>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`isotropic <object-noisesampler-template-config-noise-function-gabor-parameter-isotropic>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In base in BIOME <config-biome-template-chunk-generator-noise-3d-base-parameter-carving.update-palette>`:
- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-physics>`:

:bdg-ref-success:`carving.update-palette <config-biome-template-chunk-generator-noise-3d-base-parameter-carving.update-palette>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`physics <config-scattered_ore-template-config-ore-base-parameter-physics>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-physics>`:
- :ref:`In STITCHED_BITMAP in Image <object-image-template-library-image-stitched_bitmap-parameter-zero-indexed>`:

:bdg-ref-success:`physics <config-ore-template-config-ore-base-parameter-physics>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`zero-indexed <object-image-template-library-image-stitched_bitmap-parameter-zero-indexed>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In DISTANCE in NoiseSampler <object-noisesampler-template-config-noise-function-distance-parameter-normalize>`:

:bdg-ref-success:`normalize <object-noisesampler-template-config-noise-function-distance-parameter-normalize>` :doc:`/config/documentation/objects/Boolean` - If set to true, the returned distance will be normalized to be within the range ``[-1, 1]``, otherwise the raw distance is returned.

- :ref:`In CHANNEL in NoiseSampler <object-noisesampler-template-library-image-channel-parameter-premultiply>`:

:bdg-ref-success:`premultiply <object-noisesampler-template-library-image-channel-parameter-premultiply>` :doc:`/config/documentation/objects/Boolean` - Whether to multiply color channels by the alpha channel or not.

- :ref:`In BITMAP in Image <object-image-template-library-image-bitmap-parameter-zero-indexed>`:
- :ref:`In base in ORE <config-ore-template-config-ore-base-parameter-physics>`:

:bdg-ref-success:`zero-indexed <object-image-template-library-image-bitmap-parameter-zero-indexed>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`physics <config-ore-template-config-ore-base-parameter-physics>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In STITCHED_BITMAP in Image <object-image-template-library-image-stitched_bitmap-parameter-zero-indexed>`:
- :ref:`In DISTANCE_TRANSFORM in NoiseSampler <object-noisesampler-template-library-image-distance_transform-parameter-clamp-to-max-edge>`:

:bdg-ref-success:`zero-indexed <object-image-template-library-image-stitched_bitmap-parameter-zero-indexed>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`clamp-to-max-edge <object-noisesampler-template-library-image-distance_transform-parameter-clamp-to-max-edge>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In GABOR in NoiseSampler <object-noisesampler-template-config-noise-function-gabor-parameter-isotropic>`:
- :ref:`In DISTANCE_TRANSFORM in NoiseSampler <object-noisesampler-template-library-image-distance_transform-parameter-invert-threshold>`:

:bdg-ref-success:`isotropic <object-noisesampler-template-config-noise-function-gabor-parameter-isotropic>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`invert-threshold <object-noisesampler-template-library-image-distance_transform-parameter-invert-threshold>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In ADJACENT_PATTERN in Locator <object-locator-template-config-locators-adjacent_pattern-parameter-match-all>`:
- :ref:`In CHANNEL in NoiseSampler <object-noisesampler-template-library-image-channel-parameter-normalize>`:

:bdg-ref-success:`match-all <object-locator-template-config-locators-adjacent_pattern-parameter-match-all>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`normalize <object-noisesampler-template-library-image-channel-parameter-normalize>` :doc:`/config/documentation/objects/Boolean` - If the channel should be normalized to range [-1, 1] or not.

- :ref:`In base in SCATTERED_ORE <config-scattered_ore-template-config-ore-base-parameter-physics>`:
- :ref:`In BITMAP in Image <object-image-template-library-image-bitmap-parameter-zero-indexed>`:

:bdg-ref-success:`physics <config-scattered_ore-template-config-ore-base-parameter-physics>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`zero-indexed <object-image-template-library-image-bitmap-parameter-zero-indexed>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In CHANNEL in NoiseSampler <object-noisesampler-template-library-image-channel-parameter-normalize>`:
- :ref:`In ADJACENT_PATTERN in Locator <object-locator-template-config-locators-adjacent_pattern-parameter-match-all>`:

:bdg-ref-success:`normalize <object-noisesampler-template-library-image-channel-parameter-normalize>` :doc:`/config/documentation/objects/Boolean` - If the channel should be normalized to range [-1, 1] or not.
:bdg-ref-success:`match-all <object-locator-template-config-locators-adjacent_pattern-parameter-match-all>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In EXACT in BiomeColorConverter <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-ignore-alpha>`:

:bdg-ref-success:`ignore-alpha <object-biomecolorconverter-template-biome-provider-image-v2-exact-parameter-ignore-alpha>` :doc:`/config/documentation/objects/Boolean`

- :ref:`In DISTANCE_TRANSFORM in NoiseSampler <object-noisesampler-template-library-image-distance_transform-parameter-clamp-to-max-edge>`:
- :ref:`In base in BIOME <config-biome-template-chunk-generator-noise-3d-base-parameter-carving.update-palette>`:

:bdg-ref-success:`clamp-to-max-edge <object-noisesampler-template-library-image-distance_transform-parameter-clamp-to-max-edge>` :doc:`/config/documentation/objects/Boolean`
:bdg-ref-success:`carving.update-palette <config-biome-template-chunk-generator-noise-3d-base-parameter-carving.update-palette>` :doc:`/config/documentation/objects/Boolean`
Loading

0 comments on commit 29dc85e

Please sign in to comment.