-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 Jordan Peck | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "ProceduralToolkit.FastNoiseLib", | ||
"references": [], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# FastNoise | ||
|
||
This is the C# version of [FastNoise](https://github.com/Auburns/FastNoise) | ||
|
||
FastNoise is an open source noise generation library with a large collection of different noise algorithms. This library has been designed for realtime usage from the ground up, so has been optimised for speed without sacrificing noise quality. | ||
|
||
This project started when my search to find a good noise library for procedural terrain generation concluded without an obvious choice. I enjoyed the options and customisation of Accidental Noise Library and the speed of LibNoise, so many of the techniques from these libraries and the knowledge I gained from reading through their source has gone into creating FastNoise. | ||
|
||
I have now also created [FastNoise SIMD](https://github.com/Auburns/FastNoiseSIMD), which utilises SIMD CPU instructions to gain huge performance boosts. It is slightly less flexible and cannot be converted to other languages, but if you can I would highly suggest using this for heavy noise generation loads. | ||
|
||
### Features | ||
- Value Noise 2D, 3D | ||
- Perlin Noise 2D, 3D | ||
- Simplex Noise 2D, 3D, 4D | ||
- Cubic Noise 2D, 3D | ||
- Gradient Perturb 2D, 3D | ||
- Multiple fractal options for all of the above | ||
- Cellular (Voronoi) Noise 2D, 3D | ||
- White Noise 2D, 3D, 4D | ||
- Supports floats or doubles | ||
|
||
### Wiki | ||
Usage and documentation available in wiki | ||
|
||
[Wiki Link](https://github.com/Auburns/FastNoise/wiki) | ||
|
||
### Related repositories | ||
- [FastNoise Java](https://github.com/Auburns/FastNoise_Java) | ||
- [FastNoise SIMD](https://github.com/Auburns/FastNoiseSIMD) | ||
- [FastNoise Unity](https://www.assetstore.unity3d.com/en/#!/content/70706) | ||
- [Unreal FastNoise](https://github.com/midgen/UnrealFastNoise) | ||
|
||
Credit to [CubicNoise](https://github.com/jobtalle/CubicNoise) for the cubic noise algorithm | ||
|
||
## FastNoise Preview | ||
|
||
I have written a compact testing application for all the features included in FastNoise with a visual representation. I use this for development purposes and testing noise settings used in terrain generation. | ||
|
||
Download links can be found in the [Releases Section](https://github.com/Auburns/FastNoise/releases). | ||
|
||
![FastNoise Preview](http://i.imgur.com/uG7Vepc.png) | ||
|
||
|
||
# Performance Comparisons | ||
Benchmarking done on C++ version. | ||
|
||
Using default noise settings on FastNoise and matching those settings across the other libraries where possible. | ||
|
||
Timings below are x1000 ns to generate 32x32x32 points of noise on a single thread. | ||
|
||
- CPU: Intel Xeon Skylake @ 2.0Ghz | ||
- Compiler: Intel 17.0 x64 | ||
|
||
| Noise Type |FastNoise | FastNoiseSIMD AVX2 | LibNoise | FastNoise 2D | | ||
|-------------|----------|--------------------|-----------|--------------| | ||
| White Noise |141 | 13 | | 111 | | ||
| Value |635 | 160 | | 364 | | ||
| Perlin |964 | 342 | 1409 | 476 | | ||
| Simplex |1189 | 340 | | 875 | | ||
| Cellular |2933 | 1472 | 56960 | 1074 | | ||
| Cubic |2933 | 1393 | | 872 | | ||
|
||
Comparision of fractal performance [here](https://github.com/Auburns/FastNoiseSIMD/wiki/In-depth-SIMD-level). | ||
|
||
# Examples | ||
## Cellular Noise | ||
![Cellular Noise](http://i.imgur.com/quAic8M.png) | ||
|
||
![Cellular Noise](http://i.imgur.com/gAd9Y2t.png) | ||
|
||
![Cellular Noise](http://i.imgur.com/7kJd4fA.png) | ||
|
||
## Fractal Noise | ||
![Fractal Noise](http://i.imgur.com/XqSD7eR.png) | ||
|
||
## Value Noise | ||
![Value Noise](http://i.imgur.com/X2lbFZR.png) | ||
|
||
## White Noise | ||
![White Noise](http://i.imgur.com/QIlYvyQ.png) | ||
|
||
## Gradient Perturb | ||
![Gradient Perturb](http://i.imgur.com/gOjc1u1.png) | ||
|
||
![Gradient Perturb](http://i.imgur.com/ui045Bk.png) | ||
|
||
![Gradient Perturb](http://i.imgur.com/JICFypT.png) | ||
|
||
# Any suggestions or questions welcome |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.