[guide] calculate screenshot dimensions

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.

[guide] calculate screenshot dimensions

Postby arl85 » Fri Aug 29, 2014 1:28 pm

edit: I'm attaching a ods spreadsheet that calculates correct dimensions for you. You simply need to provide top left and bottom right corners and zoom level. you'll receive the string to use in-game.
it should work with any locale but I'm not 100% sure (in Italy we use "," as decimal separator)


Anyway, I'm trying to take a screenshot of my whole base using the takescreenshot function and I decided to share what I figured.
I took 3 pictures
position = 0,0 - resolution = 1024, 1024 -> picture 1
position = 32,0 - resolution = 1024,1024 -> picture 2
position = 16,0 - resolution = 2048,1024 -> picture 3
I can put picture 1 and picture 2 adjacent (or "stitch" them) and they'll match perfectly (*) on the borders. the result is the same of picture 3.

what I figured is that seems that every "unit" of "position" parameter at zoom 1 is equivalent to 32 pixels
so if position is expressed in tiles, and we consider that a chunk is made of 32 tiles we have that a single chunk is exactly 32*32 = 1024 pixels (each side)

note: when you pause game a grid appears: if you watch carefully you'll see that every 32 columns the border is thicker.
pressing F4 then selecting "always" tab and "show detailed info" and "show tile grid" you can see "position" value (displayed as "cursor")

Code: Select all
 |<--1024->|<--1024->|
-16   0    16   32   48
 +----+----+----+----+ -16
 |picture 1|picture 2|
 |    *    |    *    + 0
 |  (0,0)  | (32,0)  |
 +---------+---------+ 16

 
 |<-------2048------>|
-16   0    16   32   48
 +----+----+----+----+ -16
 |      picture 3    |
 |         *         + 0
 |      (16,0)       |
 +---------+---------+ 16


(*) or better, almost perfectly because they are at different stage of animation


edit:
so what it can be useful for?
As I said, I want to take screenshot of my complete base.
So I activated "detailed info" (F4 - "always" - "detailed info" or F5 - but this shows too many info for me...)

Code: Select all
I moved to TopLeft (TL) angle of my base and wrote down coordinates (TLx = 4 TLy=-16)
I moved to BottomRight (BR) angle and did the same (BRx = 240 BRy = 310)

zoomLevel (ZL) = 1
image width = W = BRx - TLx = 240 - 4 = 236
image height  = H = BRy - TLy = 310 - (-16) = 326

Image Center X = ICx = TLx + W/2 = 4 + (236/2) = 4 + 118 = 122
Image Center Y = ICy = TLy + H/2 = (-16) + (326/2) = (-16) + 163 = 147

# of pixel on X = Px =  W * ZL * 32 = 236 * 32 * 1 = 7552
# of pixel on Y = Py = H * ZL * 32 = 326 * 32 * 1 = 10432

so I called
Code: Select all
game.takescreenshot{zoom=ZL, position={ICx,ICy},resolution={x=PX,y=Py}}

and replacing variables with real number
Code: Select all
game.takescreenshot{zoom=1, position={122,147},resolution={x=7552,y=10432}}

and got the result.

Since it was a very big file (127 MB) I scaled it by 4 (ZL = 0.25) and I called
Code: Select all
game.takescreenshot{zoom=0.25, position={122,147},resolution={x=1952,y=2608}}


Hope this helps other people!
Attachments
Factorio_Screenshot_Calculator.zip
(23.02 KiB) Downloaded 236 times
Last edited by arl85 on Thu Sep 04, 2014 8:04 pm, edited 2 times in total.
Do you need help taking screenshots in-game? have a look to my guide to calculate screenshot dimensions
arl85
Fast Inserter
Fast Inserter
 
Posts: 160
Joined: Tue Jun 10, 2014 7:08 am
Location: Calceranica al Lago - Trento - Italy

Re: [guide] calculate screenshot dimensions

Postby OBAMA MCLAMA » Fri Aug 29, 2014 5:15 pm

Wow. This sure as hell beats running around your base taking screenshots and stitching them together.

How long did it take to render the 127mb picture?
When i stream twitch i always answer questions and try to help, come visit me.
OBAMA MCLAMA
Filter Inserter
Filter Inserter
 
Posts: 346
Joined: Fri May 30, 2014 4:23 am

Re: [guide] calculate screenshot dimensions

Postby arl85 » Sat Aug 30, 2014 7:10 am

OBAMA MCLAMA wrote:How long did it take to render the 127mb picture?


on my pc (4core 2 GHz) no more than 3/4 seconds for generating and almost the same to display it in windows (it take same time to load such a file)
Do you need help taking screenshots in-game? have a look to my guide to calculate screenshot dimensions
arl85
Fast Inserter
Fast Inserter
 
Posts: 160
Joined: Tue Jun 10, 2014 7:08 am
Location: Calceranica al Lago - Trento - Italy

Re: [guide] calculate screenshot dimensions

Postby Lee_newsum » Tue Apr 19, 2016 6:07 pm

This has bin done befor "FactorioMaps"
viewtopic.php?f=86&t=5812&hilit=FactorioMaps
Lee_newsum
Filter Inserter
Filter Inserter
 
Posts: 419
Joined: Wed Jan 15, 2014 9:41 am


Return to Cheatsheets / Calculators / Viewers

Who is online

Users browsing this forum: No registered users and 0 guests