6
$\begingroup$

Say I'm generating some texture using perlin noise (or simplex noise, or any similar noise). Then I generate mipmaps to obtain minified versions of that texture...

My question is if it is possible to directly (and quickly) calculate lower LOD version of said noise at given position, without going through steps of generating high frequency noise first, and then generating mipmaps.

What about sums of noises at different frequencies and amplitudes that are often used?

$\endgroup$
  • $\begingroup$ You mean instead of directly sampling whatever combined noise again at the new scale value per mip? And the goal is to speed-up mip generation? $\endgroup$ – MB Reynolds Dec 2 '17 at 20:21
8
$\begingroup$

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 aliasing at the resolution of that mip map level.

So, when making a specific mip level of a multiple octave perlin noise texture, you could find out which frequency would cause aliasing, and just use all the octaves up to (but not including) that point.

The result would be that you would have reasonable mips.

But, there are some reasons for that small asterisk:

  1. The result you get would not be the same as if you mipped the image that has the highest frequency content. This might not necessarily be a bad thing, because the usual way to make mips causes some bluring (a blur is a low pass filter) so you wouldn't have the bluring that comes with mips. However, it's possible that a higher octave happens to add some lower frequency content than you'd expect. Your lower mips, which could handle this frequency, would have that data missing unfortunately.
  2. It might be that your octaves don't perfectly line up with the frequencies that your various mip levels can handle. For instance, if an octave is just barely higher than nyquist frequency, you are going to miss out on some of the frequency components that the octave gave you.

Because of these two points, it might be more correct to process all octaves for each mip level, but to low pass filter the data for the octaves that are above nyquist.

That would be a lot more expensive than just omiting octaves at a cutoff point though (:

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.