Screenshot Toolkit


* Snipping: Screenshots a selected area, similar to programs like the Windows Snipping Tool or Flameshot. * Timelapse: Automatically does screenshots of the whole base in set minute intervals. Written to be performance friendly. Aims to be your do-it-all toolkit for screenshots.

Utilities
3 days ago
0.18 - 2.0
3.72K

i [Done] Feature request: Your mod has potential

3 years ago
(updated 3 years ago)

Hi!

I came about your mod and realised that the way it works, it would be able to take very high-res images of different planets (playing Space Exploration) or bases. It already works well in the last mentioned regard by screenshotting the player's active area, thereby taking screenshots on the active planet.

But, the mods that today are existing for screenshotting are limited by the in-game resolution limit since they only take a single screenshot. Big planets get blurred and manually calculate the splitting dimension is a hassle I would prefer to not have to. Since this mod is splitting the images it would be able to bypass that limit by taking many high-res images of a surface, and then via your script put them together as one.

So more than only setting a resolution goal for one screenshot, I also want to be able to instead set a specific resolution independent of the area, so for example when zoomed in, it looks like the sharpness when normally playing. Even if the planet/base are huuuuge...

If you can achieve that and also add an optional "Take a single screenshot"-key (meaning just one screenshot, not one-tick screenshot) I think many will love your mod, both for creating sequences or snapshotting!

3 years ago

Hey

There are a few things to unpack here.

I never tested the screenshotting on different planets, so I guess it will always default to the default surface. I can expand it to be able to screenshots on other surfaces as well, if requested. Can you recommend me a mod that uses other surfaces?

As you said, the screenshots are done in fragments unless you use the single screenshot setting. The current limit of 8k is simply the limit the game gives me on the screenshot method, everything higher than that has to be split into screenshots of max 8k size. I felt it would be best to limit all screenshots, fragmented or not, to 8k for that reason.

But yeah, of course I can add a setting where you set a desired zoom level instead of a resolution. Just keep in mind that we are talking about huge amounts of data there, as 8k images are huge already, and by just using the zoom level directly the screenshots could become immensly huge. It would probably burst my stitcher script, as it holds all the image information in RAM and then writes it into a single file. But thats something I can look into, if requested.

Your idea of adding an optional "take a single screenshot" key sounds nice. To avoid collisions with other mods a command would make more sense imo.

Thank you for your input, you made my weekend very busy now.

3 years ago

Hi Anders142536!

I'm using Earendel's Space Explore with the required and optional dependencies, https://mods.factorio.com/mod/space-exploration
But in order to get to another surface you'll need to progress a bit in the game. Maybe there are saves you can use for the purpose if you want to start fast? Maybe you don't want to, it's playworthy if you decide to go with it.

If you want to test with different surfaces quick and easy, there is a mod called Factorissimo that creates small "Factory floor"-surfaces. (These are not browsable in the navigation panel in SE, if you have it installed.) https://mods.factorio.com/mod/Factorissimo2 You just need to build a factory and place it on the ground, then you have a new surface inside it.

Breaking down my thoughts and ideas...

The function:
I first wondered what surface FAS should default on. Maybe Nauvis? Interestingly, FAS do screenshot the surface the player currently is at/viewing. That's nice and I think you don't need to change much about this. In SE, you also have the "Navigation view" that makes it possible to screenshot other planets/orbits/asteroid belts etc. without physically being there but by "looking" at the surface (it is a god mode-like view). That's something good for exploration and I would like to tell I think this works well as default if you are going to edit the mod.

There could be an alternate option for setting where screenshots should be performed: on a specific known surface - instead of the player's current surface, if anyone playing with multiple surfaces intend to have screenshot series of just that one.

If you intend to add a selection for screenshotting any existing surface regardless if you are/can go there or not, I suggest you also have a per-game on/off setting for this in the mod settings, as there may be surfaces that is not intended to be viewable yet. (I don't know if you easily can differentiate surfaces that is meant to be visible or not, therefore it may impact the former point)

Maybe you can create a setting to take regular screenshots of specific multiple surfaces later on, if you want to develop this further? (This can wait)

The resolution:
My current experimentation of the in-game screenshotter makes me able to create a .png image of max 100-150 MB in one shot, but that's actually too little... For moons less than a radius of 1000 units it works ok - although it get a little blurry. For larger moons/planets it is really impossible to get a good image if I don't split it and put the result together by hand. If I now intend to have a good picture, then the final image size could get well bigger before I need to concern about the space it takes, I have both RAM and disk space for rather big shots. I think the key to make larger screenshots possible is splitting, which this mod build its very core on.

There are several cases one wants a extremely high-res image: One may want to put different parts together in a collage, then the source need to be good. Or compress it with jpeg to have a smaller-size and overall sharper image in contrast to the default in-game output. Or print the planet, an A4 on a standard printer of 1440 dpi means I can make use of a resolution of 11906x16838 - source materials of several GB is not unusual in the printing world. Or having a "catalog of planets" on the hard drive to save game RAM. There may be other uses too, these was just a glimp of my imagination. I think you get it, I'm really missing an not overcomplicated very high-res screenshotting option. That led me here. :)

Regarding single screenshots:
I thought about having an by-default unassigned button that one optionally could set in the keybinding menu. Or have it default to Ctrl+P just because pun intended (Print). :) Of course writing i.e. /FAS in the command line would be an alternative too, just avoid something that needs to be run with /c [command] syntax as it breaks achievements. I'm not picky about the function as long as it is easy to initiate.


If you need some testing I can try it and give inputs for tweaking afterwards. Thank you for a great mod!

3 years ago

I thought a while about your input.

Im on the phone right now so I will ignore some things you said right now.

My first approach will be to add a little button on the top left, similar to how Krastorio, FNEI, and some smaller mods I use are doing it. This will open a small UI.

In this small UI you will see the current state of the auto-screenshotting with a small progress bar or a timer until the next set of screenshots will be taken. It always bothered me that you cant see that information.

There will also be a button to trigger the high res screenshots you requested. You will be able to select the surface you want to screenshot as well as the Zoom Level. There will be rough estimates inhow big the file size will be, as well as a warning that it will freeze the game for a few seconds and break multiplayer.

I will not be able to add a progress bar to it, as I cannot pause the game to get a clean screenshot and still update gui elements without heavily abusing the event system and probably causing a ton of issues.

I look forward to your feedback once its done.

3 years ago

It sounds like good news. :)

I'm looking forward to your release.

3 years ago
(updated 3 years ago)

Hey, I wanted to give you an update and fetch some feedback.

My first approach will be to add a little button on the top left, similar to how Krastorio, FNEI, and some smaller mods I use are doing it. This will open a small UI.

In this small UI you will see the current state of the auto-screenshotting with a small progress bar or a timer until the next set of screenshots will be taken. It always bothered me that you cant see that information.

There will also be a button to trigger the high res screenshots you requested. You will be able to select the surface you want to screenshot as well as the Zoom Level. There will be rough estimates inhow big the file size will be, as well as a warning that it will freeze the game for a few seconds and break multiplayer.

This is done partly now, as you can see in this screenshot:

You will be able to select the surface you want to screenshot
This will not work in the first release I work on, as I saw some hardcoded parts that default to nauvis, the default surface. I have to find a nice way to deal with a multi-surface situation.

Please let me know what you think about the UI and what you would change to improve it. I'm curious if you suggest the same things I already have planned.

3 years ago

Nice!

Here are some of my immediate thoughts about the UI box.

I think it should benefit having a row telling the name of the surface that are going to be shot, regardless if one can change it or not.
A switch for increased splitting, perhaps to avoid breaking multiplayer.
A box for choosing to create the shot in one tick, if coherence is more important than multiplayer.
A cross to close the box with, as well as a function to close the box with "E" (if not me, others will point at this later).
If possible, an estimation of file size.
A button to stop the screenshotting.

3 years ago
(updated 3 years ago)

I think it should benefit having a row telling the name of the surface that are going to be shot, regardless if one can change it or not.

This feels like a rather hairy thing. I see two kinds of people. The ones that know about surfaces and the ones that don't (yet). By adding a simple surface: nauvis (default) it might confuse people that don't know what that is. People that play with different surfaces might be confused about what surface is the one being screenshoted.

I see several options, but I think the best is to add a line that states the used surface, but add a little i icon with a tooltip that explains the surfaces to those that don't know them.

A switch for increased splitting, perhaps to avoid breaking multiplayer.
A box for choosing to create the shot in one tick, if coherence is more important than multiplayer.

I use the settings for those things as they are things that a user usually only interacts with once, or very rarely. Although it might make it harder to interact with, I think hiding rarely used controls in the options and showing often used controls in the FAS Control Panel makes the most sense. My idea for it was to put everything there I want to check on or use regularly.

Do you think those two things are things you interact with more than fiddling around until you find settings that work for you?

A box for choosing to create the shot in one tick, if coherence is more important than multiplayer.
A cross to close the box with, as well as a function to close the box with "E" (if not me, others will point at this later).

O.M.G. how did I not think about those things? I will definitly add those, thanks!

If possible, an estimation of file size.

It is definitly possible, but not really precise. I aleady thought about this but the issue is that the screenshots vary in file size depending on how well they can be compressed in the .png file format the game saves the screenshots in. Yet undiscovered areas with nothing in them will be all black, creating files of 1KB. The middle of your base with tons of things on them are huge in comparison.
I can just assume that all screenshots are crowded, big ones and display a (probably way too high) upper limit until I find a better heuristic to guesstimate the size.

A button to stop the screenshotting.

The only screenshots the user can interrupt are the autoscreenshots. The huge screenshots will freeze the game until they are done with no fancy progress bar or anything. This also means that no button presses can be interpreted. I will test this, as I base this knowledge on discussions with other modders, but I trust them.

I think what would make sense would be moving the Do Screenshots setting to the panel, removing it from the settings. It might be something someone more regularly interacts with and a toggling Start Auto-Screenshots / Stop Auto-Screenshots is more user friendly. So, similar to your suggestion.

Thank a lot for your feedback, it is much appreciated! I was moving this weekend, and with all the preparations and work required I couldn't work as much on the mod as I would like to. I hope I can release the update in a week or two!

3 years ago
(updated 3 years ago)

After reflecting on the topic for the past few days I had to realize that the feature to do high res screenshots of the whole base is not feasible. After 50 - 100h of playtime a save (at least the ones i have with my friend) would be so big that a Zoom Level 1 screenshot would take hundreds of gigabytes. Even if a user has this amount of storage there is no way my image stitching programm could handle this or any program out there could display such a large image with hundreds of thousands of pixels in each dimension.

For such things there are other, better approaches. There are one or two mods that convert your save into a viewable html site, similar to a google maps view. If you just want to capture a snapshot of your save to look at in great detail in the future I recommend you to use one of these.

Still, your request made me think about what I want this mod to be and I will implement a high res screenshotting feature, but only for a set area. I made a mock for the ui I want to build, but I will open a different thread for that, as well as feedback. Now that i am done moving I will actually have the time to do it.

3 years ago

I looked at mapshot and my first impression is, yes it do makes screenshot of an whole base and stores it as .jpg in split files. It do serve very well as a lookup, display and archive. However, there are no stitcher for mapshot so there is no possibility to have a single fullsize image of the base that way, thereby making creations out of those difficult.

Citing the creator palats,

Hello!
It depends what you want to have in the end. Mapshot can indeed create large screenshots but it will generates multiple image files. You will need to use a browser to see a stitched version of it (i.e., not just seeing individual partial images).

If you want to have a single high def PNG file with the whole base, mapshot does not really help. You can lookup the Factorio console command take_screenshot for that - though in the end, Factorio bases are large, so it might generate too big of a file to be usable.

But the take_screenshot is limited to a few hundred megabytes in best cases. So still, there is a need to be fulfilled.

For me, it is feasible with image sizes up to tenths of gigabytes. Hard drive storage is enough and well, and I have access to a workhorse computer with a quarter of TB of RAM to do the stitching and my big creations on. For most people I believe that it is high and i guess a few gigabytes are feasible instead. The only actual problem I've seen today is that there is currently an artificially set limit on libcairo on the width on images, which prevents saving large images back as .png in GIMP. - There are other image formats that work though. I want to mention that if you are using libcairo in the stitcher or in a imaging program and gets problem. It is not impossible to circumvent the limit but it takes a little work to do.

Being able to define a set area in addition to the requested zoom level would actually be a good idea! There are many cases where an area utside of an interval is not relevant. I would be happy if that limit is not too narrow (at least a few GB) or is possible to increase in mod settings.

I enjoy discussing the idea with you and I gladly help try out the mod when you have a relase.

3 years ago

I'm sorry to hear that MapShot does not fulfill your needs.

But the take_screenshot is limited to a few hundred megabytes in best cases.

Unfortunatly, yes. That was the initial motivation for this mod in the first place.

I would be happy if that limit is not too narrow (at least a few GB) or is possible to increase in mod settings.

I will not implement any limits. Just a polite hint that what the user wants to do will break multiplayer and might not be a smart thing to do. So you will be able to just draw an area over the whole base, resulting in a one-piece screenshot of your whole base. To be more precise, you will receive multiple images but I will adjust my stitcher program to be able to deal with such high RAM requirements. This should allow you then to create a huge, single-file screenshot of your bases.

It will probably be a good idea to add a button that automatically wraps the area around the whole base. A long term idea is to support several presets of areas, and one of those could be a "whole base" preset. But that is future stuff.

Out of pure curiosity, what kind of creations are you talking about there?

3 years ago

Oh.. To clarify, I don't think MapShot is bad, It's not just a good tool for all my cases. It seems to fulfill the case when I want to create an out-of-game "catalog of planets" and discuss strategy with friends. In that way it seems actually very good since the maps can be viewed in a browser.

For my other needs, I'm thinking firstly about making printings of maps and factories, both to put on the wall and bring to conventions. In the extension, I would like to make a kind of prototype board game maps and areas with a storyline related to the different part of the factories. But it's yet far from a working idea. As mentioned earlier, printing needs very many pixels...

I think I understand your thoughts. Well, my point was not to turn the mod into a hi-res screenshotter, but instead to complement it with the possibility to take those and extend it with a gui and some handy options. There are great stuff under the hood here. :)

3 years ago

After quite a while of hiatus I'm finally done. It is still pretty rough on some edges, but have a look at it. If you have any thoughts on how to improve the mod please tell me, I'm looking forward to it!

New response