Prompted by this thread:
https://www.metabunk.org/threads/a-...-night-sky-images-of-flaring-starlinks.14940/
I implemented a reasonably physically accurate long exposure simulation.
The issue with naive simulation of long exposure is one of dynamic range. If you simply average together a bunch of rendered frames, it will not work. The maximum dynamic range in a rendered frame is 255:1, but stars and bright lights can be many times more varied than that. Venus is about 20,000 times as bright as the dimmest star.
So what the code does is render the point sources (stars, planets, plane lights, satellites) for each frame in high dynamic range, using floating-point numbers, then combine this in the same floating-point buffer with the 3D environment background, which is rendered the normal way, and then converted to floats. We can then average these frames and freely adjust the EV (exposure) of the final result, by a lot, to expose for dimmer stars and trails.
The background can get very bright, so you might want to adjust the ambient down to 0.01 for a more realistic night exposure. No moonlight (yet)
Also works with planes.
There's an optional camera nudge, where you can bang the camera by a random amount, and let it settle over a variable time (controlled by frequency and damping)
Here, for example, I focus on Capella, with the camera set to "Celestial Lock", and the Long Exposure's "Lock Camera" disabled to allow it to track the sky. The expose time is 0.5 minutes (30 seconds), and I have a nudge at 5 seconds. Since Capella is so much brighter than the other stars, we see the wiggle around it, but not the others, giving the illusion of motion. The oter star DO have trails. You can just see one of the other bright stars, and if you boosted the EV in HDR, you'd see more.
Other important parameters:
"Lock Camera Heading" fixes the camera at the first frame's orientation. If the camera is on a plane, then you need this on, otherwise the star trails will look weird.
"Frame Step" is 30 by default, meaning one (virtual) exposure per second. This is fine for star trails, but for satellites and planes you will probably need to reduce it, down to 1 for best quality.
The rest are just tweaks, hover the mouse over them for a quick description.
More docs:
https://www.metabunk.org/sitrec/docs/LongExposure.html