Skip to content

About

Project: Fundamentals of Computer Graphics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

SolarSystemSimulator

The project presents the development of an educational and interactive simulator of the Solar System, built in Unity3D and designed to combine scientific accuracy with an immersive experience.

overview

The system enables the exploration of celestial bodies through two operational modes: a static mode for observing planetary configurations, and a dynamic mode for simulating orbital mechanics, featuring time management and adjustable speeds.

NBody Mode

Users can explore space via a spacecraft equipped with a Heads-Up Display (HUD), accessing astronomical data and navigating among 11 celestial bodies: Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto. To address the complexity of representing cosmic scales, the simulator integrates advanced navigation systems and utilizes high-precision astronomical data provided by NASA/JPL Horizons.

Project Information

  • Course: Fundamentals of Computer Graphics, University of Brescia
  • Author: Jennifer Piangatelli
  • Objective: Astronomical simulation of the Solar System in Unity3D

Supporting Documentation

For further technical and scientific details, please refer to the dedicated documents:

Main Features

  • Orbital Physics: Leapfrog numerical integration, with N-Body and Central-Body support.
  • Real-World Data: Ephemeris importation from NASA/JPL Horizons.
  • URP Rendering: Optimized graphics pipeline featuring post-processing and dedicated cameras.
  • Immersive Experience: Spacecraft with HUD, time control and teleportation mechanics, soundtracks, and Sci-Fi styled user interfaces.

Technologies and System Requirements

Development Environment

  • Unity Editor: 2022.3.32f1
  • Render Pipeline: Universal Render Pipeline (URP) 14.0.11
  • IDE: VSCode
  • Language: C#

Technologies Used

Reference Hardware (Target)

The project was developed and tested on the following hardware configuration, ensuring stable performance with default graphical settings:

  • Laptop: Victus by HP Gaming Laptop 15-fa0xxx
  • CPU: Intel Core i7-12700H (14 cores, 20 threads)
  • Dedicated GPU: NVIDIA GeForce RTX 3050 (4 GB GDDR6)
  • Integrated GPU: Intel Iris Xe Graphics
  • RAM: 16 GB DDR4-3200 MHz
  • OS: Windows 11 Home, 64-bit

Installation and Usage

Installation

  1. Open the project using Unity 2022.3.32f1;
  2. Wait for the restoration of the URP, TextMeshPro, and Timeline packages, along with standard dependencies;
  3. Ensure that files within the Resources folder remain accessible, as the loader utilizes Resources.Load;
  4. Open Assets/Scenes/SplashScreen.unity or Assets/Scenes/GameScene.unity.

Required Configurations

  • Astronomical data must be located in Assets/Resources/ephemerides.json;
  • Planet icons must be located in Assets/Resources/Icons;
  • Prefabs assigned to the PlanetPresetLoader must remain correctly referenced;
  • Scenes must be included in the Build Settings if a standalone build is desired.

Starting the Simulation

  • The initial scene is SplashScreen;
  • The splash button loads MainMenu;
  • The Play button in the menu loads GameScene;
  • Within GameScene, the loader initializes the celestial bodies and the UI.

Main Controls

  • The immersive player experience is ensured through the adaptation of the spacecraft flight logic found in Spaceflight Controls;
  • Commands for space exploration and cursor utilization are available in MainMenu --> Controls;
  • Play: Restores simulated time and re-enables physics;
  • Pause: Freezes simulated time while preserving the previous speed state;
  • Time slider: Adjusts timeScale on a logarithmic scale;
  • Planet buttons: Select the celestial body, update the HUD, and teleport the spacecraft via Teleport;
  • Overview button: Displays a comprehensive view of the solar system and teleports the user to the overview area.
  • SpaceOriginManager resets the player to a safe position upon exceeding a specific threshold, necessitated by the vastness of the simulated space;
  • PlanetLabel displays the name and distance from the Sun in screen-space;
  • The SecondaryCamera provides an additional viewport on CameraTexture.

References Used

The following are all references utilized during development: ranging from official documentation to tutorials, forums, and external assets.

NOTE:

The information listed below is detailed within the notes.txt files located in the project directories and within every summary provided at the top of each script created or adapted for the simulation.

Primary Reference Documentation for Project Development

  • Universal Render Pipeline for advanced Unity creators
  • Unity User Manual
  • NASA/JPL Horizons Sources

Tutorials

  • Sun Customization
  • Emissive Material in Unity URP
  • Bounciness Materials
  • Splash Screen Tutorial
  • Music Player Tutorial: Creating a Splash Screen & Music between Scenes
  • Main Menu Turorial: Make Your MAIN MENU Quickly! | Unity UI Tutorial For Beginners
  • Output Secondary Camera --> Render Texture

Code Sources

  • SunLight
  • EphemeridesLoader, Ephemeris, HorizonsDataImporter
  • PlanetPresetLoader
  • SpaceOriginManager
  • GeneratePlanetOrbits
  • RenderUtils
  • Teleport
  • SolarSystemPhysics
  • TimeController
  • PlanetHUD
  • PlanetLabel

UnityAssetStore

  • Planets of the Solar System 3D
  • 30 Sci-fi Space Tracks Music Pack
  • Simple Space starter kit
  • Planet Icons
  • Spaceflight Controls
  • Unity Asset Store, Sci-Fi GUI Skin

Future Developments

  • Replace static datasets with dynamic access via the JPL Horizons API to retrieve real-time astronomical data, thereby reducing reliance on local files and improving simulation efficiency and accuracy;
  • Extend the scientific validation of the simulation by incorporating a greater number of celestial bodies and conducting analyses over extended temporal arcs;
  • Enhance numerical precision management by introducing supplementary strategies alongside selective rebasing for simulations conducted on broader spatial scales;
  • Implement more comprehensive models of celestial bodies, including axial rotations with authentic periods and inclinations;
  • Introduce novel visualizable scientific parameters, such as orbital energy, eccentricity, and further dynamic information;
  • Improve the integration of spatial control systems and the modified Spaceflight Controls scripts, encompassing a potential evolution towards a first-person cockpit view and a more accurate secondary camera;
  • Increase the level of visual realism through advancements in graphics, materials, lighting, and the rendering of celestial bodies.

Conclusions

The project delivers a simulation of the Solar System that coherently integrates three distinct layers: numerical physics, software architecture, and URP graphical rendering. The codebase exhibits a modular architecture wherein astronomical data is imported from HORIZONS, converted into dynamic presets, utilized to instantiate GameObjects, and ultimately updated by a Leapfrog engine featuring time control decoupled from the frame rate. The outcome is an educationally robust system, wherein the most significant aspect is not merely the visualization of the Solar System, but rather the technical justification of the design choices: double precision, sub-stepping, dedicated Lunar management, URP post-processing, rapid-selection UI, and experimental validation grounded in real-world datasets.

About

Project: Fundamentals of Computer Graphics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages