GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2013-10-02 05:19:40

Huder
Member
Registered: 2013-10-01
Posts: 4

Value Noise

I saw yesterday perlin noise that xot posted so i thought i might post my value noise that i used in my 3D planet generator.
Algorithm is not using surfaces all is done mathematically in arrays. Surfaces are used only to represent result on screen.

How this is working:

1. First i generating base raw noise, this is done in array gNoise[i, j] = random(1); so values are in range <0, 1>.
lNu8ZUS.png

2. Now we need to generate 'n' octaves that each is lager than previous by 2^n and sum them together. Variable persistence will change weight of the single octave in our final sum.
If persistence is > 0.5 then more visible are smaller octaves. If < 0.5 then large ones.
qJGuqxK.png

Download: http://www.mediafire.com/download/3ixg8 … iseENG.gmz

I'm looking for speed improvements so if you have any idea tell me.
Here you can find this algorithm in action: http://forum.gmclan.org/index.php?showtopic=30559

Also black lines which you see on edges is probably new GMS bug. When i draw on surfaces draw_point(x,y) it is moved to right and down by 1 pixel, that is strange. I don't know if this was already submitted as a bug to yoyo

Last edited by Huder (2013-10-02 05:22:57)

Offline

#2 2013-10-02 16:10:08

xot
Administrator
Registered: 2007-08-18
Posts: 1,240

Re: Value Noise

Thanks for the submission. I'll look at this more closely later to try to figure out which algorithm this is based on. There are so many variations, it's hard to recognize them all.

There are indeed bugs with surfaces in GM:Studio and several seemingly related bug reports have already been submitted. I posted one for this particular bug myself. I hope they get fixed soon.


Abusing forum power since 1986.

Offline

#3 2013-10-02 16:31:05

Huder
Member
Registered: 2013-10-01
Posts: 4

Re: Value Noise

Offline

#4 2013-10-02 16:41:47

xot
Administrator
Registered: 2007-08-18
Posts: 1,240

Re: Value Noise

Thanks for the link. That's a helpful article which shows some good examples of use. The comments should be read as well. There are a lot of clarifications, technical discussions, and disagreement about exactly what that algorithm is. smile


Abusing forum power since 1986.

Offline

#5 2013-10-02 17:42:23

Huder
Member
Registered: 2013-10-01
Posts: 4

Re: Value Noise

I forgot to mention that this noise is seamless.

Offline

Board footer

Powered by FluxBB