This repository is a hypothetical galaxy in which planets orbit the Sun.
demo4.mp4
The sun uses a 3D sphere model created with the program on 3DModelEditor.
Applied two noise textures to the model and offset them over time.
Also placed a large, flat 3D plane model at the center of the sun, facing the camera, and applied a shader to that plane model to simulate solar flares.
The rogue planet was created using 3D models generated by performing a Voronoi tessellation on a sphere using the program on the voronoi_generator.
It appears every 20 seconds, explodes with a flash of light, and sends debris flying in all directions.
The flash is rendered using TextureAtlas, and the positions of the scattered 3D models are calculated using curl noise.
The 3D models listed above were created using a program from the TerracedTerrainModel.
A Planet Teeming with Greenery.
A planet that is always covered in snow.
Parent a 3D model of a transparent sphere—slightly larger—to the planet, and by applying a shader to that larger 3D model to create the appearance of white clouds over the planet.
An earth-like planet.
A planet made of sand and rock.
It orbits, with rock fragments trailing behind and ahead of it.
The fragments, like the rogue planet, were created by performing a Voronoi tessellation on a sphere.
A planet made of ice.
The planet's rings were created by arranging particles generated from panda3D's GeomPoints in concentric circles using the programs on shapes.
A planet whose landmass is covered in cherry blossoms.
It has a comet-like tail.
The comet's tail is rendered using panda3D's MotionTrail.
- Panda3D 1.10.16
- Cython 3.2.3
- numpy 2.2.6
- scipy 1.16.2
- shapely 2.1.2
- matplotlib 3.10.7
- opencv-contrib-python 4.11.0.86
- opencv-python 4.11.0.86
- Python 3.13
- Windows11
git clone --recursive https://github.com/taKana671/VirtualPlanets.git
If you do not build the Cython code, Python code will be used to generate noise.
Python code takes longer to generate noise than Cython code.
cd VirtualPlanets
python setup.py build_ext --inplace
If the error like "ModuleNotFoundError: No module named ‘distutils’" occurs, install the setuptools.
pip install setuptools
python virtual_planets.py
Drag the mouse to change the camera's orientation.