3 ms·
The code examples have me confused because they return a single sample at a time, but if noise is to have the kind of different characteristics discussed at dif
by strainer 7y ago
The code examples have me confused because they return a single sample at a time, but if noise is to have the kind of different characteristics discussed at different scales, individual sample values cannot be independent of previous sample values.
I guess the provided code examples must return values which are ordered somehow by properties of the `noise` function, which must involve some memory of previously given values. But this function is described as:
>some noise function of our choice... the choice doesn't matter much
The nature of that function is really essential, if it has any independent random distribution, the examples will just return values with an independent random distribution that is bell or triangular or spike shaped.
The basic method of creating a sequence which has different variability at difference scales is to create separate random walks, scale (resample) them and then sum them together. This can be optimized by generating the component walks (with different scales) on the fly, but there is no way to create such a sequence on the fly from a function which returns values which are independent of the sequences previous values.
- n3k5 7y agoYou missed that the noise function is given n-dimensional coordinates as an argument. Rather than picturing an RNG, you can think of it as a texture unit that samples from an n-dimensional image of some noise with certain characteristics. The order in which sample values are retrieved doesn't matter — of course it doesn't! It's important that fragments (think 'pixels' in case you're wondering what fragments are) can be evaluated independently and in any order, as computing fragments is supposed to be a massively parallel operation. It this context, you have to throw out the concept of 'previous' sample values and replace it with 'nearby' values.
- strainer 7y agoThanks, I wasn't clear on what that vector f*x was. So the noise function is mapping pattern values to coordinates, and the SBM function is combining/layering its patterns calculated with different powers at different scales. Still on the face of it that advice "the choice of noise function doesn't matter much" is tricky, considering "white noise" is mentioned in the intro which takes no coordinates, but white noise walks of different scales can be combined I think to produce a non-white noise walk. Besides this combining in a loop the same kind of noise/texture with different power over different scales, I would be interested in also varying the kinds of texture that are layered into different scales.