#Need help with perlin noise

1 messages · Page 1 of 1 (latest)

tidal crater
#

Heya i've been trying to understand perlin noise using this video https://www.youtube.com/watch?v=MJ3bvCkHJtE&t=938s

sadly after hours of trying, i cant get further than this. Does anyone have a idea what might fix it?

Noise Tutorials: Tutorial 2 - Perlin Noise Explained
Previous tutorial: Tutorial 1 - Random Noise Animation by using Java https://youtu.be/rWI2Vrc9Oj0
Next tutorial: Tutorial 3 - How To Use Perlin Noise Algorithm? https://youtu.be/5NSaDKqL22I
Improved Perlin noise article: http://mrl.nyu.edu/~perlin/paper445.pdf
Improved Perlin noise algorithm:...

▶ Play video
#

I've checked. The Gradient Vectors seem to be set up correctly. But the vectors pointing towards the pixel is killing me... i have absolutely no clue how to set em

#

i've tried using length_dir for that-- didnt come very far

#

How i tried to do it:

#

I found a function that is pseudo random, i just added a global.seed thing to it so i can attach a seed to this thing.

#

After that i place the chunks i want and use the rand function 4 times for each corner of the chunk

#

the rand function returns a value betwen 0 and 1. With that i made it decide which gradient vector to use

#

After that i set 4 variables up for each corner with that funciton

#

Which ends up with this:

#

now heres the part that is a bit messy

#

The video from fataho said that the position of the pixel where the vectors have to point towards has to be a decimal value. so i figured that i do a for loop and divide the i with the chunk size in order to get that value

#

now i created a function where i use lengthdir to set the vectors

#

with that function i created 4 local variables for each vector that is supposed to be pointing towards that pixel

#

Now i apply dot product to each vector i created. I then lerp every dot product etc. etc. and then add the final value to the Grid.

#

then i draw it to see if it works

#

aaaaand

#

it doesnt

dire raven
#

have you seen Sam Spader perlin noise video?
Maybe its too basic for you but maybe it gives you some ideas https://www.youtube.com/watch?v=ms1wczeXAT0

A tutorial on what Perlin Noise is and how to use it it in GameMaker Studio 2 (Perlin noise function included)

Patreon Support
https://www.patreon.com/samspadegamedev

Source Code
https://github.com/samspadegamedev/YouTube-Perlin-Noise-Public

Resources
Perlin Noise Explained: https://youtu.be/MJ3bvCkHJtE
C Code: https://rosettacode.org/wiki/Pe...

▶ Play video
tidal crater
#

oooh! that might just be the video i need!

cobalt grove
#

ken perlin has an implementation for java that can almost be 1:1 turned into gml and is much much much faster than his original implementation. looks like that sam spade video uses his java implementation

serene basalt
#

I've used Sam's a lot, it's nice.

cobalt grove
#

i do all my 1d perlin noise with animcurves haha

serene basalt
#

Hehe yeah, I remember 😄

jaunty glen
#

might be useful to look at