[Plugin] Simplex Noise 1D,2D,3D,4D Fast Perlin Noise Version

Hi,

I just released the Simplex Noise Plugin for UnrealeEngine 4 on my GitHub.
https://github.com//SimplexNoise

This is a clean, fast, modern, and free Perlin Simplex noise function.
All Public Functions are BlueprintCallable so they can be used in every blueprint
From and Dedicated to you and Unreal Community! Use it free for whatever you want :smiley: I only request that you mention me in the credits for your game in the way that feels most appropriate to you.

*SimplexNoise 1D,2D,3D & 4D *Scaled Version SimplexNoise 1D,2D,3D & 4D *InRange version SimplexNoise 1D,2D,3D & 4D

*SimplexNoise Function returns float value between 0 - 1
*SimplexNoise Scaled returns float value between 0 - scale factor
*SimplexNoise In Range returns float value between minRange - maxRange

This algorithm was originally designed by Ken Perlin, but my code has been adapted and extended from the implementation written by Stefan Gustavson (stegu@itn.liu.se) and modified to fit Unreal Engine 4

//This library is public domain software, released by the author
// into the public domain in February 2011. You may do anything
// you like with it. You may even remove all attributions

New update plugin version https://github.com//SimplexNoise/releases/tag/SimplexNoise.1.2.0_UE4.25.3 There is a release also. 4 new functions as well as a lot of bug fixes and improvement here and there.

Added 4 new functions exposed to BP:

  • GetSimlexNoise1D_EX (GetSimpleNoise1D_EX (float x, float lacunarity, float persistance, int octaves, float inFactor, bool ZeroToOne)
  • GetSimpleNoise2D_EX (float x, float y, float lacunarity, float persistance, int octaves, float inFactor, bool ZeroToOne)
  • GetSimpleNoise3D_EX (float x, float y, float z, float lacunarity, float persistance, int octaves, float inFactor, bool ZeroToOne)
  • GetSimpleNoise4D_EX (float x, float y, float z, float w, float lacunarity, float persistance, int octaves, float inFactor, bool ZeroToOne)

Inputs:
positions x,y,z,w - depends on which version of the function you are using
float lacunarity, float persistance, int octaves to define number of noise layers combine together with smaller and smaller details
float inFactor to scale input value (x,y,z,w) to get smaller or bigger noise frequency
bool ZeroToOne - if true set output to: 0.0f - 1.0f , otherwise output is:-1.0f - 1.0f

4 Likes

Thank you very much. I was hoping somebody would make this :smiley:

Is this working for anyone on 4.9?? I cant get any output besides 0.0

Yeah itā€™s working on 4.10, though itā€™s a bit oddā€¦ Hereā€™s how I find the best way to use it:

Simplex Noise 1D
Input: X
Output: Return Value

(None of the others work properly anyway, so just use Simplex Noise 1D)

  • For the input, it expects an increasing number, so you can just make a float called Timer, and add delta seconds to it on the event tick. Plug this timer variable into the input X.
  • The output seems to give between -0.4 and 0.4, so itā€™s kind of odd, not precise but you can multiply it by a larger number to get a nice random effect.
  • To have multiple different random values, just add a number to your timer. So Timer + 50 plugged into the input X. This will grab from the perlin noise 50 seconds ahead, so itā€™ll be different from the regular Timer.

Thanks , although itā€™s not working as you intended (at least in 4.10) with some workarounds it still does the job beautifully!

Thanks you for that @ !

Hi, I greatly appreciate the work here - but one question that seems to be painfully annoying to find an answer to - How does one build and install 3rd party plugins?

For a high-end engine Unreal sure seems to lack a lot of information on basics and Iā€™ve been banging my head on trying to build your plugin for the past hour.

can you upload a sample project? i try to make somthing with your plugin but get only crazy values out of this.
what the values spezificly mean? i have think they give something like this out:
Yubrs.png

The values that come out the functions are noise value, by default between -1 and 1, for a given set of inputs.

Noa3,
You could get your desired sample back out by combining the results several times over in octaves. Where every octave uses a successively doubled set of inputs and successively halved outputs. See my example code below:



TArray<float> currentHeightMap;
currentHeightMap.SetNumZeroed(myGrid->numNodes);
for (int32 nodeIndex = 0; nodeIndex < myGrid->numNodes;++nodeIndex)
{
	FVector nodeLocation = myGrid->getNodeLocationOnSphere(myGrid->gridLocationsM[nodeIndex]);
	float magReduction = 1;
	for (int32 octave = 0; octave < numOctaves;++octave)
	{
		currentHeightMap[nodeIndex] += USimplexNoiseBPLibrary::SimplexNoise3D(nodeLocation.X, nodeLocation.Y, nodeLocation.Z)/magReduction;
		nodeLocation *= 2;
		magReduction *= 2;
	}
}


Note that Iā€™m using it for 3d locations on a sphere, but the same idea would apply for any 2D or 3D location. Hereā€™s a very rough height map Iā€™m getting a sphere using this (note that Iā€™m not blending between colors for the heights here just giving my self a rough idea of what Iā€™m getting):

Were you ever able to get this working? This is exactly the sort of plugin Iā€™ve been looking for, but Iā€™m having no luck getting it to install.

Iā€™m keen on this one too. I can build the plugin for you and upload it somewhere - typically a plugin dev needs to do a binary release or most people canā€™t use it. The documentation to do this is readily available but itā€™s not at all easy to do the first few times.

Isnā€™t 3D simplex noise Patented by Nokia currently?

Hey guys it was busy month for me . It is great to see a lot of interest for this plugin. All functions are working well and Iā€™ll upload example project soon so you guys can learn easier how to use plugin. It is simple once you understand how it works. Iā€™ll upload also binaries so you can start to use straight away :smiley:

@mordentral

Not really , Perlin Noise is patented
http://www.google.com/patents/US6867776

Cheers !

See now that Patent is terribly titled, I understand that it says ā€œStandard for perlin noiseā€ but the actual patent applies to an ā€œimproved implementation of perlin noise using a simplicial gridā€. It has been my understanding that the only reason Perlin is still even relevant anymore is because of the patent over Simplex noise being a potential issue, honestly I would love to use Simplex myself but I donā€™t think it is legal to do so with UE4.

The patent describes Simplex Noise but doesnā€™t name it as such. I hate to be the possible bearer of bad news man but I donā€™t want you wasting your time if it is going to be an issue.

There was even an alternative algorithm made just to avoid the patent issue with Simplex (sadly not as fast): OpenSimplex noise - Wikipedia

See just some of the quotes from the patent:

Well,itā€™s to hard to understand how itā€™s work.(as for me)
Maybe you can make a tutorial how to work with this?
And why youā€™re using a branch on the ss?

Just need a tutorialā€¦pleaseā€¦

Thank you man - itā€™s really useful!

Thanks you man ! itā€™s really useful ā€¦ very useful x) for work the plugins switch your version of ue4 to 4.7, ( for 4.8, i dā€™ont know ) no work to 4.9 and later.
For install a plugins go to I Don't Know UDK: Unreal Engine 4, Blender and Substance Designer Tutorials: How to Get Plugins to Package Correctly in Your UE4 Projects.
I doing a tutorial ( in french ) for learning and using the plugin (donā€™t worry not, I will quote to you!)!
Thanks again and excuse me for me bad inglish iā€™m french haha !

Good bye and kind regards Upeaval !

Iā€™m SORRY, iā€™m stupids ā€¦ the plugins works perfecly to Ue4 version 4.11 ā€¦
Here is the screenshot of the Blueprint and rendering !!
136c13fbb9a639243dda7a9850be6bb6117c5f12.jpeg

8fa016063dca9cb983e49f1bf25788d7dbfb82de.jpeg

Good Bye and kind regards Upeaval !

OMG! Best plugin EVER
Works perfectly with 4.12!

And hereā€™s little something :smiley:

A-ha~!!

Double posting FTW.

Any progress on the tutorial for this. I have it setup but currently it only produces very sporadic noise. Even when I use the scaled 3d version it seems the frequency is too high.