Path: blob/master/modules/noise/doc_classes/FastNoiseLite.xml
10278 views
<?xml version="1.0" encoding="UTF-8" ?>1<class name="FastNoiseLite" inherits="Noise" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">2<brief_description>3Generates noise using the FastNoiseLite library.4</brief_description>5<description>6This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more.7Most generated noise values are in the range of [code][-1, 1][/code], but not always. Some of the cellular noise algorithms return results above [code]1[/code].8</description>9<tutorials>10</tutorials>11<members>12<member name="cellular_distance_function" type="int" setter="set_cellular_distance_function" getter="get_cellular_distance_function" enum="FastNoiseLite.CellularDistanceFunction" default="0">13Determines how the distance to the nearest/second-nearest point is computed.14</member>15<member name="cellular_jitter" type="float" setter="set_cellular_jitter" getter="get_cellular_jitter" default="1.0">16Maximum distance a point can move off of its grid position. Set to [code]0[/code] for an even grid.17</member>18<member name="cellular_return_type" type="int" setter="set_cellular_return_type" getter="get_cellular_return_type" enum="FastNoiseLite.CellularReturnType" default="1">19Return type from cellular noise calculations.20</member>21<member name="domain_warp_amplitude" type="float" setter="set_domain_warp_amplitude" getter="get_domain_warp_amplitude" default="30.0">22Sets the maximum warp distance from the origin.23</member>24<member name="domain_warp_enabled" type="bool" setter="set_domain_warp_enabled" getter="is_domain_warp_enabled" default="false">25If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise.26</member>27<member name="domain_warp_fractal_gain" type="float" setter="set_domain_warp_fractal_gain" getter="get_domain_warp_fractal_gain" default="0.5">28Determines the strength of each subsequent layer of the noise which is used to warp the space.29A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.30</member>31<member name="domain_warp_fractal_lacunarity" type="float" setter="set_domain_warp_fractal_lacunarity" getter="get_domain_warp_fractal_lacunarity" default="6.0">32The change in frequency between octaves, also known as "lacunarity", of the fractal noise which warps the space. Increasing this value results in higher octaves, producing noise with finer details and a rougher appearance.33</member>34<member name="domain_warp_fractal_octaves" type="int" setter="set_domain_warp_fractal_octaves" getter="get_domain_warp_fractal_octaves" default="5">35The number of noise layers that are sampled to get the final value for the fractal noise which warps the space.36</member>37<member name="domain_warp_fractal_type" type="int" setter="set_domain_warp_fractal_type" getter="get_domain_warp_fractal_type" enum="FastNoiseLite.DomainWarpFractalType" default="1">38The method for combining octaves into a fractal which is used to warp the space.39</member>40<member name="domain_warp_frequency" type="float" setter="set_domain_warp_frequency" getter="get_domain_warp_frequency" default="0.05">41Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise.42</member>43<member name="domain_warp_type" type="int" setter="set_domain_warp_type" getter="get_domain_warp_type" enum="FastNoiseLite.DomainWarpType" default="0">44The warp algorithm.45</member>46<member name="fractal_gain" type="float" setter="set_fractal_gain" getter="get_fractal_gain" default="0.5">47Determines the strength of each subsequent layer of noise in fractal noise.48A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers.49</member>50<member name="fractal_lacunarity" type="float" setter="set_fractal_lacunarity" getter="get_fractal_lacunarity" default="2.0">51Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance.52</member>53<member name="fractal_octaves" type="int" setter="set_fractal_octaves" getter="get_fractal_octaves" default="5">54The number of noise layers that are sampled to get the final value for fractal noise types.55</member>56<member name="fractal_ping_pong_strength" type="float" setter="set_fractal_ping_pong_strength" getter="get_fractal_ping_pong_strength" default="2.0">57Sets the strength of the fractal ping pong type.58</member>59<member name="fractal_type" type="int" setter="set_fractal_type" getter="get_fractal_type" enum="FastNoiseLite.FractalType" default="1">60The method for combining octaves into a fractal.61</member>62<member name="fractal_weighted_strength" type="float" setter="set_fractal_weighted_strength" getter="get_fractal_weighted_strength" default="0.0">63Higher weighting means higher octaves have less impact if lower octaves have a large impact.64</member>65<member name="frequency" type="float" setter="set_frequency" getter="get_frequency" default="0.01">66The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise.67</member>68<member name="noise_type" type="int" setter="set_noise_type" getter="get_noise_type" enum="FastNoiseLite.NoiseType" default="1">69The noise algorithm used.70</member>71<member name="offset" type="Vector3" setter="set_offset" getter="get_offset" default="Vector3(0, 0, 0)">72Translate the noise input coordinates by the given [Vector3].73</member>74<member name="seed" type="int" setter="set_seed" getter="get_seed" default="0">75The random number seed for all noise types.76</member>77</members>78<constants>79<constant name="TYPE_VALUE" value="5" enum="NoiseType">80A lattice of points are assigned random values then interpolated based on neighboring values.81</constant>82<constant name="TYPE_VALUE_CUBIC" value="4" enum="NoiseType">83Similar to value noise ([constant TYPE_VALUE]), but slower. Has more variance in peaks and valleys.84Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap.85</constant>86<constant name="TYPE_PERLIN" value="3" enum="NoiseType">87A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices.88</constant>89<constant name="TYPE_CELLULAR" value="2" enum="NoiseType">90Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value.91</constant>92<constant name="TYPE_SIMPLEX" value="0" enum="NoiseType">93As opposed to [constant TYPE_PERLIN], gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. Internally uses FastNoiseLite's OpenSimplex2 noise type.94</constant>95<constant name="TYPE_SIMPLEX_SMOOTH" value="1" enum="NoiseType">96Modified, higher quality version of [constant TYPE_SIMPLEX], but slower. Internally uses FastNoiseLite's OpenSimplex2S noise type.97</constant>98<constant name="FRACTAL_NONE" value="0" enum="FractalType">99No fractal noise.100</constant>101<constant name="FRACTAL_FBM" value="1" enum="FractalType">102Method using Fractional Brownian Motion to combine octaves into a fractal.103</constant>104<constant name="FRACTAL_RIDGED" value="2" enum="FractalType">105Method of combining octaves into a fractal resulting in a "ridged" look.106</constant>107<constant name="FRACTAL_PING_PONG" value="3" enum="FractalType">108Method of combining octaves into a fractal with a ping pong effect.109</constant>110<constant name="DISTANCE_EUCLIDEAN" value="0" enum="CellularDistanceFunction">111Euclidean distance to the nearest point.112</constant>113<constant name="DISTANCE_EUCLIDEAN_SQUARED" value="1" enum="CellularDistanceFunction">114Squared Euclidean distance to the nearest point.115</constant>116<constant name="DISTANCE_MANHATTAN" value="2" enum="CellularDistanceFunction">117Manhattan distance (taxicab metric) to the nearest point.118</constant>119<constant name="DISTANCE_HYBRID" value="3" enum="CellularDistanceFunction">120Blend of [constant DISTANCE_EUCLIDEAN] and [constant DISTANCE_MANHATTAN] to give curved cell boundaries.121</constant>122<constant name="RETURN_CELL_VALUE" value="0" enum="CellularReturnType">123The cellular distance function will return the same value for all points within a cell.124</constant>125<constant name="RETURN_DISTANCE" value="1" enum="CellularReturnType">126The cellular distance function will return a value determined by the distance to the nearest point.127</constant>128<constant name="RETURN_DISTANCE2" value="2" enum="CellularReturnType">129The cellular distance function returns the distance to the second-nearest point.130</constant>131<constant name="RETURN_DISTANCE2_ADD" value="3" enum="CellularReturnType">132The distance to the nearest point is added to the distance to the second-nearest point.133</constant>134<constant name="RETURN_DISTANCE2_SUB" value="4" enum="CellularReturnType">135The distance to the nearest point is subtracted from the distance to the second-nearest point.136</constant>137<constant name="RETURN_DISTANCE2_MUL" value="5" enum="CellularReturnType">138The distance to the nearest point is multiplied with the distance to the second-nearest point.139</constant>140<constant name="RETURN_DISTANCE2_DIV" value="6" enum="CellularReturnType">141The distance to the nearest point is divided by the distance to the second-nearest point.142</constant>143<constant name="DOMAIN_WARP_SIMPLEX" value="0" enum="DomainWarpType">144The domain is warped using the simplex noise algorithm.145</constant>146<constant name="DOMAIN_WARP_SIMPLEX_REDUCED" value="1" enum="DomainWarpType">147The domain is warped using a simplified version of the simplex noise algorithm.148</constant>149<constant name="DOMAIN_WARP_BASIC_GRID" value="2" enum="DomainWarpType">150The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant).151</constant>152<constant name="DOMAIN_WARP_FRACTAL_NONE" value="0" enum="DomainWarpFractalType">153No fractal noise for warping the space.154</constant>155<constant name="DOMAIN_WARP_FRACTAL_PROGRESSIVE" value="1" enum="DomainWarpFractalType">156Warping the space progressively, octave for octave, resulting in a more "liquified" distortion.157</constant>158<constant name="DOMAIN_WARP_FRACTAL_INDEPENDENT" value="2" enum="DomainWarpFractalType">159Warping the space independently for each octave, resulting in a more chaotic distortion.160</constant>161</constants>162</class>163164165