Hot answers tagged

27

To directly answer the question: Simplex noise is patented, whereas Perlin noise is not. Other than that, Simplex noise has many advantages that are already mentioned in your question, and apart from the slightly increased implementation difficulty, it is the better algorithm of the two. I believe the reason why many people still pick Perlin noise is simply ...


24

The interpolation looks fine. The main problem here is that the hash function you're using isn't very good. If I look at just one octave, and visualize the hash result by outputting hash(PT).x, I get something like this: This is supposed to be completely random per grid square, but you can see that it has a lot of diagonal line patterns in it (it almost ...


18

It's unfortunate that people commonly recommend this. Blending between two (or four, etc.) translated copies of a noise function in that way is a pretty bad idea. Not only is it expensive, it doesn't even produce correct-looking results! On the left is some Perlin noise. On the right is two instances of Perlin noise, stacked and blended left-to-right. ...


15

I'd consider just going with 3D noise and evaluating it on the surface of the sphere. For gradient noise which is naturally in the domain of the surface of the sphere, you need a regular pattern of sample points on the surface that have natural connectivity information, with roughly equal area in each cell, so you can interpolate or sum adjacent values. I ...


11

As usual with numerical methods and samplings, it also depends of your quality threshold of what you consider "isotropic". And of what you would consider as a being or not a "grid-based noise algorithm". For instance Gabor Noise reproduces a target spectrum, for instance blue noise, which in Fourier domain is a simple isotropic ring. Now if you consider ...


10

The benefit of perlin noise is the overall distribution of frequencies. Since value noise uses simple values that are interpolated, there is a higher chance, that a row of several values only differs a little. The consequence is, that some regions of your picture may contain little changes and some regions a lot of changes. By using gradients you are ...


8

I would say yes with a small asterisk. When generating a perlin noise texture, using multiple of octaves of noise like you are talking about, the point of adding higher octaves (higher frequency lower amplitude) is to add high frequency details to the noise. When making mipmaps of a texture, the point is to remove high frequency content that would cause ...


8

TL;DR: 2*1LSB triangular-pdf dithering breaks in edgecases at 0 and 1 due to clamping. A solution is to lerp to a 1bit uniform dither in those edgecases. I am adding a second answer, seeing as this turned out a bit more complicated than I originally thought. It appears this issue has been a "TODO: needs clamping?" in my code since I switched from normalized ...


8

Perlin noise is just a base block, not very interesting by itself. You don't need to modify it, but to combine and filter it in interesting ways. Look at how to make fractal Brownian motion (fBm) with it for example, which combines octaves based on few parameters to get a richer texture. The question of terrain rendering is a difficult one and a topic of ...


7

A 2D Fourier transform is performed by first doing a 1D Fourier transform on each row of the image, then taking the result and doing a 1D Fourier transform on each column. Or vice versa; it doesn't matter. Just as a 1D Fourier transform allows you to decompose a function into a sum of (1D) sine waves at various frequencies, a 2D Fourier transform ...


6

As you've surmised, the transform() function transforms points from one co-ordinate space to another. (There are also vtransform() and ntransform() for transforming direction vectors and normal vectors, respectively.) The string argument names the co-ordinate space to transform into. The Renderman Shading Guidelines have this to say about it: At the ...


5

Is denoising ALWAYS about doing a low pass filter / blur? No, but this is the most obvious technique. A good denoiser isn't just a filter that runs on the image, but actually performs the reconstruction; i.e. it's a function from random samples to an image, not a function from an image to an image. Or are there other ideas and techniques for removing ...


4

First of all - a number must not occur twice, that is implied since we're talking about permutations. So filling the table with a simple random(255) function won't work. Secondly, you need to ensure that there are no premature recurrence patterns: Consider the values 1,2,3,4 - the permutation table 4,3,2,1 is not a very good one because of its short cyclic ...


4

A sine wave remapped to [0, 1] and raised to a power will give you periodic ridges: (Desmos graph) That could be a good place to start. It will make perfectly straight, even ridges; but you could then perturb the X position where the sine is evaluated using low-frequency Perlin noise, which will make the ridges bend and waver while still going mostly along ...


3

Yep, you've got that right. In Perlin's reference implementation of "improved noise", the noise will be periodic, repeating after 256 units along each axis. It's usually not very noticeable even if you have a large extent of noise visible, since there's no large-scale features for the eye to track. But there's no particular reason it needs to tile after 256 ...


3

I am not sure I can fully answer your question, but I will add some thoughts and maybe we can arrive at an answer together :) First, the foundation of the question is a bit unclear to me: Why do you consider it desirable to have clean black/white when every other color has noise? The ideal result after dithering is your original signal with entirely uniform ...


3

Animated noise can be created by using time as an extra dimension. So instead of 2D noise, you'd use 3D noise with time as the z-axis position, like ofNoise(x, y, time). To control the level of detail, you'd use octaves of noise: multiple noise layers with different scales and amplitudes, mixed together. The basic Perlin routines just generate a single ...


3

Why don't you just use Perlin noise twice on the same grid, or volume? Each with slightly different parameters (a phase shift, or different pseudo-random vectors). In this case both component of your float2 are smoothly defined by a Perlin Noise field. A float2 $v$ could be defined as $v = \{P(u,v), P(u+0.5, v+0.5)\},$ where $P(u,v)$ is the Perlin noise ...


3

r a similar problem (a tree of combined noise functions, evaluated on the GPU), I found a good method is to generate a shader from the expression tree. Each predefined node corresponds to a single shader function, e.g. float simplexNode(vec3 pos) { // ... implementation of simplex noise } or float sumNode(float val1, float val2) { return val1 + val2; ...


2

It certainly isn't always about low pass filters (see for example here on WP on "Noise Reduction") but you have to keep in mind that in your case the noise will always have a high frequency because you can basically consider each pixel with a independent noise realization. So any way of removing noise in this situation will have a low pass effect.


2

Since the question was somewhat clarified I will formalize both the question and the answer for future readers. Having a differentiable scalar field $f : \mathbb{R}^4 \rightarrow \mathbb{R}$ we want to find the gradient of the field with respect to $\theta, \phi$ on the 2-manifold defined parametrically by: $$(x(\theta,\phi), y(\theta,\phi) z(\theta,\phi), ...


2

Worley noise, also known as cellular noise, has the same property. It just as easily implemented as Perlin noise and easily extends to higher dimensions. Thus the slicing of 4D Worley noise will produce a 3D Worley noise. However, it is not necessarily a noise function but rather a texture function, producing cellular-like characteristics. With FBM applied ...


1

If you can't change the textures, I see 2 possibilities: Use mirrored repeat on the noise textures so they tile seamlessly. (taken from here) Do like Gimp does (or many other alternatives) and create tilable versions of the noise textures. The idea is to blend the left and right, and bottom and top edges together in pairs. Here's how to do it in an image ...


1

You can use the gradient of the noise/hash which for a function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ would be $n$ dimensional (depending on the application this may not work for you). Another possibility, as Reynolds mentioned is to generate the noise by calling the function multiple times.


1

First, (1/2) I didn't understand how the hash table is actually used. The workflow I think I understood is the following : For an input (coordinate), we find the both nearest pre-defined coordinates (i.e. : those present as indices in A). It's a multiple of 255. The lower one is used to lookup in B We get a number between [0;255] that we use to ...


1

I've simplified Mikkel Gjoel's idea of dithering with triangular noise to a simple function that only needs a single RNG call. I've stripped away all unecessary bits so it should be pretty readable and understandable what's going on: // Dithers and quantizes color value c in [0, 1] to the given color depth. // It's expected that rng contains a uniform ...


1

Perlin noise not good for real planet surface because planet surface is not random. Planet structure is create by geology/physics and interaction between different parts. This video show geology simulator have name PlaTec (have link in text below video): https://www.youtube.com/watch?v=bi4b45tMEPE Link have source code at SourceForge web site too.


1

Here’s a video that talks about a couple different techniques. One idea mentioned in the video is to take the values from 0.0 to 1.0 you get from the noise and only care about ones within a certain range, (mapping the rest to 0.0). Further, you can map the values in that range to different values, following a curve. For instance if you take the values ...


1

"Downscaling by skipping rows and columns – any example images?" You asked for example images: The following is a sequence of 50 frames from a well known (and hopefully freely available) sequence, subsampled as you suggested. I think you might find simply subsampling/decimating to be a bit too noisy. Are you sure you can't at least do some box filtering?


1

A basic nearest neighbour scale function would work like so. Here I also use 24:8 fixed point arithmetic to make it more micro friendly. const int originalWidth = 320, originalHeight = 240; int targetWidth = 50, targetHeight = 50; char *pSource = sourceBuffer; char *pDest = destBuffer; // you can use RGB instead of char int yStep = (originalWidth <...


Only top voted, non community-wiki answers of a minimum length are eligible