Fastest PerlinNoise : Improved version bicubic&bilinear grad&value noise

Hi DzzD,

Your noise func is super-fast, thx for that ! (could be also easily simdized, yum!).

I needed a seamless xy result so I used your multiplication trick to get the pseudo 4D noise and feed it with two circle coordinates. This is also working a treat !

Probably silly question :
Do you think that fake 4D is overkilling / do you have a simpler solution to get your 2D perlin signal tileable ?

The tiling is working cool with your fake 4D trick for now, but I get far more pronounced bi-cubic artefacts with this multiplication trick…

Do you think quintic interpolation could solve this ?

Much thanks again !
K

sry I was not on JGO for a while…

[quote]but I get far more pronounced bi-cubic artefacts with this multiplication trick
[/quote]
yes I pointed this artefact above, this is due to a lack of precision in the bicubic computation (it can be corrected)

[quote]Do you think quintic interpolation could solve this ?
[/quote]
probleme come from the discretisation of computation not the computation itself , so I believe that it wont help more than correcting the integer cubic interpolation implementation

Hi DzzD,

Tons of thanks for your post.

[quote]sry I was not on JGO for a while…
[/quote]
You are kidding me right ? this noise implementation is a gem.
I would have appreciate using it extensively in-line but you know how it is… I don’t have time to figure out if I should compute all this mess on the fly or use a raster to leave hand for therefore other basic stuff.

I finally use a pre-rendered noise map for my sh…(because I need / was tempted by more tons of octaves-based visual result… :(( ).

I am still planning to use your snippet to complete all this with small in-line extra layers(multiple ways, starfield, extra noise when we are close, etc…).

[quote]probleme come from the discretisation of computation not the computation itself
[/quote]
Much thanks for your input, I have to admit I am testing this cool stuff with c++(ported, for sure, in no time - one or two lines - thx to your clean coding).
I am still a bit lost with fully reading your optimizations but I like the style, specifically as it is the fastest noise I found so far !

[quote] , so I believe that it wont help more than correcting the integer cubic interpolation implementation
[/quote]
Wow, this is your job or maybe mine with few month(S) more training on this(need time to understand how to translate this “clean” on various different vector units microcode- spus, gpus… man, tons of exciting efforts ahead - at least for me…;)).

I am definitely giving it a deeper shot asap !

Thanks again,
ok

Hey. Could you post an exampl code snipptet on hoe to produce e.g. an cloud image or something? I don’t understand Perlin to be honest :confused:

		BufferedImage bi=new BufferedImage(1024,1024,BufferedImage.TYPE_INT_RGB);
		
		for(int i=0; i<1024; i++)
			for(int j=0; j<1024; j++)
			{
				int col=FastNoise.noise(i/128f, j/128f, 7);
				
				int red=col;
				int green=col;
				int blue=col;
				
				int RGB=red;
				RGB=(RGB<<8)+green;
				RGB=(RGB<<8)+blue;
				
				bi.setRGB(i, j, RGB);
			}
		try {
		    File outputfile = new File("noise.png");
		    ImageIO.write(bi, "png", outputfile);
		} catch (IOException e) {
		    e.printStackTrace();
		}

If the code looks ugly, it’s because I don’t know what I am doing. :smiley:

Seems to work, gives that tasty noise. :>

Here it is:

http://img860.imageshack.us/img860/7915/noise.png

EDIT: I am using VALUE NOISE, not TRUE GRADIENT here! Cuz I don’t know how to get gradient one properly. :smiley: