EisTee Posted August 13, 2024 Posted August 13, 2024 (edited) Hi, I wanted to get rid of distorted backglasses, so I created a calculation in Excel to generate .res files based on the image provided in the .directb2s file. To get the resolution of the image, you can export it from B2S Designer, look it up in vPinStudio, or extract the base64 string, rebuild the image, and obtain the resolution. After this i put it all in ChatGPT and got myself a script that worked for me so i dont had do manually generate ~200 .res files. DONT USE THIS WHEN YOU USE IT BACKUP BEFORE DONT USE THIS WHEN YOU USE IT BACKUP BEFORE DONT USE THIS WHEN YOU USE IT BACKUP BEFORE DONT USE THIS WHEN YOU USE IT BACKUP BEFORE Maybe someone who knows programming can do it to work for everyone or something like this can be integraded in the existing ScreenRes programm. I testet around ~200 tables and their according backglasses and all showed up in correct aspect ratio. Note the excel can calculate aspect ratio for fullDMD that isnt FullHD (CheechChong, Beavis and Butthead, Qbert, Pink Panther) but the script dosnt. My screen in Windows are arragnt like: Playfield 1 FullDMD 2 Backglass 3 Left to right and top is alligned. Resolutions are: Playfield 3840x2160 FullDMD 1920x1080 Backglass 2560*1440p It also comes with basic command line abbility for including. This dosnt have a progressbar or any other indicator its running but it works. main.exe --files "c:\temp\A.directb2s" "c:\temp\B.directb2s" --width 2560 --height 1440 --playfield_width 3840 --playfield_height 2160 --display_index 2 Overscan zooms in to will complete width of backglass and keep aspect ratio. Its not working anymore and i havent debugged it cause i rly looks more akward then strechted but you can get the idea. The result look like this. My Desktop is black (pink for better view) there is no B2S Background in use. I am very pleased with the result. I will not do any troubleshoot on this because without knowing programming its tidious to tell ChatGPT what to change and what not. And it seems it got to complex now and crashes after every change. New tables I'll do by hand if necessary. Maybe this function is already included somwhere else but i coul not find it. B2S Calc.ods main.py main.exe Edited August 13, 2024 by Aetron
jarr3 Posted August 13, 2024 Posted August 13, 2024 Cool idea, will check if we can add something like this to the Server directly... Please check the exe... Chrome means it contains a virus and doesn't let me download it at all. I suppose it is an exe out of the python script?
EisTee Posted August 13, 2024 Author Posted August 13, 2024 (edited) Quote will check if we can add something like this to the Server directly... this would be awsome Its the exe i build with pyinstaller as following a random guide to this. It was compiled in a blank Windows VM with only python installed because my PC has somhow a weired python enviroment. But yes its just the compiled script because i dont want to add Phyton on my cabinet i was scared it will wreck something. All calculation needed for this is in the spreadsheet without all the "bloadware" for gui and stuff. Edited August 13, 2024 by Aetron
jarr3 Posted August 13, 2024 Posted August 13, 2024 Just as a note, the prefered screen order is Playfield Backglass DMD as described in the wiki (https://github.com/vpinball/b2s-backglass/wiki/Read-this-first!!!#2-3-screen-users) and also elsewhere. Your calculations might not work where people has installed according to this. And if it should come into the B2S.Server it will also follow this standard. But, of course I still like this idea!
EisTee Posted August 13, 2024 Author Posted August 13, 2024 (edited) Yes that are some old mistakes i have done that now need to be adressed. I was thinking that is the reason my values are negativ sometimes. My first approch was to get the aspect ratio out of the resolution i have seen in vPinStudio. Then i thought hmm why not get the neast by aspect ratio and copy+rename a template. Then i asked @Syd7111how he does this with the resolution. Me mention me its base64 coded. I was messuring the Grillhigh with Photoshop first until i found it in the file. After this it was just some rule of three and some excel. The rest was handelt by the AI. INFO: my grills are disabled. Edited August 13, 2024 by Aetron
EisTee Posted August 14, 2024 Author Posted August 14, 2024 (edited) On 8/13/2024 at 6:27 PM, jarr3 said: Just as a note, the prefered screen order is Playfield Backglass DMD as described in the wiki (https://github.com/vpinball/b2s-backglass/wiki/Read-this-first!!!#2-3-screen-users) and also elsewhere. Your calculations might not work where people has installed according to this. And if it should come into the B2S.Server it will also follow this standard. But, of course I still like this idea! Does this applie to the numbers or the arragment ? I rearanged my screens but the numbers arent chanching and there not seems to be a option for this. In fact it got worse But ScreenResIdentifier says its 1and VPX also. Edited August 14, 2024 by Aetron
EisTee Posted August 14, 2024 Author Posted August 14, 2024 (edited) Change line 327 to this and it work with this arragment. Testet around 10 tables. dmd_x = (int(resolution[0]) + x_position) B2S Calc.ods Edited August 14, 2024 by Aetron
jarr3 Posted August 15, 2024 Posted August 15, 2024 (edited) The numbers is only for you when you press to identify the screens, and it then shows the numbers on each. I would expect the numbers to become 1, 2 , 3 on reboot. But I do not think they have anything to do with the device name. You can select "Screen index (=#)" which means it uses the screen index from left to right instead of the display device name to always stay constant (which it doesn't always do) This has all become much better with windows 11 and windows will store the last position for this exact set of monitors you have setup. If you would be so kind to add an issue on github (you need an account), so that we do not forget it: https://github.com/vpinball/b2s-backglass/issues Edited August 15, 2024 by jarr3
EisTee Posted March 23, 2025 Author Posted March 23, 2025 DONT USE DEVICE NUMBER DONT USE DEVICE NUMBER DONT USE DEVICE NUMBER Go for pixel coord @ in your config in a longterm this prevent strange behaviour with other tools like vpinstudio dmd auto position.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now