Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

planet generation

Discussion in 'Scripting' started by ariusdb222, Mar 13, 2015.

  1. ariusdb222

    ariusdb222

    Joined:
    Jan 25, 2015
    Posts:
    88
    Hey everyone, decided i'm going to try something new...
    My latest involves generating a massive planet using procedural noise and texturing...
    My question to all the geniuses on here, how do i go about generating the planet in the first place?
    Can I use a Sphere? but then i will probably need some sort of gravity?
    Or would a some sort of mesh work better?

    Any help is appreciated!:)
     
  2. L-Tyrosine

    L-Tyrosine

    Joined:
    Apr 27, 2011
    Posts:
    305
    Your first and best direction (imo) would be geodesic sphere displaced with a 3D perlin noise along vertex normals. Increase fog on planet proximity to emulate atmosphere (if any).

    That's what I'm using here

     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    I recommend checking out some videos about how they do it in KSP. Most of the second half of this talk is about planet generation.
     
    Last edited: Mar 16, 2015
  4. ariusdb222

    ariusdb222

    Joined:
    Jan 25, 2015
    Posts:
    88
    Thanks for the reply, how exactly do i make a geodesic sphere??
     
  5. ariusdb222

    ariusdb222

    Joined:
    Jan 25, 2015
    Posts:
    88
    TY, was very informative. Gave me a few ideas:p
     
  6. ariusdb222

    ariusdb222

    Joined:
    Jan 25, 2015
    Posts:
    88
    After some digging and examples, I want to try the method where you map a cube to a sphere..
    Does anyone know how this can be done??
     
  7. ariusdb222

    ariusdb222

    Joined:
    Jan 25, 2015
    Posts:
    88
    Ok i got the cube mapped to a sphere and it is subdivided...
    Another question, how can i implement noise to only generate on top of the mesh and not reshape the entire mesh?