libpov_2025/manual.html
2023-10-23 20:04:20 +02:00

85 lines
7.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="icon" href="./favicon.png">
<title>Manual for the Minetest Biome Point Visualizer</title>
<link rel="stylesheet" href="./dark_style.css">
</head>
<body>
<h1>MiBPoV Manual</h1>
<div id="mainContentContainer" class="contentContainer">
<p><a href="./index.html">Back to the main program</a></p>
<h2>What is this?</h2>
<p>MiBPov is the <u>Mi</u>netest <u>B</u>iome <u>Po</u>int <u>V</u>isualizer, a tool for people who develop games and mods for <a href="https://minetest.net">Minetest</a>. It allows them to visualize the heat and humidity points of biomes. It works in your web browser using JavaScript.</p>
<h2>Features</h2>
<ul>
<li>Add the heat and humidity points of biomes</li>
<li>Visualize the biomes on a Voronoi diagram</li>
<li>Show biomes for a given Y altitude only</li>
<li>Modify the noise parameters of the heat and humidity Perlin noises used by the mapgen</li>
</ul>
<h2>Quick reminder how biomes work</h2>
<p>When Minetest generates the world, each (X, Z) coordinate is assigned a heat and humidity value (“heat” is also sometimes called “temperature”). Also, Minetest calculates the <a title="Wikipedia: Voronoi diagram" href="https://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi</a> cell for each biome. If a world positions heat and humidity fall into a given biomes Voronoi cell, that biome will be put at that position. And this happens for every position. The problem is that as you, as the developer, dont see these Voronoi cells, you only see the heat and humidity points. This is where this program will help you.</p>
<p>Please refer to the official Minetest Lua API documentation for a more in-depth explanation.</p>
<h2>Interpreting the diagram</h2>
<p>On top of the page, you see the Voronoi diagram. The horizontal axis represents heat and the vertical axis represents humidity. The visible diagram area represents all mathematically possible values. Note that the further you go from the center, the less likely they will become, with the area close to the border being extremely unlikely (&lt;0.1%). By default, the value range of heat and humidity is from -37.5 to 137.5, with 50 as the midpoint. But most values will be somewhere between 0 and 100 by default.</p>
<p>Red dots represent the biome points, and they are labelled by default by their (heat, humidity) coordinates. Dark green border lines represent the boundaries of Voronoi cells and the large colored areas represent the biomes themselves.</p>
<p>The cell color is assigned automatically and can not be changed. By default, a grid is displayed. A grid line is shown for every 10 units.</p>
<p>Below the diagram, a couple of status information is shown: The current altitude (Y coordinate), the heat and humidity range of the current diagram and your cursor position (if it is on the diagram).</p>
<h3>An example</h3>
<p>Lets say there are 2 biomes at the (heat, humidity) coordinates (10, 10) and (90, 90). This will divide the diagram in 2 sections. Each of these sections is a Voronoi cell, or the set of all (heat, humidity) value pairs of that biome. Lets look what happens at position heat=0, humidity=0. If you read the diagram, you will see it belongs to the first biome. This means that whenever a world position has a heat of 0 and humidity of 0, that biome will be used. Now at heat=70, humidity=50, we can read it belongs to the second biome. And this is how you can understand this diagram.</p>
<h2>Usage</h2>
<p>This section explains how you can interact with the various parts of the program.</p>
<h3>Diagram</h3>
<p>Hover with the mouse cursor over the diagram to see the heat and humidity coordinates at this position. You can click on a dot to select it, click on it again and hold down the mouse button to drag it.</p>
<h3>Biome configuration</h3>
<p>Here you can see a list of all currently active biomes. Each biome has a name of your choice. The program always starts with a default biome at (50, 50). Select a biome in the list so you can edit it.</p>
<p>The “Add” button adds a new biome with a random heat and humidity. “Remove” removes the currently selected biome.</p>
<p>Once you selected a biome in the list, the fields in “Selected biome” will activate. Here, you can edit the selected biomes heat and humidity point (corresponds to <code>heat_point</code> and <code>humidity_point</code> in the Lua API). You can also edit the minimum and maximum Y level this biome will be generated in (corresponds to <code>y_min</code> and <code>y_max</code>).</p>
<p>Changing a value in these fields will immediately take effect.</p>
<h3>Diagram view settings</h3>
<p>These settings only affect the visual representation and not the data. The checkboxes can be used to hide several things in the diagram, like the grid. The altitude setting changes at which altitude (Y coordinate) the diagram “looks” at. The diagram will only show biomes that would generate in this altitude, applying the biomes Min. Y and Max. Y settings.</p>
<p>Note: If you hide the points, you can no longer select them in the diagram. You can still select them in the biome list, however.</p>
<h3>Noise parameters</h3>
<p>This is fairly advanced and most games dont use this. You can use this if you want to see what happens if you use non-default heat and/or humidity Perlin noise parameters. This corresponds to the Minetest settings <code>mg_biome_np_heat</code> and <code>mg_biome_np_humidity</code>. The explanation of Perlin noises is out of scope for this document. See the Minetest Lua API documentation.</p>
<p>Changing the noise parameters has an effect on the possible value range for heat and humidity which is why this has been included. This also means the recommendation that you try to keep biomes between a heat/humidity roughly between 0 and 100 goes out of the window; you have to figure out a good range yourselves.</p>
<p>If your game or mod does not modify these noise parameters, you can ignore this section and leave it at default. Click on “Reset noise parameters” to reset them to the default if you accidentally changed them.</p>
<h2>Caveats / Limitations</h2>
<p>It is perfectly legal to have the biome points to be out of bounds. These out-of-bounds points are represented as arrows in the diagram. However, you cant select them with your mouse on the diagram unless its close to the edge. Use the biome list to edit points that are out of bounds.</p>
<p>This program does not make sense when you use the v6 mapgen because it uses a completely different biome system.</p>
<p>The program assumes that <code>absvalue</code> flag of the heat/humidity noises is always false. So if your game/mod has set it to true, this program wont help you.</p>
<p>If you set the scale of either noise to 0, the diagram will fail because the diagram area becomes zero. A scale of 0 is not actually an error and Minetest will still work perfectly fine, but it rarely makes sense. Setting the scale of a Perlin noise to 0 causes the noise to return the same value everywhere because each noise value is multiplied by 0 before it is returned. This is probably not what you want.</p>
<h2>Credits / License</h2>
<p>This tool is free software. See the <a href="./license.html">License</a> page for details.</p>
</div>
</body>
</html>