Search Unity

Procedural Landmass Generation

Discussion in 'Community Learning & Teaching' started by SebastianLague, Jan 31, 2016.

  1. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Last edited: Feb 19, 2016
  2. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    In this second episode we create a grid of perlin noise values and render them to the screen as a texture.
     
    Matt-Face and softwizz like this.
  3. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode three is about adding parameters to control the noise.
     
    Matt-Face likes this.
  4. FlyTroll

    FlyTroll

    Joined:
    Jul 20, 2014
    Posts:
    8
    Thanks :oops:
     
  5. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    My pleasure, FlyTroll.
    Episode 04 is now out:

     
    Matt-Face likes this.
  6. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode 05 covers the generation of 3D mesh.

     
    Matt-Face likes this.
  7. K2mia

    K2mia

    Joined:
    Jan 25, 2016
    Posts:
    12
    Thank you so much Sebastian, looking forward to the next installment!

    -K2
     
  8. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Here's the next one, K2mia :)

     
    Matt-Face likes this.
  9. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode 07 starts looking at endless terrain generation:

     
  10. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode 08 continues the endless terrain generator and adds threading.
     
  11. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    110
    Loving this series, thanks Sebastian!
     
  12. Hoarmurath

    Hoarmurath

    Joined:
    Mar 22, 2016
    Posts:
    27
    Great series, but is it possible to replace color with materials like grass and stone?
     
  13. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    I'll be working towards adding this in the future, Hoarmurath. Glad you're enjoying, muzboz!

    Episode 09 is now out, covering LOD mesh switching based on distance from viewer.
     
  14. lovelyUnity

    lovelyUnity

    Joined:
    Mar 10, 2016
    Posts:
    30
    Will you comment each line of code in order to fully explain it? At least for the first video in the YouTube series?
     
  15. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode 10:



    I'll see about adding comments to the code sometime in the future, lovelyUnity.
     
  16. PixelShare

    PixelShare

    Joined:
    Aug 15, 2015
    Posts:
    2
    Hi Sebastian,

    Great tutorial!

    One small thing, I can't seem to find the moment when you added the quad. Do you have to do something with it or just has to be created and the code takes care of it?
     
  17. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Hi PixelShare, it's probably a bit late to be answering this, but you need to create it and assign it to the textureRender variable MapDisplay class in the inspector.

    Episode 11 is out:
     
  18. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Episode 12 is out. It focuses on fixing a lighting issue along the edges of the mesh chunks.
     
  19. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    2,879
    Bookmarked. Looks like a nice tutorial. KUTGW!
     
  20. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    This is a great resource for a lot of devs! Thank you! :)

    Also, will you ever do a tutorial on populating the map with stuff like trees, rocks, etc? I'm sorry if you've mentioned this in any of the videos. I haven't watched all of them yet.
     
  21. nilssanderson

    nilssanderson

    Joined:
    Dec 11, 2013
    Posts:
    1
    Amazing series.

    I have started playing about with randomly adding items (trees etc) but have not yet worked out what to place where (don't want to place trees in the water).

    Looking forward to seeing how these should be done properly.

    Keep up the great work SebastianLague.
     
  22. SebastianLague

    SebastianLague

    Joined:
    Aug 31, 2014
    Posts:
    111
    Thanks everyone, glad you're enjoying. I released episode 15 yesterday:
     
  23. YourFutureHero

    YourFutureHero

    Joined:
    Aug 6, 2014
    Posts:
    2
    One of the best series I have ever watched. I have learned so much from your tutorials. I appreciate your hard work! Keep it up! Thank you!!!
     
  24. harshie55

    harshie55

    Joined:
    Sep 7, 2018
    Posts:
    4
    Hi Sebastian,
    Bit late but I'm wondering what the purpose of procedural land mass generators are? I know they create infinite worlds through but are the worlds interactive at all? I was planning on following the tutorial and adding little things to the world's like mini games or animals that the player can interact with. Is this possible with the tutorial? So I use it to make the worlds like in the images you posted and add the other things myself?

    Is that possible?

    Thanks a lot!
    Harsh
     
  25. harshie55

    harshie55

    Joined:
    Sep 7, 2018
    Posts:
    4
    So essentially my question is asking if you can edit the randomly generated worlds in that each world has trees, and environment or different types of terrain (snow/forest). Nothing to complex, just something different.

    Kind regards,
    Harsh
     
  26. mitchellpelser

    mitchellpelser

    Joined:
    Jan 26, 2020
    Posts:
    1
    Has this project Died off would love for more to come out.
     
  27. elitglad

    elitglad

    Joined:
    Feb 16, 2020
    Posts:
    4
    Last edited: Feb 17, 2020
  28. Steelshot

    Steelshot

    Joined:
    Feb 24, 2015
    Posts:
    102
    For those who are still watching this thread and saw he stopped posting at episode 15, he actually has six additional episodes on his channel! Check them out :)
     
    StevenPicard likes this.
  29. uayush122

    uayush122

    Joined:
    Jan 14, 2021
    Posts:
    1
    Amazing shots! thanks mate!
     
  30. waniakays

    waniakays

    Joined:
    Feb 22, 2021
    Posts:
    2
  31. GandalfTheGreyt

    GandalfTheGreyt

    Joined:
    Aug 7, 2021
    Posts:
    1

    Unity says that there is an error about this line, but it matches what you have in your editor.

    for (int x = 0, x < mapWidth; x++)

    error : Assets\Scripts\Noise.cs(15,31): error CS1525: Invalid expression term '<'

    I can tell that it is saying that there is something wrong with the <, but im unsure as to what is wrong. Any Guesses?
     
  32. Amatakaze

    Amatakaze

    Joined:
    Mar 28, 2020
    Posts:
    1
    for (int x = 0, x < mapWidth; x++)

    you put a comma at int x = 0 instead of a semicolon bro