ZN_SpotNoise¶
Inherits: Resource
Specialization of cellular noise intented for cheap "ore patch" generation or deterministic point scattering.
Description:¶
Divides space into a grid where each cell contains a circular "spot". Noise evaluation returns 1 when the position is inside a spot, 0 otherwise.
Limitation: high jitter can make spots clip with cell borders. This is expected. If you need higher quality (but slower) results, you may use another noise library such as FastNoiseLite.
Properties:¶
Type | Name | Default |
---|---|---|
float | cell_size | 32.0 |
float | jitter | 0.9 |
int | seed | 1337 |
float | spot_radius | 3.0 |
Methods:¶
Return | Signature |
---|---|
float | get_noise_2d ( float x, float y ) const |
float | get_noise_2dv ( Vector2 pos ) const |
float | get_noise_3d ( float x, float y, float z ) const |
float | get_noise_3dv ( Vector3 pos ) const |
PackedVector2Array | get_spot_positions_in_area_2d ( Rect2 rect ) const |
PackedVector3Array | get_spot_positions_in_area_3d ( AABB aabb ) const |
Property Descriptions¶
float cell_size = 32.0¶
(This property has no documentation)
float jitter = 0.9¶
(This property has no documentation)
int seed = 1337¶
(This property has no documentation)
float spot_radius = 3.0¶
(This property has no documentation)
Method Descriptions¶
float get_noise_2d( float x, float y )¶
(This method has no documentation)
float get_noise_2dv( Vector2 pos )¶
(This method has no documentation)
float get_noise_3d( float x, float y, float z )¶
(This method has no documentation)
float get_noise_3dv( Vector3 pos )¶
(This method has no documentation)
PackedVector2Array get_spot_positions_in_area_2d( Rect2 rect )¶
(This method has no documentation)
PackedVector3Array get_spot_positions_in_area_3d( AABB aabb )¶
(This method has no documentation)
Generated on Apr 06, 2024