Jump to content

Recommended Posts

Posted (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.


image.thumb.png.6f317bdd2f6e08a7a6f10441dbf12ef1.png
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 

image.png.0c8f6156d595b43e02d3d63773352383.png

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 
image.thumb.png.92c62ee39132483eaf45a42e41dc3eb6.png

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. 
image.thumb.png.b59716704d5649053498489dae0f381c.png
image.thumb.png.d431515e39dac3a7adf07010efe6cf70.png
image.thumb.png.bad44497954842c9c6c2101c72bfc8b4.png
image.thumb.png.8d69c8f724005cb9c63027b770f73a24.png

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 by Aetron
Posted

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?

 

 

Posted (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 by Aetron
Posted (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 by Aetron
Posted (edited)
On 8/13/2024 at 6:27 PM, jarr3 said:

Just as a note, the prefered screen order is 

  1. Playfield
  2. Backglass
  3. 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 :D
grafik.png.8266236e02640fe4e0538df42b3c8f67.png

But ScreenResIdentifier says its 1and VPX also.
 

grafik.pnggrafik.png.2221add7ec53062d4922c326d55def5b.png

Edited by Aetron
Posted (edited)

Change line 327 to this and it work with this arragment.
Testet around 10 tables.
 

dmd_x = (int(resolution[0]) + x_position)

grafik.png.4101b9f20604b31e4996653919d3a20b.png

B2S Calc.ods

Edited by Aetron
Posted (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 by jarr3
  • 7 months later...
Posted

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. 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...