Previous Post

Update 0.4 - Changelog

Next Post
Update 0.4 - Changelog
DESCRIPTION

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, resulting in a glow with much larger radius and overall much more realistic look. The effect now also has additional parameters - the threshold, used to specify the minimum intensity of pixels contributing to bloom, and falloff, specifying how the bloom changes with radius.

Comparison of the previous bloom effect (top) with the new bloom (bottom).


Black holes

If you've read the previous update post, you already know about this feature. When using the raymarcher, black holes now distort the light emitted by particles and the background, making the black holes look much cooler than in the previous update.

Note that the light is only distorted by black holes, other objects do not contribute to it. It is also only enabled for the "raymarcher" renderer, the black holes rendered using the real-time renderer only distort the background, as before.

Accretion disk around a massive black hole


Shadows

There is another great improvement to the raymarcher - particles can now cast shadows. Unlike for the real-time renderer that only casts spherical shadows, regarless of the shape of the occluder, and only from the large bodies in the simulation, the raymarcher calculates shadows casted by individual particles. This allows shadows casted by ring particles on the planet's surface or fragments of collisions shadowing each other, which wasn't possible before.

If needed, the shadows can be turned off in the render settings.

Fragments of the moon collision casting shadows onto Saturn.


Cohesion for all shaped objects

Objects of all shapes can now simulate cohesion of particles, which was previously only possible for asteroids. It can be enabled in the object properties and adjusted using the same set of parameters as for asteroids - number of fault planes, activation strain and Weibull exponent. Cohesion is useful especially for simulations of man-made objects, such as spaceships, space elevators, Dyson spheres, etc.

Cohesion applied to a spaceship, a custom mesh object.


Improved timestepping

The integrator now has an option to predict collisions and adjust the time step accordingly. During high-speed collisions, the time step has to be much smaller to avoid particles passing through each other or causing instabilities of the solver. Previously, simulations with fast moving objects had to have a small time step for the entire duration, which made high speed collisions difficult to simulate. With collision prediction enabled, the time step is only decreased for the collision. During the fragmentation of the object and subsequent reaccumulation of fragments, the time step is much less restricted and the simulation speed can be substantially higher.

You can see how the adaptive time step works in the animation below. The simulation starts with a large time step, just before the impact it drops down to properly handle the high-speed particle interactions, and then it's gradually increased again.

The adaptive time step can be enabled using the 'Predict collision' switch in the simulation settings. Note that the collision prediction comes with a small performance penalty, although it shouldn't be more than 1-2%.

A small planet colliding with Jupiter at 0.5c.


Roche limit

The update adds a way to visualize the Roche limit - a region around a planet or a star where the orbiting body is unstable and is likely to be disintegrated by tidal forces. The Roche limit is not only a parameter of the planet, but also depends on the density of the satellite. For this reason, it applies to the currently selected object and changes when clicking on a different object. It appears as a transparent red sphere around all large bodies in the simulation.

Orbit outside the Roche limit is stable, the moon is only deformed by the tidal force of Jupiter. Inside the Roche limit, the tidal force becomes stronger than the self-gravity of the moon and it gets torn apart.


Camera selection and video parameters

There have been a few quality-of-life improvements regarding video recording. First, camera selection is now much easier. Previously, it was frustrating at times, because it was easy to lose the camera in space and being unable to select it to modify its parameters. This was improved in two ways:

  • The cameras now have a constant screen size, so it's much easier to find and select them.
  • Added buttons next to the timeline that allow to select the next or the previous camera.

Second, it's now possible to set parameters of the recorded video, namely:

  • Arbitrary render resolution. You can select between HD, 4K video, Youtube Short format, or user-specified video dimensions. By default, the video is rendered in Full HD (1080p).
  • Video quality and framerate. If needed, the quality of the JPEG compression and the framerate of the recorded video can be adjusted in render settings.

Handheld camera

A new type of camera has been added which allows setting custom camera paths. The path can be recorded by moving the camera around with your mouse, and the same camera path can be later replayed when rendering a simulation. This comes in handy especially when you want to render the same simulation multiple times, for example when comparing the realistic view with the velocity color mode. The camera has an optional smoothing parameter, which can be used to make the camera path more fluid and less jerky.

Comparison of handheld camera paths, showing the original recorded path (left) and the smoothed path (right).


Benchmark

The update added a simple utility which runs a benchmark simulation, measuring the total simulation time and the average frames per second. The measured values are then used to grade the performance of your CPU and GPU and recommend the number of particles to use for real-time simulations. It's a useful tool for comparing the performance of different hardware when running SpaceSim simulations.


Object library

If you're missing some planets, stars or asteroids in the current list, you can now create your own objects and save them to the object library. The saved objects will be available at the bottom of the object panel. They will remember the parameters, textures and meshes you used when creating them and you can easily add the objects into a new simulation. Note that the object library is persistent, the objects will remain in the library when quitting the app and will be available next time you start it, until you manually delete them with the 'remove' button.

An object can be added to the library from the 'Tools' menu. Saved objects are stored in folder %localappdata%/spacesim/objects/; if you manually put an object made by someone else into this folder, it will also appear in your object library.

Alternative periodic gravity solver

The update adds another solver for periodic boundary conditions, used when running cosmology simulation. The new solver is based on Fast Fourier Transform (FFT) and it's an alternative to the previous solver that uses Ewald summation. While the Ewald method is accurate for short-range forces and less accurate for long-range forces, depending on the settings (the resolution power and the opening angle), the FFT method is the opposite - it's accurate at long ranges, but less accurate at ranges comparable to the grid resolution.

More content

As usual, the update comes with several new presets:

  • DART is a recreation of the eponymous NASA mission, showing a collision of a kinetic impactor with asteroid Dimorphos. You can observe the change of the orbital period of the asteroid which roughly corresponds to the actual measured value (about 33 minutes).
  • Igniting stars shows a gravitational collapse of a molecular cloud into stars and the effect of stellar wind when the nuclear fusion ignites.
  • Contact binary replaced the previous asteroid preset. It's a simulation of a low-speed collision of two asteroids (made using potatoids) and a formation of a contact binary.
  • Sagittarius A* is a simple preset, mostly demonstrating the light-bending feature of the raytracer.
  • Spaceship Hit by Missile is pretty self-descriptive, it shows cohesion being used for custom mesh objects.

A new object has been added:

  • Added asteroid (216) Kleopatra, large but strangly shaped body.


Other improvements

  • More ring parameters. Planetary rings and accretion disks can now be elliptical instead of circular and you can customize the initial temperature of ring particles. The particle size is now automatically calculated based on the ring volume and the current particle count.
  • Added material selection for group objects (free group and orbiting group). All created bodies have their material randomly assigned from a list of materials. It's also possible to adjust selection probabilities of each material to make the material more or less frequent.
  • Added an option to stabilize planets and stars when using the SPH solver. The stabilization can take some time during which the app is unresponsive; this will be improved in future updates.
  • When simulating a star formation, stellar wind now starts up gradually, fixing the sudden 'kick' that particles got in the previous version.
  • Added option to select the texture of a planet or an asteroid from the list of embedded textures.
  • Raytracer now uses QRNG for antialiasing and motion blur randomization. Without going into details, it should improve the image quality without any performance cost.
  • The statistics panel now shows the estimated remaining time of the simulation, similarly to OpenSPH. The estimated time is based on the current run time of the simulation and the relative progress.
  • The panel now also shows the limiting time step criterion. This is useful to determine what makes the simulation run slowly or to debug simulation issues.
  • Added internal energy to color modes. Note that it is only used by the SPH solver.
  • Added optional spatial sort of particles, which should slightly speed up the simulations with "random" objects (clouds, rings and clusters).
  • Black hole evaporation. When selecting a black hole during the simulation, it shows the current rate of evaporation due to the emission of Hawking radiation.
  • Support for .gltf meshes. Both the ASCII format (.gltf) and the binary format (.glb) are supported.
  • Better .ply support. It's possible to load binary files and meshes containing quads.
  • Galaxy particles can now also contribute to the bloom effect.
  • By default, the camera is now locked during rendering, to avoid accidentaly changing the view. It can still be unlocked and moved freely if needed.
  • More improvements of the undo system. You can now undo changes of palettes, orbital elements and other UI controls.
  • SpaceSim now checks for updates on startup. When an update is available, a button is shown in the top right corner, which can be used to download the new build. This can be turned off in preferences if needed.
  • Added crash recovery. In case SpaceSim crashes, it now saves the current simulation setup and loads it the next time it is started. However, this only applies to some crashes. If the app crashes for example due to simulation instability, this crash is not currently recoverable.

Bugfixes

  • Singularity of orbital elements is now properly handled. Previously, the object with zero eccentricity would randomly jump around the orbit when changing the orbital elements. This is now fixed and the argument of periapsis is disabled in UI for circular orbits. Similarly, the longitude of the ascending node is disabled for objects with zero inclination.
  • Fixed interpolation of particles across the boundary when periodic boundary conditions are used. This applies to both the simulation history and the raytracer with motion blur enabled.
  • Fixed raytracer rendering textureless particles black.
  • Fixed video recording turning black when the window is minimized.
  • Grayscale textures can be now loaded.
  • Fixed bad randomization of clouds.
pavelsevecek PATREON 0 favs
VIEWS1
FILES1 file
POSTEDNov 13, 2023
ARCHIVEDJun 10, 2026