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
Posted: Thu Jul 09, 2026 10:08 pm
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.
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Fri Jul 10, 2026 6:53 am
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 (13.03 KiB) Viewed 1052 times
And here it comes with uniform spacing on chord length.
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
Posted: Sun Jul 12, 2026 3:29 pm
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.
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Wed Jul 15, 2026 7:01 am
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.
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
Posted: Thu Jul 16, 2026 10:20 am
by Rseding91
I’ll forward this to GFX and see if they want to make changes.
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Thu Jul 16, 2026 3:50 pm
by Harkonnen
thx
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Thu Jul 16, 2026 4:25 pm
by TigraveN
Much appreciated!
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Thu Jul 16, 2026 6:52 pm
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.
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Sat Jul 18, 2026 6:32 am
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.
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Sat Jul 25, 2026 2:01 pm
by Harkonnen
Check this out
Re: [2.1.9] Tank rotating animation inconsistency
Posted: Sun Jul 26, 2026 10:13 am
by Harkonnen
mouse coords + wheel for sun position. .fx files are tracking file modification time, so shaders can be rewritten at runtime (Ctrl-S from notepad or whatever). sandbox