Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 29 November 2004 - 03:11 AM
Posted 29 November 2004 - 04:42 AM
Posted 29 November 2004 - 08:20 AM
Posted 29 November 2004 - 10:04 AM
Posted 29 November 2004 - 10:32 AM
Posted 29 November 2004 - 10:59 AM
Posted 29 November 2004 - 11:02 AM
Quote:
Original post by Doucette
Sampling at regular intervals *IS* a good way to test the full range of a Perlin Noise if the intervals are small enough.
Quote:
[...] Next, I sampled TEN TIMES that amount: 6,553,600,000 random samples [...] This still shows that the range is -sqrt(0.5)..sqrt(0.5), not -1..1 as lots of people think.
Quote:
Concerning 3D Perlin Noise:
Also, assuming that I am correct in my first post (which is what I am here to find out), 3D Noise range *is* different than 2D. And then it is different *again* if you use Ken Perlin's 2002 "Improving Noise" suggestions as he un-randomizes and un-normalizes the gradients which affect the output range. My 3D Perlin Noise, based on Ken Perlin's "Improving Noise" has this range: -1.0332..1.03458. (Based on 6 billion random samples.) I'm not sure if my code is buggy yet, so I do not wish to get into it too much until my 2D range problem is solved.
I would post this in your thread, but it is closed. I *despise* that. Threads that have not solved the issue should not be closed. We might as well continue the 3D discussion here, as I will be getting into that afterwards. But, for now, let's try to avoid getting into 3D and all its extra complications until after we determine whether the 2D range is -sqrt(0.5)..sqrt(0.5). I think 3D discussion will make more sense afterwards.
t s 1-s a b p
0.00 0.00 1.00 0.00 1.00 0.00
0.05 0.01 0.99 0.05 0.95 0.06
0.10 0.03 0.97 0.10 0.90 0.12
0.15 0.06 0.94 0.15 0.85 0.19
0.20 0.10 0.90 0.20 0.80 0.26
0.25 0.16 0.84 0.25 0.75 0.33
0.30 0.22 0.78 0.30 0.70 0.39
0.35 0.28 0.72 0.35 0.65 0.43
0.40 0.35 0.65 0.40 0.60 0.47
0.45 0.43 0.57 0.45 0.55 0.49
0.50 0.50 0.50 0.50 0.50 0.50
0.55 0.57 0.43 0.55 0.45 0.49
0.60 0.65 0.35 0.60 0.40 0.47
0.65 0.72 0.28 0.65 0.35 0.43
0.70 0.78 0.22 0.70 0.30 0.39
0.75 0.84 0.16 0.75 0.25 0.33
0.80 0.90 0.10 0.80 0.20 0.26
0.85 0.94 0.06 0.85 0.15 0.19
0.90 0.97 0.03 0.90 0.10 0.12
0.95 0.99 0.01 0.95 0.05 0.06
1.00 1.00 0.00 1.00 0.00 0.00
Posted 29 November 2004 - 03:10 PM
Quote:
Original post by Karg
I just depends on how you produce it.
Quote:
Original post by Karg
Just create a point with the maximum values for each octave and combine them to see what you get. Same for the minimums. Then you can scale to whatever values you want.
Quote:
Original post by technobot
So if all of the above is correct, and I didn't miss anything, and there are no bugs in the implementation, then we should get the following ranges:
1D: -0.5*Sqrt(1)..0.5*Sqrt(1) = -0.5..0.5
2D: -0.5*Sqrt(2)..0.5*Sqrt(2) = -0.71..0.71
3D: -0.5*Sqrt(3)..0.5*Sqrt(3) = -0.87..0.87
Although, since at least the 3D case should be -1..1 AFAIK, I won't be surprised if I am indeed missing something (or have mistaken in the analysis).
Quote:
Original post by technobot
This is actually the same as for the "Improved Noise" Implementation. The difference is in what's going on behind the scenes, so let's analyze each step.
Posted 29 November 2004 - 09:08 PM
delta vector . gradient vector * weight
( x, y, z) . ( 1, 0, 1) * (1-fade(z))*(1-fade(y))*(1-fade(x))
( x, y, z-1) . ( 1, 1, 0) * ( fade(z))*(1-fade(y))*(1-fade(x))
( x, y-1, z) . ( 1, 0, 1) * (1-fade(z))*( fade(y))*(1-fade(x))
( x, y-1, z-1) . ( 1, -1, 0) * ( fade(z))*( fade(y))*(1-fade(x))
( x-1, y, z) . (-1, 0, 1) * (1-fade(z))*(1-fade(y))*( fade(x))
( x-1, y, z-1) . (-1, 1, 0) * ( fade(z))*(1-fade(y))*( fade(x))
( x-1, y-1, z) . (-1, 0, 1) * (1-fade(z))*( fade(y))*( fade(x))
( x-1, y-1, z-1) . (-1, -1, 0) * ( fade(z))*( fade(y))*( fade(x))
Posted 30 November 2004 - 01:16 AM
Quote:
Original post by gamelife
I guess higher value could be possible - though extremely rare in real cases.
Posted 30 November 2004 - 04:09 AM
Quote:
Original post by Doucette
Step 4 was hard to follow, but I followed it and it looks good and has the same results that I got.
Quote:
I have not yet coded 3D *original* Perlin Noise. I will code it right now and post the ranges of my results...
Done. I'm calculating my results. So far, the range is:
-0.765153..0.720143 after 2.04 BILLION random samples!
-0.866025..0.866025 is the expected range.
Why isn't it close?
For two reasons. Firstly, 3D noise is calculated from *EIGHT* gradients ... If you think of it, it is much less likely that eight gradients that either closely maximize or minimize the noise value exist out of the 256. ... Secondly, assuming that those eight gradients do exist out of the list of 256, it is much less likely that those eight are going to all be corners around the same 3D "cel" of noise. ... This brings me to my next idea for testing: ...
Quote:
Concerning "Improved Noise" Perlin Noise:Quote:
Original post by technobot
This is actually the same as for the "Improved Noise" Implementation. The difference is in what's going on behind the scenes, so let's analyze each step.
3D Perlin Noise based on Ken Perlin's improved noise from his "Improving Noise" paper is different (and has a different range) from the original implementation. Here is a partial list of "Improving Noise" differences, specifically only the differences that change the range:
"Improving Noise" Perlin Noise:
1) The gradients are *not* normalized, and have a length of sqrt(2).
2) The gradients are *not* random and do *not* point in the direction that maximizes (or minimizes) the noise value.
In fact, here they are:
1,1,0, -1,1,0, 1,-1,0, -1,-1,0,
1,0,1, -1,0,1, 1,0,-1, -1,0,-1,
0,1,1, 0,-1,1, 0,1,-1, 0,-1,-1,
1,1,0, -1,1,0, 0,-1,1, 0,-1,-1
(The last row is the first row repeated, on purpose.)
These gradients create a different range than the original 3D noise, due to the two points above. Now that we have the range of Perlin's original noise calculated, let's work on his Improved Noise range!
Posted 30 November 2004 - 04:41 AM
Quote:
Original post by Doucette
My 3D Perlin Noise, based on Ken Perlin's "Improving Noise" has this range: -1.0332..1.03458. (Based on 6 billion random samples. It took over 62 million samples JUST to break the -1..1 barrier, and over 235 million samples to break both ends of the -1..1 barrier.)
Posted 30 November 2004 - 04:59 AM
Quote:
Original post by technobot
This gives me a much better idea:
Treat the noise as if you do have optimal gradients.
Quote:
Original post by technobot
Also notice that:
3) All the gradient vectors have two non-zero coordinates, and one zero coordinate, so you're essentially working with 2D vectors.
Quote:
Original post by technobot
Basically, the maximum value should again be obtained for (0.5, 0.5, 0.5) ...[cut]... the noise range is hence exactly -1..1. I will post a more complete analisys later.
Quote:
Original post by technobot
However, since s(t) is different, the actual maximum may be elsewhere (not middle of unit cube), possibly allowing for values outside that range... This is also suggested by gamelife's post.
Posted 30 November 2004 - 08:44 AM
Quote:
Original post by technobot
Also notice that:
3) All the gradient vectors have two non-zero coordinates, and one zero coordinate, so you're essentially working with 2D vectors.
Quote:
Original post by Doucette
I locked one at 0.5 and the others within the range of 0.45..0.55 and 0.3..0.4. In 8,522,970 samples I beat it again:
location = (0.481445960659562,0.355424509538798,0.500000000000000)
gradients =
g000 = (1,0,1)
g100 = (-1,0,1)
g010 = (0,-1,1)
g110 = (-1,-1,0)
g001 = (1,0,-1)
g101 = (-1,0,-1)
g011 = (0,-1,-1)
g111 = (-1,-1,0)
max = 1.036353775489912
Posted 30 November 2004 - 09:55 AM
Quote:
Original post by Doucette
Re: 1985 Perlin NoiseQuote:
Original post by technobot
This gives me a much better idea:
Treat the noise as if you do have optimal gradients.
Of course. Excellent idea. This is *easy* to do with the 1985 Perlin Noise.
Posted 30 November 2004 - 10:12 AM
Quote:
Original post by technobot Quote:
Original post by Doucette
Re: 1985 Perlin NoiseQuote:
Original post by technobot
This gives me a much better idea:
Treat the noise as if you do have optimal gradients.
Of course. Excellent idea. This is *easy* to do with the 1985 Perlin Noise.
While I'm deriving the extact solution, could you please run this test both with the old s(t) and the new s(t) and post the results?
Quote:
Original post by technobot
To adjust the test for the Improved Noise - for each delta vector, calculate the dot product with all 12 gradient vectors, and take the maximum result. Then interpolate those. This is guaranteed to give you the maximum noise range, and the position(s) where the maximum noise value is obtained. I think this is essentially what you did in your last post.. is that correct?
Posted 30 November 2004 - 11:35 AM
Posted 30 November 2004 - 11:44 AM
Quote:
Original post by technobot
p(x) = 6*x^6 + (-15-6k)*x^5 + (10+15k)*x^4 - 10k*x^3 + k-0.5
Posted 30 November 2004 - 11:35 PM
Quote:
Original post by Dwiel Quote:
Original post by technobot
p(x) = 6*x^6 + (-15-6k)*x^5 + (10+15k)*x^4 - 10k*x^3 + k-0.5
Let me get this straight; You want the maximum value of the multivariable function?
Quote:
Now when I cnstrain the two variables to be within -1 and 1, I get x=-1 and k=1
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.