Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

WIP - Procedural Solar System Generation ( University Project )

Discussion in 'Works In Progress' started by Exsert, Dec 27, 2015.

  1. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Hello!

    I am currently working on a university project (bachelors project) And have chosen to develop a Procedural Solar System Generator (Still working on a nice name)
    There's only so much time my supervisor can give to help me with this project and it being a busy time starting January, He has recommended me to try and get feedback!

    Here are some gifs of it so far: Link1 | Link2 | Link3

    Main Features:
    Randomly generated planets around a star of random mass
    Working planetary Physics (everything affects one another)
    Asteroids
    LOD on planets ( needs some work )
    Shaders for atmosphere, water, lighting etc...

    So things i need to work on still:
    Increase in variations of planets
    Refine the planet generation to look more planet...(ish?)
    Improve the LOD distance check to stop obvious Z Fighting
    General performance improvement
    Basic collision checking and destruction

    So what i am hoping to get from the feedback you give (hopefully) adding more realism to this solar system generator. My supervisor thinks this is plenty to hand in but i am really enjoying this project and feel like i could push this further. So would really appreciate help with that.

    One thing i know i need to work on is proportions, i'm not sure the best way to go about this so any advice would be greatly appreciated!

    If you are willing to help me more and would like to keep in contact feel free to PM me!

    Please post if you are happy for me to possibly write about your feedback in my write up.

    I Appreciate your feedback!

    Edit:

    Added some screenshots of the planets themselves from smoothest to sharpest.

    Smoothest
    Inbetween
    Sharpest

    Edited planets again

    Smoothest : Here
    Inbetween : Here
    Sharpest : Here
    In Solar System : Here
     
    Last edited: Dec 29, 2015
  2. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    191
    Pretty cool project.

    To get better proportions you should always keep in mind that space is mainly vast. Even when Planets and stars are huge they are millions of miles away. Also planets are mostly smooth. I think your planets would look much more realistic if they where more smooth.
    But its also a nice toony art style as it is now.
     
    Exsert likes this.
  3. mathias234

    mathias234

    Joined:
    Sep 9, 2012
    Posts:
    239
    It would be cool if those planets could collide, just saying :p
     
    Exsert likes this.
  4. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Indeed they are, but annoyingly using proportions that were closer to reality everything was so far apart it just didn't look like correct, the star being 100x the size of a planet but roughly 25,000x (the planets radius) away from the star meant if you were looking at the star you couldn't see the planets but if you looked at the planets you couldn't see the stars.
    Been trying to figure out a way to work around this but just haven't been able to get it quite right yet.

    But about the smoothness of planets, it's true they do need to be smoother and i need to work on a better representation of water ( as it is just a textured sphere around a planet depending on the scale of the planet, i doubt i could add true water but i will need to work on it a bit)
    I shall attempt to get the planets smoother :)

    Thanks

    Haha yeah, i want to try and get collisions in, i have been thinking about using a similar method to this Link, kind of like accretion where when they collide the debris will be what forms into new planets moons and asteroids. what do you think?

    Cheers guys :)
     
  5. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Just thought i'd share this from my "Playground" Scene in unity, a binary star system generated no initial velocity, just using gravity :)

     
    mathias234 likes this.
  6. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    I've been working on trying to get a good min and max for smooth sharp planets
    Generated 10 smooth ones : Here
    Generated 10 Inbetween Ones : Here
    Generated 10 Sharp Ones : Here

    What do you think of those for min / max of variables? I'll make it so all the numbers are completely random to create anything inbetween the two limits :)

    Thought they looked a bit more realistic Let me know what you think!
     
    mathias234 likes this.
  7. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    191
    Looks better but i would try another version in which the landmass is only slightly higher then the Ocean(Maybe 1%) Depending on the resolution of the mesh you can procedural add sharp mountains if the camera is getting closer to the planet. =) Keep up the good work!
     
    Exsert likes this.
  8. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    I realised what you meant yeah the land is waaaay too high...
    So through changing the shader code etc... i've managed to get it a lot more shallow

    Generated 5 smooth ones : Here
    Generated 5 Inbetween Ones : Here
    Generated 5 Sharp Ones : Here

    And yeah, i'm working on the LOD stuff when you get closer but it is getting quite expensive.

    Because of the low landmass though i've had to make it a lot smoother (so it doesn't intersect the water plane) so it doesn't look as pretty but does look like more realistic landmass.

    Thank you for your help on this :)
     
  9. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Adding to this, I have taken a gif of it implemented into the solar system now!

    Plus i fixed my z fighting issue (was a rookie mistake and needed to have a larger near plane for the camera frustum)

    Here
     
  10. Lewnatic

    Lewnatic

    Joined:
    Sep 29, 2012
    Posts:
    191
    wow those planets look much better now! Pretty cool.

    Edit: Btw you could still use the not so shallow planet gens for asteroids.
     
    Exsert likes this.
  11. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Yeah much better :) thank you for the advice i had worked on it so long i didn't realise the mountains were making up half the planets haha.

    And don't worry the asteroids are still nice and lumpy!
     
  12. Exsert

    Exsert

    Joined:
    Oct 22, 2015
    Posts:
    42
    Sorry about this late update, i've been optimising the physics code getting it to run a larger amount then it currently is with great success at the moment, as i am wanting to fully be able to show off what a solar system could potentially look like (asteroids and all)
    this is with roughly 600 objects, next i will be trying to incorporate oct trees to potentially speed it up to 1000+ objects but so far it is going well!

    (in basic physics testbed and gif is limited at 15fps hence the it being a bit jumpy)
     
  13. Sleeper75

    Sleeper75

    Joined:
    Mar 13, 2013
    Posts:
    5
    Where did this go?? it looked fantastic!