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