Solar System

By Lucia Kim

This showcase is an augmentation of Assignment 6 - Shader Pipelines to create a Solar System simulation. Extending beyond the Earth and Moon setup, I implemented a Sun with its 8 orbiting planets. This simulation attempts to replicate other planetary characteristics, including Jupiter’s stripy pattern, Earth’s land and water textures, and Venus’s retrograde rotation!

Note that the planets are not to real-life scale as they would have been way too small relative to the Sun. Instead, I tried to maintain a consistent relative scale and orbital ordering.

Code Changes ../src/model_planets.glsl: A modified version of model.glsl. This file manages the orbital mechanics, calculating the translation (orbit radius), rotation, and uniform scaling for the Sun and all eight planets based on a unique planet_id.

../src/solar_system.fs: A modified version of planet.fs. This handles the procedural texture generation, applying specific Perlin noise configurations, colour palettes, and material properties distinct to each celestial body. main.cpp: Modified the render loop to iterate nine times per frame (drawing the Sun and 8 planets) and pass a planet_id uniform to the shaders. I also adjusted the camera parameters to provide a better view of the solar system.

../data/solar.json: A new configuration file created to assemble the pipeline with the custom solar system shaders.

Acknowledgements

No external models or materials were used.