Support bigger screenshot sizes

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
movax20h
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Support bigger screenshot sizes

Post by movax20h »

I wish to be able to dump a screenshot that is bigger than the current limit.

Code: Select all

/screenshot 16384 16384 1
simply is not big enough. Capturing at lower quality (zoom level), is meh solution. I want to be able to zoom in on details, for archival and quick reference during new builds. PNG is fine, it support higher resolutions in the format, but I will most likely convert it later to TIFF (a lot of mapping software often reads TIFFs only). You can disable compression (set PNG compression to 0, and be sure not to use PNG interlacing aka Adam7 algorithm) to speed up the saving process considerably probably too.

65536 x 65536 should be quite sufficient probably. Yes, I know it is going to be ~8GB in PNG. That is fine. 131072 x 131072 would be even better. Even if it requires 32GB on disk and/or 32GB in memory (I have plenty of RAM to do that).

As of now I am making multiple screenshots and stitching it, but because game is updating between multiple screenshots the seam is not perfect (things inserters, machines move, clouds move, etc), not to mention manually stitching it takes quite some time (not due to the size, simply time capturing individual screenshots, finding correct positions for a good stitch and then editing things to merge) - it took me 100 minutes just to take screenshots (31 files; 15GB total size; I actually took 48 screenshots, but some of them were during the wrong time of a day in the game, so colors did change, or they were incorrectly aligned), and another 50 minutes to align them in GIMP.

Here are results of taking screenshots, stiching in GIMP, tileing using gdal2tiles and custom tiling tool, and then rendering using Leaflet and some custom JavaScript and CSS: https://www.functor.xyz/factorio/2019-11-19/index.html

Sneek peak in the screenshot below.
Attachments
Screenshot_2019-11-19 My Factorio 0 17 78 end game map(1).jpg
Screenshot_2019-11-19 My Factorio 0 17 78 end game map(1).jpg (1.76 MiB) Viewed 2512 times
Screenshot of my screenshot viewer
Screenshot of my screenshot viewer
Screenshot_2019-11-19 My Factorio 0 17 78 end game map.jpg (1019.19 KiB) Viewed 2512 times

Koub
Global Moderator
Global Moderator
Posts: 7197
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Support bigger screenshot sizes

Post by Koub »

There was a mod for that : https://mods.factorio.com/mod/FactorioMaps
But it doesn't seem updated any more. Maybe you can have it updated.
Koub - Please consider English is not my native language.

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Support bigger screenshot sizes

Post by Bilka »

Koub wrote:
Tue Nov 19, 2019 10:33 pm
There was a mod for that : https://mods.factorio.com/mod/FactorioMaps
But it doesn't seem updated any more. Maybe you can have it updated.
https://mods.factorio.com/mod/L0laapk3_FactorioMaps is updated.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Koub
Global Moderator
Global Moderator
Posts: 7197
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Support bigger screenshot sizes

Post by Koub »

Oh nice, missed that :)
Koub - Please consider English is not my native language.

movax20h
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Support bigger screenshot sizes

Post by movax20h »

Bilka wrote:
Tue Nov 19, 2019 10:34 pm
Koub wrote:
Tue Nov 19, 2019 10:33 pm
There was a mod for that : https://mods.factorio.com/mod/FactorioMaps
But it doesn't seem updated any more. Maybe you can have it updated.
https://mods.factorio.com/mod/L0laapk3_FactorioMaps is updated.
What about playing a vanilla playthrough with achievements enabled? Will it work?

Also, what is the reason for the current limit of the size? Is it arbitrary, or some technical limitation?

I am not that interested about timelapse / periodic screenshots. I find it a separate issue.

Koub
Global Moderator
Global Moderator
Posts: 7197
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Support bigger screenshot sizes

Post by Koub »

movax20h wrote:
Wed Nov 20, 2019 11:58 am
What about playing a vanilla playthrough with achievements enabled? Will it work?
I'm afraid a mod will always disable the Vanilla Steam achievements. Even if it does nothing dramatic (like change biter sprites into hot dogs), the mere presence of a mod removes the ability to get Steam achievements.
Koub - Please consider English is not my native language.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Support bigger screenshot sizes

Post by Rseding91 »

The current screenshot logic creates 1 big video texture that the rendering logic then draws into and that's then written to disk.

Because it works that way, the limit is how big of a texture your graphics card can handle. In most cases 16k works. 32k might work, anything past that and most GPUs will not allow it.

The screenshot logic would have to be re-written to support streaming out blocks of a screenshot to disk and that's a lot of time for something most people won't use.
If you want to get ahold of me I'm almost always on Discord.

movax20h
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Support bigger screenshot sizes

Post by movax20h »

Rseding91 wrote:
Wed Nov 20, 2019 3:05 pm
The current screenshot logic creates 1 big video texture that the rendering logic then draws into and that's then written to disk.

Because it works that way, the limit is how big of a texture your graphics card can handle. In most cases 16k works. 32k might work, anything past that and most GPUs will not allow it.

The screenshot logic would have to be re-written to support streaming out blocks of a screenshot to disk and that's a lot of time for something most people won't use.
That makes sense. I was wondering if the screenshot code captures entire thing into memory or writes stuff in blocks instead. But if indeed it is doing just a one texture, it is not going to work with bigger than 32kx32k pictures. And instead should be captured manually or using Lua code.

Increasing to 32kx32k could do help a bit tho, and for people with 8 or 16GB it could do the trick.

Well, I given that it is not easy to fix, I will try the pointed out mod or create my own to do the job.

User avatar
Ranger_Aurelien
Fast Inserter
Fast Inserter
Posts: 170
Joined: Thu Apr 25, 2019 1:53 pm
Contact:

Re: Support bigger screenshot sizes

Post by Ranger_Aurelien »

Koub wrote:
Wed Nov 20, 2019 12:53 pm
movax20h wrote:
Wed Nov 20, 2019 11:58 am
What about playing a vanilla playthrough with achievements enabled? Will it work?
I'm afraid a mod will always disable the Vanilla Steam achievements. Even if it does nothing dramatic (like change biter sprites into hot dogs), the mere presence of a mod removes the ability to get Steam achievements.
The original poster need only save their game in a second save file, install the mod, take the huge screenshots, and when done delete the second (forked) save.

Not quite as convenient as doing it directly in Vanilla but it is a workaround.
-
Ranger Aurelien
"Knowledge Brings Fear" -- Motto of Mars University, Futurama

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Support bigger screenshot sizes

Post by posila »

Maximum possible texture size in Direct3D 11 is 16384. That's where the hard limit comes from.
Ranger_Aurelien wrote:
Wed Nov 20, 2019 8:22 pm
Not quite as convenient as doing it directly in Vanilla but it is a workaround.
It's certainly many times more convenient than taking the screenshots and trying to make them tilable by hand.

movax20h
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Support bigger screenshot sizes

Post by movax20h »

posila wrote:
Thu Nov 21, 2019 9:04 am
Maximum possible texture size in Direct3D 11 is 16384. That's where the hard limit comes from.
Ranger_Aurelien wrote:
Wed Nov 20, 2019 8:22 pm
Not quite as convenient as doing it directly in Vanilla but it is a workaround.
It's certainly many times more convenient than taking the screenshots and trying to make them tilable by hand.
Yes, my GPU also supports 16384 x 16384 on Linux using OpenGL.

I understand supporting bigger screenshots is technically possible with more code, but it is not a simple tweak of a constant, so I would say topic closed, and I will try doing automated tiling using

Code: Select all

game.take_screenshot()
as described here https://lua-api.factorio.com/latest/Lua ... screenshot

There is unrealted other issue / feature I wish to have in a screenshot, and I am not sure if take_screenshot can do it: Showing the yellow arrows for the inserters and miners, blue ones for the fluid, and green one for the miners fluid inputs. AFAIK when taking the screenshot the alt mode can be enabled or disabled (show the receipe of assemblers, chemical plants, etc), and content of chests, but the arrows can't be switched on.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Support bigger screenshot sizes

Post by eradicator »

movax20h wrote:
Fri Nov 22, 2019 11:11 am
I am not sure if take_screenshot can do it: Showing the yellow arrows for the inserters and miners, blue ones for the fluid, and green one for the miners fluid inputs.
Works just fine with Screenshot Hotkey's default settings (see my signature for mod portal link).
Attachments
screenshot_2916.png
screenshot_2916.png (951.2 KiB) Viewed 2307 times
screenshot_8124.png
screenshot_8124.png (103.83 KiB) Viewed 2307 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

movax20h
Fast Inserter
Fast Inserter
Posts: 164
Joined: Fri Mar 08, 2019 7:07 pm
Contact:

Re: Support bigger screenshot sizes

Post by movax20h »

eradicator wrote:
Sat Nov 23, 2019 3:42 pm
movax20h wrote:
Fri Nov 22, 2019 11:11 am
I am not sure if take_screenshot can do it: Showing the yellow arrows for the inserters and miners, blue ones for the fluid, and green one for the miners fluid inputs.
Works just fine with Screenshot Hotkey's default settings (see my signature for mod portal link).

Interesting. `show_entity_info` option ? I tough it only affects showed recipes, not the arrow thingies. Is it possible to have recipes icons only without the inserter / miners arrows then?

Post Reply

Return to “Ideas and Suggestions”