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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Planet Flight Scenery Change

Discussion in 'Scripting' started by Vampyr_Engel, Oct 30, 2018.

  1. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Yes How do you do that? like say your near a planet from outer space and as you get near the planet or under planet cloud cover it changes into Dynamic Flat Terrain obviously a large Dynamic Flat Terrain how is that done?
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    That rather depends on how you set up your game. I've done a 'lunar lander' type game with a similar requirement. What we did was when you cross a certain distance (get closer than, say 10 km), you Switch to a new Scene that knows how to generate the Terrain based on the Parameters received. The important trick to avaid oscillating between scnenes is to make the revert back to the outer (far away / space) Scene only when after you increase distance by a different (greater) amount. 12 km worked for us. But in principle you load load high-detail Scenes and low Detail Scenes based on distance. The Advantage is that you at the same time can load an athmospheric flight model vs vacuum.
     
  3. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Yes well I would like to look at some example code as I have an idea of loading a level but not quite sure how that is done
     
  4. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Check out quill18creates on youtube.

    Look up project mighty spud, he does exactly that
     
  5. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Does He? OK I will check it out
     
  6. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    You can look up a technique called Quad Trees, used for planet terrain. It essentially creates more polygons by subdividing a part of the sphere as you approach it.
     
  7. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Thank you Quad Trees? I will look it up thank you