- Joined
- May 3, 2016
- Messages
- 2,898
- Solutions
- 7
- Reaction score
- 2,303
- Points
- 145
- Favorite Pinball Machine
- Attack From Mars
Future Pinball (FP) and any program that uses graphics uses less memory if the dimensions (width and height) use a power of two (i.e., 64, 128, 256, 512, 1024, 2048, 4096) though they don't necessarily have to be the same. For example, a size of 1024x2048 is okay. The why of it has to do with the binary nature of PCs. I don't really understand it beyond that.
If the texture you want to add to a table is not of a power of two, then FP will automatically re-scale the image to its nearest power of 2 dimension when the game is run. Complying with the rule makes the loading of textures into the video card much faster if it doesn't have to rescale the image first. I have found that it is more important to make larger textures comply with the rule than smaller textures. You can get by with not making some of the textures on a table comply but if none of the textures comply, you will have many people that won't be able to play your table.
I used to think that the texture on the table loading screen could not be made to comply with power of two because there is no combination of the numbers 64, 128, 256, 512, 1024, 2048 or 4096 that matches a 16x9 shape that fits a monitor. However, FP has the ability to stretch or squeeze any shape to fit the screen (or object). You just have to figure out how to distort the image so it looks correct on the screen which is what I will show you how to do.
You can perform this same process for video where each frame is uploaded to the FP texture manager. There are many bulk image resizers on the internet where you can resize many frames at one time. I have used this one that does it online:
"FastStone Photo Resizer" is freeware that does it also:
"IrfanView" is another freeware package:
Step 1
You start out by using a texture on the table loading screen or applied to objects on the table that does not comply with power of two. On "Space Shuttle", I just added textures as needed without thinking about power of two. When I was done, I deleted all unused textures and exported all that did not comply with power of two. Then I performed Step 2 and imported the textures back into the table.
Step 2
Once you create the image that is not a power of two, you multiply the width times the height to get the total number of pixels in the image. Find the closest match in the left column below. In the first example above, I ended up with an image 1600x900. Multiplying 1600 by 900 equals 1,440,000. Find the closest value to 1,440,000 in the column named area below. The number is in between 1,048,576 and 2,092,032 and I ended up using 2,092,032. There are 4 choices and I used 2048x1024 because it resulted in the least distortion of the image. I ended up adding some pixels to the image which is usually not very desirable but I didn't want to reduce the resolution. It would have been better to find a larger image but I couldn't find one.
For the 1,688x3000 in the example from Step 1, I decided to reduce the size of the texture and make it comply with power of two in one step. I resized it to 1024x2048.
Area Width Height
4,096 64 64
8,192 64 128
8,192 128 64
16,384 64 256
16,384 128 128
16,384 256 64
32,768 64 512
32,768 128 256
32,768 256 128
32,768 512 64
65,536 64 1024
65,536 128 512
65,536 256 256
65,536 512 128
65,536 1024 64
131,072 64 2048
131,072 128 1024
131,072 256 512
131,072 512 256
131,072 1024 128
131,072 2048 64
261,504 64 4086
261,504 4086 64
262,144 128 2048
262,144 256 1024
262,144 512 512
262,144 1024 256
262,144 2048 128
523,008 128 4086
523,008 4086 128
524,288 256 2048
524,288 512 1024
524,288 1024 512
524,288 2048 256
1,046,016 256 4086
1,046,016 4086 256
1,048,576 512 2048
1,048,576 1024 1024
1,048,576 2048 512
2,092,032 512 4086
2,092,032 4086 512
2,097,152 1024 2048
2,097,152 2048 1024
4,184,064 1024 4086
4,184,064 4086 1024
4,194,304 2048 2048
8,368,128 2048 4086
8,368,128 4086 2048
16,695,396 4086 4086
Here is an example of a texture as it is saved to FP and used in the menu of "Space Shuttle" which looks squeezed together:
This is the way the texture looks when you open the menu in the game where it is stretched back out :
The texture that I used to create the overlay on the table was originally 2256x186 which is not power of two. I resized it to 2048x256.
If the texture you want to add to a table is not of a power of two, then FP will automatically re-scale the image to its nearest power of 2 dimension when the game is run. Complying with the rule makes the loading of textures into the video card much faster if it doesn't have to rescale the image first. I have found that it is more important to make larger textures comply with the rule than smaller textures. You can get by with not making some of the textures on a table comply but if none of the textures comply, you will have many people that won't be able to play your table.
I used to think that the texture on the table loading screen could not be made to comply with power of two because there is no combination of the numbers 64, 128, 256, 512, 1024, 2048 or 4096 that matches a 16x9 shape that fits a monitor. However, FP has the ability to stretch or squeeze any shape to fit the screen (or object). You just have to figure out how to distort the image so it looks correct on the screen which is what I will show you how to do.
You can perform this same process for video where each frame is uploaded to the FP texture manager. There are many bulk image resizers on the internet where you can resize many frames at one time. I have used this one that does it online:
"FastStone Photo Resizer" is freeware that does it also:
"IrfanView" is another freeware package:
IrfanView - Official Homepage - One of the Most Popular Viewers Worldwide
IrfanView ... one of the most popular viewers worldwide.
www.irfanview.com
Step 1
You start out by using a texture on the table loading screen or applied to objects on the table that does not comply with power of two. On "Space Shuttle", I just added textures as needed without thinking about power of two. When I was done, I deleted all unused textures and exported all that did not comply with power of two. Then I performed Step 2 and imported the textures back into the table.
You can expand this if you want to learn more about making images fit objects or move on to Step 2.
For a table loading screen, you can use many images that can be found on the internet; however, the texture needs to be a 16x9 shape and you may need to crop the image so it fits. You can use this formula to do the math:
Height of image Height of screen
------------------ = ------------------
Width of image Width of screen
You need 3 of the variables and solve for the fourth. So you can solve for either the "Height of image" or " Width of image". On the "Space Shuttle" table, I found an image that I liked that had the dimensions 1600x900 (width = 1600 and height = 900).
Height of image /1600 = 9/16
Multiply both sides of the equation by 1600 and you get
Height of image = 9/16 x 1600
Height of image = 900
So I got lucky and happened to find a texture that is already 16x9.
I found another texture to use for a portrait use on a pinball cabinet that was 2137x3000 (width = 2137 and height = 3000). I didn't get so lucky and had to crop some of the image. Since pinball cabinet users rotate their screen, they end up using a 9x16 (9 wide, 16 high). These are the calculations:
Height of image / 2137 = 16/9
Height of image = 16/9 x 2137
Height of image = 3799
or this works also:
3000 / Width of image = 16/9
3000 = 16/9 x Width of image
3000 x 9/16 = Width of image
1,687.5 = Width of image
So, my calculations have 2 options. Option 1 would be 2137x3799 or option 2 would be 1,688x3000. I decided to use option 2 and crop the 2137x3000 down to 1,688x3000. Using 2137x3799 would require adding content to the top and/or bottom of the image which I have done on some tables but wasn't necessary on this table.
You can use the same math for determining the size of overlays. Instead of using the height and width of the screen, you would use the height and width of the overlay.
If you have an irregularly shaped surface, I have found I can just take a screenshot of a surface in the FP editor and paste the screenshot in an image editor. Then I cut away all the area around the surface, resize it, and then paint it the way I want it to look.
If you have a rectangular surface, you can use an overlay to measure each side by matching the height and width.
If you plan on reducing the size of the image, don't do it until you perform Step 2.
Step 2
Once you create the image that is not a power of two, you multiply the width times the height to get the total number of pixels in the image. Find the closest match in the left column below. In the first example above, I ended up with an image 1600x900. Multiplying 1600 by 900 equals 1,440,000. Find the closest value to 1,440,000 in the column named area below. The number is in between 1,048,576 and 2,092,032 and I ended up using 2,092,032. There are 4 choices and I used 2048x1024 because it resulted in the least distortion of the image. I ended up adding some pixels to the image which is usually not very desirable but I didn't want to reduce the resolution. It would have been better to find a larger image but I couldn't find one.
For the 1,688x3000 in the example from Step 1, I decided to reduce the size of the texture and make it comply with power of two in one step. I resized it to 1024x2048.
Area Width Height
4,096 64 64
8,192 64 128
8,192 128 64
16,384 64 256
16,384 128 128
16,384 256 64
32,768 64 512
32,768 128 256
32,768 256 128
32,768 512 64
65,536 64 1024
65,536 128 512
65,536 256 256
65,536 512 128
65,536 1024 64
131,072 64 2048
131,072 128 1024
131,072 256 512
131,072 512 256
131,072 1024 128
131,072 2048 64
261,504 64 4086
261,504 4086 64
262,144 128 2048
262,144 256 1024
262,144 512 512
262,144 1024 256
262,144 2048 128
523,008 128 4086
523,008 4086 128
524,288 256 2048
524,288 512 1024
524,288 1024 512
524,288 2048 256
1,046,016 256 4086
1,046,016 4086 256
1,048,576 512 2048
1,048,576 1024 1024
1,048,576 2048 512
2,092,032 512 4086
2,092,032 4086 512
2,097,152 1024 2048
2,097,152 2048 1024
4,184,064 1024 4086
4,184,064 4086 1024
4,194,304 2048 2048
8,368,128 2048 4086
8,368,128 4086 2048
16,695,396 4086 4086
Here is an example of a texture as it is saved to FP and used in the menu of "Space Shuttle" which looks squeezed together:
This is the way the texture looks when you open the menu in the game where it is stretched back out :
The texture that I used to create the overlay on the table was originally 2256x186 which is not power of two. I resized it to 2048x256.