Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice

Question How do I get better Perlin Noise?

Discussion in 'Scripting' started by ParticleGuy, Jul 22, 2020.

  1. ParticleGuy

    ParticleGuy

    Joined:
    Nov 9, 2018
    Posts:
    1
    I recently had the idea to generate an infinite world for learning purposes. So I figured out how to create Perlin Noise textures. Currently my results look like the left picture. However, I read on the internet that a texture like the one on the right is needed in order to create believable worlds. To achieve a texture like the one on the right, I somehow have to stack different layers and sizes of noise textures on top of each other. But how exactly can I achive the right effect? And what is meant with add/stack different noise textures together? How do I do it?
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Use different x and y for the perlin noise to sample, and use multiplication to combine samples. There is a nice sample here that you can use to get started.
     
    ParticleGuy likes this.
  3. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    You can search for noise octaves. Here is a good visual example of how it is done. When you look at the left of your images imagine you put a 10x10 grid over it. The you take a singe cell of that grid and make it very important. This gives the coarse structure of your mountains. For the next layer you take a 2x2 grid and half its influence. This creates more detail. Then you just repeat these steps until you get the detail level you want (or until changes are not noticeable any more).

    Quickfingers has made a infinite terrain but the downloadlink is down. Maybe look if its still available in webarchive or similar service.
     
    ParticleGuy likes this.