What would happen if a scaled-down version of the Earth, the Sun or a black hole fell into a pool of water? It's a fun little experiment and also a showcase of some improvements of the renderer in version 0.8 - the raymarcher can now render mirror reflections and refractions in a (semi)realistic way.
These simulations have 2M particles, mostly used for the water. The block of water does not fit into the boundary exactly, hence the initial splash. I'm hoping to improve this in the future...
2025-05-05 19:54:13 +0000 UTC
View Post
One of the most requested features is an option to run the simulation on the GPU. It's certainly a good idea. While there are a lot of obstacles to overcome and a number issues that come with GPU programming, the benefits can be clearly seen in the video above.
I want to add a basic GPU solver in version 0.8. The initial implementation should be able to do the following:
As you probably heard, the flight of Starship 7 didn't go exactly according to the plan. The spacecraft exploded, creating numerous fragments and providing a spectacular visual show for the inhabitants of the Turks and Caicos islands.
While this isn't very good news for SpaceX, it gave me an idea for a new simulation. SpaceSim can already simulate a break-up of rigid objects using its cohesion model...
2025-01-19 00:11:29 +0000 UTC
View Post
SpaceSim uses the classical, non-relativistic theory for the gravity simulation, governed by the Newton's law of universal gravitation. The only exception is the relativistic orbital decay, implemented as a small correction on top of the Newtonian gravity simulation.
The reason why the orbit of massive objects (neutron stars, black holes, etc.) shrink over...
2024-12-27 14:00:10 +0000 UTC
View Post
A new update adds more simulation options, improves shadow rendering, allows objects to pass through wormholes, and much more.
The update is available to all Patrons. You can download it in the patron-only channel on Discord.
Shadows for the real-time renderer
The rendering of shadows has been completely rewritten, as described in the previous
2024-11-16 13:00:06 +0000 UTC
View Post
The upcoming version 0.7 adds a new simulation option - viscosity. It represents the internal friction caused by the movement of particles. Although this effect is not very important in planetary simulations, it can significantly affect the solution at smaller scales (i.e. in simulations of small asteroids) or when using materials with a much higher value of dynamic viscosity.
The SpaceSim solver implements the viscosity according to the paper
2024-10-26 16:40:58 +0000 UTC
View Post
This video explores a hypothetical scenario where a stray black hole makes a close approach to Earth. The mass of the black hole gradually increases from 0.5 M_Earth to 10 M_Earth, causing more and more chaos in the simulation.
Note that the black hole appears much larger than it should be, for visualization reasons. If given realistic parameters, it would be completely invisible at this scale.
2024-10-04 12:00:00 +0000 UTC
View Post
Recent updates have made the real-time renderer much more realistic, thanks to improvements like the surface smoothing, specular textures, and gas particles. However, there are still issues that sometimes cause strange artifacts. The two biggest offenders are shadows and depth buffer precision. I would like to improve both in the next version.
Logarithmic depth buffer
The real-time renderer is a standard OpenGL rasterizer, rendering particles as quads and handli...
2024-07-21 12:00:12 +0000 UTC
View Post
A video showcasing gas particles added in update 0.6. Planets with high-density core and low-density mantle collide and merge together, creating ring of gas around the merger. And in some cases, a moon!
2024-06-17 12:00:09 +0000 UTC
View Post
New version adds gas particles, a material editor with customizable emission and opacity curves, textured meshes, anti-matter, and much more.
The build is available on Discord for all Patrons.
Gas rendering
The rendering of gas particles has been completely overhauled. Even though it was previously possible to create gas clouds or galaxies, particles could not a...
2024-06-07 12:00:10 +0000 UTC
View Post
We often need to follow a specific object during the simulation, or in other words, track its position with the camera over a period of time. How to do it?
The problem seems easy to solve at first, but gets progressively more difficult when one starts thinking about the specifics. Why? It ties into a fundamental philosophical problem of identity.
Tracking an object? What object?
In SpaceSim, an object is simply a collection of particles that overlap one another. A user can...
2024-04-29 10:00:11 +0000 UTC
View Post
The current version of SpaceSim can add a texture which is mapped to the surface of a sphere. This works well for sphere-like objects, but creates visible distortions when the shape is significantly different from the sphere.
I'm adding additional options for texture mapping, including support for texturing coordinates loaded from user-provided mesh objects, such as .obj or .gltf files. This way, it's possible to load not just the shape but also the materials from the mesh files.
2024-03-03 11:38:47 +0000 UTC
View Post
This is one of the most frequent questions people ask, so I thought I'll go a little more in-depth and explain how the simulation speed works, how to control it, and most importantly, why you cannot simply set the time step to an arbitrarily large value.
What is a physical simulation anyway?
Reality is complex. Planets are made of a bajillion atoms and undergo processes lasting from a fraction of a second to billions of years. To be able to simulate planets and other objects usi...
2024-02-27 07:00:06 +0000 UTC
View Post
Some experiments with the cloud object and stellar wind. The radiation pressure needs improvement on the simulation side, but still can make nice results.
2024-02-12 07:00:08 +0000 UTC
View Post
A major update that improves the real-time renderer, adds collisions of rigid objects, makes the simulation history better, and much more.
The update can be downloaded exclusively on Discord.
Screen-space surface smoothing
This is by far the biggest improvement in this update. It significantly enhances the image quality by making the texture mapping continuous across the surface. The smoothi...
2024-02-04 13:57:52 +0000 UTC
View Post
I'm back with another development update. Introducing Screen-space Surface Smoothing (SSSS) - a great feature of the real-time renderer with the best acronym.
What's this about?
A major difference between the real-time renderer and the raymarcher - apart from speed - is the visual smoothness of the surface. While the raymarcher maps the surface texture continuously, the real-time renderer is currently much simpler and simply textures each particle separately and independently fr...
2024-01-15 07:00:04 +0000 UTC
View Post
Definitely the longest video I made. A group of 100 asteroids is placed inside a periodic boundary and given random velocities. Will they cluster into a single large planet or fragment into thousand small pieces? Place your bets.
The simulation took about two days to compute and render with raymarcher.
2024-01-08 08:00:04 +0000 UTC
View Post
The next version of SpaceSim will have an improved handling of interactions between various objects in the simulation. How does it work?
Collision handling
One of the additions to this version is a solid boundary (previously only a periodic boundary was available). For this reason, the simulation has to handle collisions between:
- Two particles (handled by the IISPH solver)
- A rigid (non-deformable) object and a particle
- Two rigid objects
- A p...
2023-12-26 09:00:06 +0000 UTC
View Post
The video shows the collision event that led to the formation of the Moon. It mostly uses the "Origin of the Moon" preset, except it's simulated with 3 million particles and a custom camera path.
It nicely shows some of the features from the latest update, such as the physically based bloom and particle shadows.
2023-11-20 08:00:07 +0000 UTC
View Post
Another update is here! It comes with a handful of rendering improvements, better time step calculations, Roche limits, and much more.
As usual, it can be downloaded from this Dropbox link.
Bloom
The bloom effect has been completely reworked, replacing the previous Gaussian filter with the new physically based bloom, resul...
2023-11-13 08:00:04 +0000 UTC
View Post
Hello everyone,
What is your favorite kind of simulation? What would you like to see in a video? Vote and let me know in the comments. Multiple options are allowed.
2023-11-07 08:00:03 +0000 UTC
View Post
This video is mostly a showcase of the light bending effect. There are two black holes orbiting the common center of mass on highly eccentric orbits, each having an accretion disk made of 1M particles.
While it's still not perfect (black holes don't have the event horizon in the current model, for example), it already makes captivating animations. The model even allows for complex light paths where the light is bent by both black holes - notice the image of one black hole disto...
2023-10-30 08:00:03 +0000 UTC
View Post
Black holes are arguably the most fascinating objects in the universe. Even though we can't see them directly, we can see the influence they have on the light passing around them, as they bend the spacetime and change the direction of light rays.
SpaceSim currently does not do a very good job rendering black holes. Using the raytracer, they are simply rendered as black opaque spheres. I wanted to improve the appearance of black holes and make it as realistic as possible, while also make...
2023-10-23 07:00:04 +0000 UTC
View Post
Next major update will include improvements to the bloom effect - the glow around stars and other hot objects.
Previously, the glow was done by a simple Gaussian blur of the pixels containing hot particles. This meant the radius of the glow was only a few pixels and independent of the particle intensity, making it very localized and simply unrealistic. In the new version, the existing filter is being replaced with a physically based bloom, based on 2023-10-16 07:00:04 +0000 UTC
View Post
A big update - asteroid cohesion, astrophysical jets, particle stabilization, motion blur and antialiasing, and a lot of bug fixes.
The build can be downloaded from Dropbox using this link.
Asteroid cohesion
Previously, the solver used strictly frictionless particles, behaving as an ideal incompressible fl...
2023-10-05 07:00:02 +0000 UTC
View Post
The next version of SpaceSim will include a few useful improvements to the "raytracing" renderer, including antialiasing and motion blur. This will make the simulations look much more dynamic and cinematic, especially with fast moving particles.
Here is a quick preview of what a simulation with motion blur looks like.
2023-09-28 19:36:01 +0000 UTC
View Post