perlin-noise

Uniform distribution from a fractal Perlin noise function in C#

…衆ロ難τιáo~ 提交于 2019-12-03 12:14:00
My Perlin noise function (which adds up 6 octaves of 3D simplex at 0.75 persistence) generates a 2D array array of double s. These numbers each come out normalized to [-1, 1], with mean at 0. I clamp them to avoid exceptions, which I think are due to floating-point accuracy issues, but I am fairly sure my scaling factor is good enough for restricting the noise output to exactly this neighborhood in the ideal case. Anyway, that's all details. The point is, here is a 256-by-256 array of noise: The histogram with a normal fit looks like this: Matlab's lillietest is a function which applies the

Perlin Noise detail level. How to zoom in on a landscape?

时光怂恿深爱的人放手 提交于 2019-12-03 11:53:26
问题 I've written my own Perlin Noise implementation and it works well. I can 'zoom' in and out by changing the frequency, but as I zoom in the noise gets smoother and smoother. Assume I have a landscape that displays a continent. I want to zoom in down to a city-size area (or closer), but still have detail. I think I need to re-generate the landscape at the closer detail but I'm not sure if there are any implementations that can help with that? Zoomed out, I see the continent and oceans, but I

Best way to add seed to Perlin noise?

青春壹個敷衍的年華 提交于 2019-12-03 05:02:54
问题 I'm trying to implement 2D Perlin noise generation in C++, and some implementations I found use no seed at all (here, here or here). Other implementations take a seed value to get different noise depending on the noise value. However I found example code where one added the seed value to the function parameters calculating the noise value for each octave (see PerlinNoise::Total() in the linked code). Another one uses a 3D seed function and uses the fixed seed value as the z value (couldn't

Simplex noise vs Perlin noise

时光毁灭记忆、已成空白 提交于 2019-12-03 03:30:57
问题 I would like to know why Perlin noise is still so popular today after Simplex came out. Simplex noise was made by Ken Perlin himself and it was suppose to take over his old algorithm which was slow for higher dimensions and with better quality (no visible artifacts). Simplex noise came out in 2001 and over those 10 years I've only seen people talk of Perlin noise when it comes to generating heightmaps for terrains, creating procedural textures, et cetera. Could anyone help me out, is there

Procedural generation of a constrained landscape

ぐ巨炮叔叔 提交于 2019-12-02 21:23:43
I'd like to implement a procedural generation of a terrain. After a thorough research I came up with a conclusion that it should be implemented with one of the gradient (coherent) noise generation algorithms, for instance Perlin Noise algorithm. However, I don't want the generation to be completely random. I'd like to apply some constraints (like where should be a mountain range, or where should be a lowland etc.). Question: For example I have a curve which represents some landscape element. The curve is an array of points. How can I improve the Perlin Noise algorithm, so that along this curve

Any Simplex Noise Tutorials or Resources? [closed]

喜欢而已 提交于 2019-12-02 15:55:45
I want to create a terrain-like 3D noise generator and after doing some research I came to the conclusion that Simplex Noise is by far the best type of noise to do this. I find the name quite misleading though as I have a lot of trouble finding resources on the subject and the resources I find are often not well written. What I am basically looking for is a good resource/tutorial explaining step by step how simplex noise works, and explains how to implement that into a program. I am not looking for resources explaining how to use a library or something. Richard Tingle In lue of a tutorial

Software Perlin noise implementation

狂风中的少年 提交于 2019-12-01 14:01:51
问题 I have written a 2D Perlin noise implementation based on information from here, here, here, and here. However, the output looks like this. public static double Perlin(double X, double XScale, double Y, double YScale, double Persistance, double Octaves) { double total=0.0; for(int i=0;i<Octaves;i++){ int frq = (int) Math.Pow(2,i); int amp = (int) Math.Pow(Persistance,i); total += InterpolatedSmoothNoise((X / XScale) * frq, (Y / YScale) * frq) * amp; } return total; } private static double

“Blocky” Perlin noise

孤街醉人 提交于 2019-12-01 02:03:28
问题 I've recently been trying to implement a Perlin Noise generator in C (based off Ken Perlin's website, using the SDL library as a screen output), but the output shows that the edges between interpolation blocks are not continuous or smooth - the interpolation blocks do really manifest as blocks. I've tried four kinds of interpolations, and all the "smooth" ones look about the same; only cosine looks (very) slightly better and straight linear looks horrible by comparison. (below are Cosine and

Perlin noise generator in Swift

空扰寡人 提交于 2019-11-30 22:26:00
I have this code for generating 1D noise in obj-c, it's working perfectly well: - (float)makeNoise1D:(int)x { x = (x >> 13) ^ x; x = (x * (x * x * (int)_seed + 19990303) + 1376312589) & RAND_MAX; return ( 1.0 - ( (x * (x * x * 15731 + 789221) + 1376312589) & RAND_MAX) / 1073741824.0); } Now I'm trying to reproduce it in Swift, but it always fail and shows EXEC_BAD_INSTRUCTION on return. This is how it looks like now, I had to spit the final expression, but I'm pretty sure that's not the problem. func makeNoise1D(var x : Int) -> Float{ x = (x >> 13) ^ x; x = (x * (x * x * seed! + 19990303) +

Perlin Noise for 1D?

梦想的初衷 提交于 2019-11-30 19:32:41
Try as hard as I can, I cannot find any real tutorials on Perlin\Samplex Noise in 1D. I've searched all around the internet but just cannot find anything. Any sites I do come across mentioning 1D perlin noise are usually very unclear or just shows the code I know this is an old question but here is one of the clearest explanations about the interpolation between fixed points that makes up 1d Perlin noise http://webstaff.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf One of the most important things to know, useful in all programming is the interpolation function... http://paulbourke.net