A real-time 3D solar system simulation built from scratch using Vulkan API and modern C++17, featuring advanced graphics techniques including multi-pass post-processing, physically-based orbital mechanics and custom shader programming.
- Low-level Vulkan API implementation with complete graphics pipeline management
- Multi-pass rendering system post-processing and bloom effect (with HDR)
- Advanced shader programming including procedural noise, fBm, normal mapping, TBN matrix construction, PBRT
- Physically-based orbital simulation with hierarchical transformations
- Mesh generation for celestial bodies
- Modern C++17 with smart pointers, templates, and RAII principles
- Cross-platform build system using CMake and SPIR-V toolchain for shader compliation
- Solar System Simulation
- C++17 Compiler (MSVC, GCC, or Clang)
- CMake 3.10+
- Vulkan SDK (latest version)
- Git (for submodules)
# Clone with submodules
git clone --recursive https://github.com/yourusername/SolarSystem.git
cd SolarSystem
# Compile shaders (windows)
powershell .\compile_shaders.ps1
# Compile shaders (macOS / linux)
./compile_shaders.sh
# Build with CMake
mkdir build
cd build
cmake ..
cmake --build .# From build directory
./VulkanEngine
# With verbose logging
./VulkanEngine -vvvThe application implements a complete Vulkan rendering pipeline from scratch:
- Instance & Device Management - Physical device selection, logical device creation, validation layers
- Command Buffer System - Multi-threaded command recording with pool management
- Descriptor Sets - Efficient uniform buffer and texture binding
- Pipeline State Objects - Custom graphics pipelines for different rendering passes
- Swap Chain - Double/triple buffering for smooth frame presentation
- Memory Management - Custom allocators for device-local and host-visible memory
I have used a 3D noise function and fractal Brownian Motion (fBm) to generate a magma like effect for sun's surface. Its variable by time!
| fBm Magma effect |
|---|
![]() |
For sun I am also drawing a Glow Sphere. This sphere is rendered specially and Its always prependicular to the view. In this figure you can see the combination of effects for the sun.
We use two textures for day and night versions of Earth.
| Day Texture | Night Texture |
|---|---|
![]() |
![]() |
Using only these two textures for rendering Earth, we achieve:
Because our Earth model is made from an ideal sphere, the surface of Earth looks too smooth. In reality, mountains cast complicated shadows on the surface, and the shadow representation of bumpy geography adds realism to the texture.
Using a specular texture map, we can add specular reflection effects.
| Specular Map |
|---|
![]() |
With the specular map applied, we achieve:
Adding a cloud texture layer and generating shadows based on the direction of light, we achieve:
Orbits are planes rendered with an special fragment shader.
Skybox is created by creating a Cubemap texture. an special shader is then used to draw the skybox using the cubemap texture.
The bloom implementation uses:
- Glow extraction pass - Isolates bright regions above threshold
- Two-pass separable Gaussian blur - Horizontal and vertical 5-tap kernels
- HDR composition - Tone mapping with exposure control
- Ping-pong framebuffers - Efficient iterative blur passes
The program renders the scene to an off-screen framebuffer where each object is drawn using a unique solid color that represents its ID. When the user clicks, sample the corresponding pixel from this ID texture and decode the color to determine which object was selected.
Each celestial body follows Kepler's laws:
- Elliptical Orbits - Configurable semi-major axis and eccentricity
- Angular Velocity - Time-based position updates
- Hierarchical Transforms - Parent-child relationships (Earth-Moon system)
- Rotation & Revolution - Separate spin and orbit parameters
Smooth camera movement with:
- Orbit Controls - Spherical coordinate system (azimuth, elevation, distance)
- Target Following - Automatic transitions when selecting objects
- Cubic Ease-in-out - Smooth animation curves
- Mouse/Scroll Input - Intuitive user interaction
- Vertex/Index Buffers - Optimized mesh data with minimal duplication
- Uniform Buffer Objects - Per-frame and per-object data uploads
- Descriptor Set Pooling - Reusable descriptor allocations
- Pipeline Caching - Reduced shader compilation overhead
- Smart Pointers - Automatic resource cleanup, zero memory leaks
- RAII Principles - Exception-safe Vulkan object management
- Additional moons of planets (Moons of Jupiter, Saturn, etc.)
- Particle system for asteroid belt
- Atmospheric scattering and Fresnel effect.
- Handle Eclipse! 🌚
Built with passion for computer graphics and real-time rendering ⚡



















