Page 1 of 1

[2.1] Make planet animations more realistic/KSP-like

Posted: Mon Jul 13, 2026 4:16 pm
by fZAqSD
TL;DR
The animation in 2.1 when a space platform arrives at or departs a planet looks like you're pulling up in a car, not in a spaceship
What?
Right now, the animation for a planet that a space platform is travelling past looks weird and wrong (see clip from FFF#443). Even when the platform is moving past the planet without stopping, the planet graphic slows down as you approach it, pauses as you reach it, and then accelerates away as you leave. The gradual pause in the middle, and the fact that the planet remains the same size the whole way through, makes sense for a 2D game of running around and driving trains, but not at all for space travel; it looks like my platform is driving up to a planet on the street, hitting the brakes to slow down, and then driving away.

In real life (by which I mean KSP), the "animation" of arriving in orbit around a planet looks very different. There's a pronounced effect of the planet appearing small in the distance, becoming much larger as you approach, and then shrinking away into the distance again as you leave, which really beautifully highlights the size of space and the speed of space travel. The apparent speed of the planet flying past is also higher when you're closer, due to gravity, angular momentum, and perspective. This KSP video shows off the effect really well, particularly at 0:58, 1:55, 2:14, and 6:15, and the Visible Planets in Space mod did a pretty good job of capturing it in Factorio 2.0 (6 seconds into this clip).
How?
It wouldn't be that hard to set the planet model's size, position, and rotation according to the equations of IRL orbital mechanics. I'd be happy to math out the details if the devs are interested in implementing it, but that's probably overkill; it'd be easier to just make an animation by hand that
  • makes the planet move past faster - and maybe spin faster - the closer you are to it
  • only slows down the animation if you are stopping at the planet
  • makes the size of the planet depend on how close you are
Why?
  • would look epic, just look at those KSP shots of the planets wooshing silently by
  • in a game where you can move between planets in a few minutes, visuals showing that space is really big and 200 km/s is really fast would be good
  • the current animation is confusing since it looks like the platform is slowing down even if it isn't
  • would be more realistic, and half of us are obsessed with The Expanse and clearly want more space realism

Re: [2.1] Make planet animations more realistic/KSP-like

Posted: Mon Jul 13, 2026 6:52 pm
by worph
I'm not generally against doing things EVEN BETTER.
All I am going to say is two things:
a) When I first approached a planet in the newest version my jaw dropped (and I played with the mod previously). Great job devs!
b) Using sprites and/or texture meshes for vastly different scales can get wonky and look bad real quick.

Re: [2.1] Make planet animations more realistic/KSP-like

Posted: Wed Jul 15, 2026 2:21 am
by fZAqSD
Nauvis stop.mp4
flying to Nauvis, stopping for a couple seconds, leaving
(2.91 MiB) Downloaded 10 times
Nauvis flypast.mp4
flying past Nauvis without stopping
(2.24 MiB) Downloaded 9 times
I did the math, found some pretty good simple approximations to the functions for distance and angle, and made a mockup video. In a parabolic escape trajectory past a planet, the size and position of the planet will be within a percent or two of

Code: Select all

position = angle_scale*atan(animation_time/0.931873)
size = size_max*((animation_time/0.596995)^2 + 1)^(-0.390063)
where angle_scale is a scaling factor between the position of the planet on the screen and the angle of the planet out a spaceship window (in the video, it equals 0.42 screen-heights per radian), size_max is the size of the planet at closest approach (0.5 screen-heights in the video), and animation_time can be scaled arbitrarily (in real life it's time scaled by the energy of the orbit and the mass of the planet) but in the video is just seconds after close approach to the planet.

In Visible Planets in Space, there are fixed "arrive" and "depart" animations, both a few seconds long. The "arrive" animation only starts when you arrive at a planet, so it plays a few seconds behind the actual position of the platform, which looks weird. Also, nothing at all is shown when slingshotting past a planet without stopping. I suggest five separate animations:
  • an "arrive" animation, going from the start of my video to (e.g.) 0.5 s before the middle
  • a "depart" animation, going from 0.5 s after the middle of my video to the end
  • a "flypast" animation, going from 0.5 s before the middle to 0.5 s after the middle
  • a short "slowdown" spline, starting where "arrival" leaves off and ending with the planet stationary at close approach
  • a short "speedup" spline, starting stationary and close and ending where "depart" picks up
When a platform approaches a planet, "arrive" would always play. If the platform doesn't stop, "flypast" followed by "depart"; if the platform does stop, "slowdown", then "speedup" when the platform leaves followed by "depart". Finally, if the engine can do it and there aren't too many edge cases, the animations could be made to vary based on the platform's speed: all except "slowdown" could set animation_time in the above math to distance/200 (with 200 km just as a reference speed), and "slowdown" could use animation_time= actual_time*last_speed/200.