This Add-on simulates planets in a solar systems according to Kepler’s laws of planetary motion. You set the orbit parameters via the physics-tab and the Add-on will calculate the orbit of the planet for you. Lengths are scaled down so that everything fits inside the scene, time can be animated to speed up or slow down the simulation.
A custom driver animates the planets, it works only when the Add-on is enabled. You can also bake the simulation, the driver will then be replaced by keyframed animation.
Version 0.7 for Blender 2.8, last updated 2020-07-03T00:00:00Z:
SolarSystemSimulator.zip (25.7 KB)
Also available on Github:
Overview:
The Addon creates panels in three different areas:
For global adjustments (time and dimensions) there is a panel in the scene-tab:
- Animate the simulation time with keyframes.
- Scale down lengths (because the real solar system is huge) and speed up time (to compress years into seconds).
- Enable drawing of orbits in the 3D-Viewport.
For the objects there is a panel in the physics-tab:
A simulated object is either a center a planet or a surface.
- a center object is the basis of the solar system (like the sun),
- planets orbit around this center (like the Earth) or around other planets (moons),
- surface objects are the visible shell of the planets, they are just parented meshes which move and rotate with their planet.
For centers and planets you can
- set the mass of the center which is used to calculate the orbital period of the planets,
- change the size, shape and orientation of the orbit (only for planets),
- let the object to rotate around its axis and tilt the axis with respect to the orbital plane,
- bake the simulation to animation curves that work without the Add-on enabled.
There is also a panel in the 3D-Viewport sidebar (in the Tool-category) with some useful operators for quickly making solar systems.
How to let Earth orbit around the Sun
- Install the Add-on, in Blender you will find it in the Object-category.
- The drivers and simulation time animation have to be setup first. In the 3D-View go the the sidebar on the right, there is a panel in the Tool-tab titled “Solar System Simulator: Tools”. Click the buttons labeled “Add Simulation Time F-Curve” and “Update Drivers”.
- Now we can start with the solar system. In the toolbar click the “Create Center”-button and in the popup window set the name to “Sun”, “Mass (kg)” to 2 with “Mass Exponent” set to 30 (the Sun’s mass is about 2*10^30 kg). The Sun needs about 25 days for one rotation around its axis, set “Rotation Period (in seconds)” to 25 * 24 * 60 * 60, Blender will do the calculation. Also enable “Create Surface” and set “Radius (in km)” to 6.955, “Radius Exponent” to 5 (the Sun’s radius is about 695,500 km). Then click “OK”.
- The operator will create an empty (named “Sun”) together with a Mesh-Sphere (named “Sun_surface”). Now we add the Earth. Make sure the “Sun”-Empty is selected and use the “Create Planet”-button from the toolbar.
- In the popup window the “Center” property will be set to the active object (in this case “Sun”). Set the name of the planet to “Earth”. The Earth’s mass is about 5.9810^24 kg, the distance from the Sun is about 149.6 million km (149.610^6 km). The Earth’s rotation period is 1 day = 86,400 seconds and its radius is 6,370 km (= 6.37*10^3 km). Click OK and a new planet far away from the Sun will be created, you have to zoom out to see it.
- When you start the animation (spacebar) the earth will orbiting around the sun. You can also enable the “Draw Orbit” property in the toolbar to see the orbit.
- To refine Earth’s orbit select it (the empty, not the mesh Earth_surface) and go to the physics-tab. Make the orbit slightly elliptic by setting eccentricity to 0.02 in the “Orbit”-section of the panel. Also the rotation axis of the Earth is tilted by 23.4°, in the “Rotation”-section adjust the “Axis Tilt”-property.
- At this scale the earth is really hard to see. To make it bigger you can go to the scene-tab and increase the “Planet Size Multiplier” to 10-100. This will artifically increase the radius of the surface without changing the distance between the Earth and the Sun. You can also change the scale of the solar system with the “Length Exponent” setting.
- To add more surfaces to the Earth (e.g. a cloud layer slightly bigger than 6,370 km) use the “Create Surface”-button from the Toolbar.
- If you want to save the orbit within the blend-file, use the “Bake All” operator from the toolbar. It will create location and rotation F-Curves for every simulated object.
Using information from Wikipedia and NASA I setup the 8 planets in our solar system:
Planets.blend (304.6 KB)
Useful Links
Information about orbits and planets from Wikipedia:
https://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion
https://en.wikipedia.org/wiki/Orbital_elements
https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System
More exact numbers for the orbital elements of planets in our solar system:
https://ssd.jpl.nasa.gov/?planet_pos
Textures:
http://planetpixelemporium.com/planets.html
http://visibleearth.nasa.gov/view_cat.php?categoryID=1484