description | A Minetest mod to experiment around with Perlin noises |
owner | Wuzzy@disroot.org |
last change | Thu, 12 May 2022 11:09:42 +0000 (12 13:09 +0200) |
URL | git://repo.or.cz/minetest_perlin_explorer.git |
https://repo.or.cz/minetest_perlin_explorer.git | |
push URL | ssh://repo.or.cz/minetest_perlin_explorer.git |
https://repo.or.cz/minetest_perlin_explorer.git (learn more) | |
bundle info | minetest_perlin_explorer.git downloadable bundles |
content tags |
perlin_explorer
]Version: 1.0.3
Perlin Explorer is a mod for Minetest to allow to test and experiment around with Perlin noises.
This is especially useful for game and mod developers who want to fine-tune the noises in an efficient manner. It’s also useful to discover useful noise parameters for the various mapgen settings in Minetest.
This mod uses Minetest’s builtin Perlin noise, so the same rules apply here. Refer to Minetest’s documentation to learn about noise parameters.
This mod can aggressively grief your world due to its mapgen feature! Don’t use it in worlds with buildings you care about.
NEVER use this mod on a public server, it has not been security-tested.
This document assumes you already have a rough understanding of what Perlin noises are used for.
To use this mod, create a brand new world to avoid accidents.
Everything in this mod requires the server
privilege, so obtain
this privilege as well.
The main feature and tool in this mod is the Perlin Noise Creator. Using this item opens a window in which you can view, modify, analyze and manage noise parameters, generate nodes and perform some basic analysis.
These are used by Minetest for the Perlin noises. Perlin noises are used for various things such as generating the world, decorations (trees, plants, etc.), ores, biomes and much more.
And noise parameters are, well, the parameters that are used to tweak the Perlin noises. They change the output numbers, they stretch or squeeze the noise, they make more or less detailed, and more.
The Perlin Explorer mod’s main use case is to allow you to try out various parameters and to modify them in a quick manner so you can quickly get results. This is much more efficient than tweaking the noise in the Minetest settings or Lua code.
This document is not an introduction to Perlin noises and noise parameters themselves! Please refer to the Minetest Lua API documentation to learn more.
This mod heavily relies on something called the “active noise” (or “active noise parameters”). These are the noise parameters and options that the mod will use for various operations, like getting values, generating nodes, using mapgen mode, etc. The “Apply” button in the Perlin Noise Creator tool sets the active noise. There can only be one active noise parameters. Also, the active noise is always valid; if you enter invalid noise parameters, the mod refuses them for the active noise.
Initially, there are no active noise parameters, so you have to push the “Apply” button mentioned before first.
This section explains the various tools you have at your disposal. These tools are items, so check out your Creative Inventory (or something similar) to get them.
This is the main tool of this mod. Hold this item in hand and punch to open a window.
The window has multiple sections:
This section has 2 parts: The top part is a list of profiles. An explanation for that is below.
The bottom part contains the actual noise parameters:
Please refer to Minetest Lua API documentation for a definition. This mod enforces a few sanity checks on some for the values, i.e. octaves can’t be lower than 1.
Hint: If you hit “Enter” while the focus is on any of the noise parameters, this is the same as if you clicked “Accept” or “Accept and create” (see below). Use this to your advantage to quickly tweak a particular value.
The little dice button randomizes the seed, it’s a simple convenience.
The “Analyze” button shows you some basic info about the noise parameters as displayed in the form. First, the theoretical minimum and maximum possible value of the entire noise. Then, the “wavelengths” for each axis. This means across how many nodes (roughly) the noise is stretched out, specified for each octave, beginning with the first. If any wavelength reaches a number lower than 1, it will be shown in red because this means your noise parameters are invalid. If this happens, either increase the spread or decrease the octaves or lacunarity.
Note: The Analyze feature uses the noise parameters as they are displayed in the form, not the active noise parameters. This is because the active noise must always be valid.
A profile is just noise parameters that you can load for later use. It’s a convenience feature. The drop-down list to the left is the list of all profiles. This list contains three types of profiles:
mg_
Can not be deleted.User profiles will also automatically saved on disk so they get restored when restarting the world.
The buttons do the following:
This section roughly says how the noise parameters are “interpreted”. These fields are available:
sidelen
parameter of
mapgen decorations (relevant for game development)Playing around with parameters isn’t very useful if you don’t get a visual result. That’s where the node generation comes into play. Here you specify parameters for generating nodes from the noise. All noise values are either high or low; they are divided by the midpoint: Values equal to or higher than the midpoint are high, otherwise low.
In 2D mode, the mapgen will be a flat XZ plane with nodes.
In 3D mode, the mapgen will place nodes at every position in the 3D world.
The drop-down list to the bottom right stands for the “build modes”. This sets for which noise values nodes will be generated:
Generated nodes will be color-coded, which stands for the value:
There are two parameters:
The low color gradient begins at the “Low color at” setting and ends right before the the midpoint. The high color gradient begins at the midpoint and ends at the ”High color at” setting.
For example, if 0 is the midpoint, and the “low/high color” settings are -1 and 1, respectively, all values below 0 (the midpoint) will use the ‘low values’ color gradient and all values above 0 will use the ‘high values’ color gradient. All values at -1 and below will have the “extreme low” color (dark blue) and all values at 1 or above will have the “extreme high” (orange) color. Note that the colors only serve as a visual aid and given the limited palette, is only an estimation of the noise values. You can always use the Perlin Value Getter for the exact values. If you have problems seeing color differences, activate the grayscale color palette in the mod settings.
Right to the color settings, there is a list of node types. This is for different node styles for different noise visualizations:
Solid Nodes are recommend to use normally.
Grid or Minibox nodes can be useful in 3D mode if you want to expose the inner structure of complex 3D noises. This can be quite trippy and reduce your FPS sharply, so consider reducing the render distance.
The following settings are only used when you want to place nodes in a certain area:
The footer is the final part of the form. It has these buttons:
This item tells you the (nearly) exact value of the current active noise parameters at a given position. You can use it on nodes and in mid-air.
Use the “Place” key on a node to get the value of the node position. Use the “Punch” key anywhere to get the value of your position (rounded). If you hold down “Sneak” while punching, your exact position (not rounded) will be used instead.
Note: This tool always calculates the values of the active noise It completely ignores whatever nodes were generated and what those nodes represents, so tool also works if you haven’t generated any nodes. It actually only looks at the coordinates of the node or yourself. If you’re unsure about what the current active noise is, just hit “Accept” again in the Perlin Noise Creator.
This is just a convenience item. Using it is the same as opening the Perlin Noise Creator, changing the seed and accepting.
In mapgen mode, punching or placing will set a new seed only, but the mapgen will then instantly update the map.
If mapgen mode is disabled, the meaning of this tool is this:
This can be useful to look at many different variations of the noise.
Sorry! :-(
This can happen if the mod tries to calculate enormous numbers of values or generates a huge number of nodes.
Which is the case if you selected a huge number when starting to generate nodes.
Be careful with large numbers in 3D mode as it is exponentially more expensive to calculate than 2D.
The only thing you can do is to just not generate huge areas at once. The mod doesn’t have any warnings in place for now, so you’re on your own for now. Sorry! :-(
The most likely reason is that scale
is exactly 0.
Because if scale
is 0, the noise will return the same value
everywhere. Remember the result of all noise computations is multiplied
with scale
at the end, so a multiplication with 0 will
literally nullify all that.
This is correct behavior but obviously useless.
Just pick a non-zero scale to fix this.
This mod was written by Wuzzy.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 months ago | 1.0.3 | commitlog | ||
23 months ago | 1.0.2 | commitlog | ||
23 months ago | 1.0.1 | commitlog | ||
2 years ago | 1.0.0 | commitlog |
23 months ago | master | logtree |