Expand description
§Noiz
A simple, configurable, blazingly fast noise library built for and with Bevy. See the book for a taste.
Noiz is:
- Simple
- Extendable
- Blazingly fast (meant for realtime use)
- Easy to use in Bevy
- Built in pure rust
- Consistent between platforms (with a feature flag)
- Serializable
- Reflectable
- Readable
- Under development (as I have time and features are requested)
- Free and open source forever (feel free to open issues and prs!)
- No Std compatible
Noiz is not:
- Spelled correctly (noise was already taken)
- Mathematically precise (only supports
f32types for now) - Fully optimized yet (algebraic float math is not stable in rust yet)
- Meant to replace art tools for asset generation
- Meant to be standalone (you’ll want to also depend on either
bevy_mathorbevy.)
| Bevy version | noiz version |
|---|---|
| 0.16 | 0.1, 0.2 |
| 0.17 | 0.3 |
| 0.18 | 0.4 |
§What Makes Noiz Unique?
- Noiz is powered by a custom random number generator built on a hash function instead of the traditional permutation table. This gives competitive performance while using less memory and reducing tiling artifacts.
- Noiz seamlessly integrates with Bevy!
- Noiz changes seed automatically between octaves (which prevents some artifacting common in other libraries).
- Noiz is endlessly cusomizable. Really, the combinations and settings are limitless!
- Noiz is
no_std. - Noiz supports all your favorite noise types. If you see one that’s missing, please open an issue!
- Noiz supports noise derivatives and gradiesnts, allowing fast erosion approximations, analytical normals, etc.
- Noiz supports many noise types that other libraries do not, for example, distance-to-edge worly noise and smooth worly noise.
- Noiz has good documentation and a book.
- Noiz is faster than many other libraries (see the book for benchmarks).
§For a Quick Start, Check Out the Book!
In addition to rust docs, Noiz has a book available here. This explains how to use Noiz in practice with much more detail than the API reference. Also see the interactive examples for inspiration.
Modules§
- cell_
noise - Contains logic for creating noise based on
DomainCells. - cells
- This contains logic for partitioning a domain into cells.
- curves
- Contains a variety of curves built to work well with noise.
- layering
- Contains logic for layering different
NoiseFunctions on top of each other. - lengths
- Contains definitions for length/distance functions.
- math_
noise - Contains common math-based
NoiseFunctions. These are some of the smallest but most powerful noise functions. Note that some of them have specific requirements for the domain of their inputs. To see some examples of this, see the “show_noise” example. - misc_
noise - A grab bag of miscellaneous noise functions that have no better place to be.
- prelude
- Contains common imports
- rng
- Defines RNG for noise especially.
This does not use the
randcrate to enable more control and performance optimizations.
Structs§
- Noise
- This is the standard
Sampleableof aNoiseFunctionN. It wrapsNwith a self contained random number generator and frequency. This currently only supports sampling fromVectorSpacetypes. - RawNoise
- This is an alternative to
Noisefor when scaling an sample location is not desired or is impossible. In general,Noiseis easier to use, but this offers more control if desired.
Traits§
- Dynamic
Configurable Sampleable - This is a convenience trait that merges
DynamicSampleable,ScalableNoiseandSeedableNoise. - Dynamic
Sampleable - A version of
Sampleable<I, Result=T>that is dyn-compatible. Generally,noizeuses exact types whenever possible to enable more inlining and optimizations, but this trait focuses instead on usability at the expense of speed. - Noise
Function - Represents a simple noise function with an input
Iand an output. - Sampleable
- Indicates that this noise is samplable by type
I. - Sampleable
For - Indicates that this noise is samplable by type
Ifor typeT. See alsoSampleable. - Scalable
Noise - Specifies that this noise is scalable.
- Seedable
Noise - Specifies that this noise is seedable.