[2.1.9] Tank rotating animation inconsistency
[2.1.9] Tank rotating animation inconsistency
When spinning in place in a tank, the rotating animation is much less smooth when facing up/down than left/right.
Expected behavior: the tank rotates smoothly no matter where it is looking
Observed behavior: the tank rotates smoothly only when it is facing (roughly) left or right
FPS is consistent 60. High quality animations are turned on. The up/down animations looks as if it missing some frames.
Video:
Log:
Expected behavior: the tank rotates smoothly no matter where it is looking
Observed behavior: the tank rotates smoothly only when it is facing (roughly) left or right
FPS is consistent 60. High quality animations are turned on. The up/down animations looks as if it missing some frames.
Video:
Log:
- Attachments
-
- 2026-07-08 01-49-25.mp4
- (18.15 MiB) Downloaded 43 times
Re: [2.1.9] Tank rotating animation inconsistency
Thanks for the report however I don't believe this is broken in any way. The tank is rotating exactly the same number of degrees in all directions however when horizontal you notice the wider sprite moving "faster" because it's further from the rotation point. When vertical the height of the sprite is shorter due to the angled view Factorio uses - this makes it look like it's rotating slower when in reality it's moving at a constant speed the entire time.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.1.9] Tank rotating animation inconsistency
It's not about speed in radians/sec, but about number of different frames/sec.
Angles distribution in spritesheets should be non-uniform to account for perspective. I bet cars, trains and everything else with rotation spritesheets has same problem, just tank is easy to rotate manually, so it became noticeable. Solution would be a set of angles, such that corresponding chords of an ellipse all have equal length.
Angles distribution in spritesheets should be non-uniform to account for perspective. I bet cars, trains and everything else with rotation spritesheets has same problem, just tank is easy to rotate manually, so it became noticeable. Solution would be a set of angles, such that corresponding chords of an ellipse all have equal length.
Last edited by Harkonnen on Fri Jul 10, 2026 6:55 am, edited 1 time in total.
Re: [2.1.9] Tank rotating animation inconsistency
And here it comes. I've drawn "Factorio ellipse" a bit more flattened on these screenshots to make effect more pronounced. Here you can see that left and right extremes have much more precision with respect to top and bottom if we step on uniform angle.
And here it comes with uniform spacing on chord length.
Here is the tool that solves it (source + exe).
It produces those pictures and angle values in degrees for clipboard in the form like
0.0000,
50.5140,
90.0000,
129.4860,
180.0000,
230.5140,
270.0000,
309.4860,
Which you can feed to them_blender_guys.py for automated rendering, and paste it to .lua for .cpp engine. There you just pick nearest matching frame with something like this:
double angle; // 0...360
return lookUpTable[(int)(angle + 0.5) % 360]; // 1-degree precision should be enough
0.0000,
50.5140,
90.0000,
129.4860,
180.0000,
230.5140,
270.0000,
309.4860,
Which you can feed to them_blender_guys.py for automated rendering, and paste it to .lua for .cpp engine. There you just pick nearest matching frame with something like this:
double angle; // 0...360
return lookUpTable[(int)(angle + 0.5) % 360]; // 1-degree precision should be enough
Re: [2.1.9] Tank rotating animation inconsistency
I understand that the outer edges and perspective affects this a lot, but even if you look at the center point of the sprite, the animation seems to slow down.Rseding91 wrote: Thu Jul 09, 2026 3:45 pm Thanks for the report however I don't believe this is broken in any way. The tank is rotating exactly the same number of degrees in all directions however when horizontal you notice the wider sprite moving "faster" because it's further from the rotation point. When vertical the height of the sprite is shorter due to the angled view Factorio uses - this makes it look like it's rotating slower when in reality it's moving at a constant speed the entire time.
Re: [2.1.9] Tank rotating animation inconsistency
My thoughts on chords were inspired by pixel-motion effects. Tried it with Manhattan distance max(dx, dy) - results were about the same as with chord length. Still that X in the center giving more love to 45 degrees told me to try uniform screen-space angle - it's better at the center, but worse at outer rims, so I would opt for original chord-length version anyway.
Just in case, source+exe for this one
P.S: and of course if this fix takes place, the set of angles should be per-entity-type, not global, so that modded rotating entities stay as they currently are.
Re: [2.1.9] Tank rotating animation inconsistency
I’ll forward this to GFX and see if they want to make changes.
If you want to get ahold of me I'm almost always on Discord.
Re: [2.1.9] Tank rotating animation inconsistency
Much appreciated!
Re: [2.1.9] Tank rotating animation inconsistency
I've also noticed this odd visual behavior before, but I also knew that Factorio contains some fundamental graphical quirks, as well... this graphic makes it clear what exactly is going on! Although, even after reading your explanation, I still cannot convince my eyes that the animation looks normal.Harkonnen wrote: Fri Jul 10, 2026 6:53 am And here it comes. I've drawn "Factorio ellipse" a bit more flattened on these screenshots to make effect more pronounced. Here you can see that left and right extremes have much more precision with respect to top and bottom if we step on uniform angle.
angle.png
And here it comes with uniform spacing on chord length.
chord.png
Here is the tool that solves it (source + exe).
RollemUp.zip
It produces those pictures and angle values in degrees for clipboard in the form like
0.0000,
50.5140,
90.0000,
129.4860,
180.0000,
230.5140,
270.0000,
309.4860,
Which you can feed to them_blender_guys.py for automated rendering, and paste it to .lua for .cpp engine. There you just pick nearest matching frame with something like this:
double angle; // 0...360
return lookUpTable[(int)(angle + 0.5) % 360]; // 1-degree precision should be enough
Re: [2.1.9] Tank rotating animation inconsistency
I didn't mean that it looks normal - it doesn't. And explained what should be changed. The problem is that animations are generated on uniform stepping on angle in worldspace in blender, but after projection to screenspace it becomes nonuniform. That prog generates set of angles for blender input, so that screenspace output becomes uniform.Although, even after reading your explanation, I still cannot convince my eyes that the animation looks normal.
Re: [2.1.9] Tank rotating animation inconsistency
Check this out
- Attachments
-
- Factorio-graphics.zip
- (7.02 MiB) Downloaded 32 times
Re: [2.1.9] Tank rotating animation inconsistency
mouse coords + wheel for sun position. alzo .fx files are trackin' file modification time, so them shaderz can be rewritten' at runtime (Ctrl-S from notepad exe). sandbox


