PROJECT / 2024 / LINKÖPING UNIVERSITY
Interactive Solar System Simulation
Blender add-on that simulates planetary orbits using Euler approximation, with keyframe animations, procedural shaders, and a sidebar UI for building custom solar systems.
- stack
- Blender · Python · NumPy · Blender API (bpy) · Euler Method
How it works
bodies
planets and moonsEuler
NumPy integration loopkeyframes
every 100 stepsBlender
animated orbits

01 / Overview
A Blender 4.0+ add-on, made for the TNM085 Modelling Project course by a team of four, that models planetary orbits around a sun using Euler integration. Planets are created as UV spheres with procedural noise-based materials or mapped textures for the eight real planets. The simulation runs in two modes: standard (only sun gravity) and advanced (N-body with inter-planet gravitational forces). Results are baked into keyframe animations so you can scrub through the timeline or render the orbits directly in Blender.
02 / Key features
- –Euler integration: calculates orbital positions step-by-step using gravitational acceleration from the sun, with a fixed 300-second time step and a configurable simulation length in years
- –Preset planets: Mercury through Neptune with real aphelion distances and masses; each body starts at the circular orbital speed for its distance, √(GM/r)
- –Advanced N-body mode: toggles inter-planet gravitational forces on top of sun gravity, which gets expensive fast with more planets
- –Procedural materials: custom planets get noise-based shaders through a color ramp with random colors, while preset planets load actual texture maps
- –Sun shader: emission-based material with noise textures and a cardinal color ramp for that fiery look
- –Keyframe baking: simulation results are written directly to Blender keyframes, so orbits play back in the viewport timeline
03 / Challenges
- –Shader node names changed in newer Blender versions, so the material code had to be updated to match
- –The advanced simulation scales quadratically — every planet pair needs force calculations each timestep, and with 300-second steps over simulated years, that adds up
- –Long simulations: the whole run happens synchronously on Blender's main thread, so Blender is busy until it finishes
04 / Solution
Built as a standard Blender add-on with register/unregister hooks and a custom N-panel. The physics uses a CelestialBody base class with Planet and Moon subclasses, NumPy arrays for position/velocity/acceleration vectors, and Euler integration in a tight loop. Positions are sampled every 100 steps and converted to keyframes after the simulation finishes. While it runs, a flag replaces the panel with a “Running simulation, please wait” message.
05 / Outcome
The add-on installs into Blender's sidebar and lets you build a solar system from scratch or use real planet presets, run the simulation, and get a playable animation out of it. The standard mode is the quick one. The advanced mode adds gravity between the planets but can take a long while depending on planet count and simulation length — the README warns you to save your project and keep a backup first, which about sums it up.