[2.1.9] Tank rotating animation inconsistency

Bugs that are actually features.
TigraveN
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 24, 2026 11:51 pm
Contact:

[2.1.9] Tank rotating animation inconsistency

Post by TigraveN »

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:
factorio-current.log
(12.24 KiB) Downloaded 31 times
Attachments
2026-07-08 01-49-25.mp4
(18.15 MiB) Downloaded 43 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 17240
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Rseding91 »

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.
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

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.
Last edited by Harkonnen on Fri Jul 10, 2026 6:55 am, edited 1 time in total.
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

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
angle.png (13.03 KiB) Viewed 781 times
And here it comes with uniform spacing on chord length.
chord.png
chord.png (12.89 KiB) Viewed 781 times
Here is the tool that solves it (source + exe).
RollemUp.zip
(140.15 KiB) Downloaded 25 times
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
TigraveN
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 24, 2026 11:51 pm
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by TigraveN »

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.
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.
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

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.
sauron.png
sauron.png (13.93 KiB) Viewed 523 times
Just in case, source+exe for this one
RolleumUp2.zip
(140.04 KiB) Downloaded 14 times
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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17240
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Rseding91 »

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.
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

thx ;)
TigraveN
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed Jun 24, 2026 11:51 pm
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by TigraveN »

Much appreciated!
zwickau
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri May 01, 2026 9:39 pm
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by zwickau »

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
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
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

Although, even after reading your explanation, I still cannot convince my eyes that the animation looks normal.
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.
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

Check this out
Attachments
Factorio-graphics.zip
(7.02 MiB) Downloaded 32 times
Harkonnen
Former Staff
Former Staff
Posts: 278
Joined: Fri Sep 02, 2016 9:23 am
Contact:

Re: [2.1.9] Tank rotating animation inconsistency

Post by Harkonnen »

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
Post Reply

Return to “Not a bug”