scutters Posted August 18, 2020 Share Posted August 18, 2020 Why would you want to mirror the playfiled onto the backglass?... it's because we're not all anti social, and when you've got people round if the cab's in the corner you can't always see what's going on. That's why! This is way to press a button after launching a table and have the backglass display replaced by a playfield 'mirror'. Not much use for older tables where the score is on the backglass maybe, but it's great for modern SS tables! Hopefully you get the idea of what i'm talking about with this remarkably bad video.. mirror.mp4 How to Do It Install and Setup OBS Studio Download and install from https://obsproject.com/download (i used V25.0.8) Open OBS Under Scene Collection menu, select New. Name it MirrorPF Sources window. Select Add. Set as Display Capture, name it PF. Select playfield screen and OK it. Playfield screen should now be shown in Preview window. Right Click on Preview window, select Fullscreen Projector (Preview), select the Backglass montitor Right Click on Preview window, select Transform->Rotate 90 degress CW Right Click on Preview window, select Transform->Center to screen Manually resize the red rectangle in preview window by dragging the corners to fit (you can size so the apron and/pr top of playfield will not be mirrored to the backglass) Optional OBS Setup Add a background, this will replace the black border areas around the playfield screen on the backglass. I used https://www.youtube.com/watch?v=PGx0teEbLJ8 (rotated, cropped and then resized to same resolution as my backlass monitor). In Sources window, right click and add Media Source, name it Background. Navigate and select a file to use. Check the Loop checkbox, clear all others except local file. Move Background in sources window to bottom of the list (drag it) Right click Background in sources window, select Transform and the Fit to Screen. At this stage you should have preview showing on your backglass of the playfield screen and a border or selected background on either side. Final OBS Setup From the main window menu, select File->Settings and check the box to Save projectors on exit and Apply. Exit OBS (by closing the main window, not the preview window) Go to C:\Users\yourusername\AppData\Roaming\obs-studio\basic\scenes and locate the MirrorPF.json (or whatever you call the scene in step 1). Right click on that file and select to make it Read Only (this is important!, if not set to read only OBS will re-open without the preview / mirror window after being closed by a batch file). Remove the read only flag if you want to amend tweak anything later but remember to set it back after. Visual Pinball Make sure you have a recent version of Backglass server that will open backglass files behind other screens (https://www.vpforums.org/index.php?app=downloads&showfile=12553) Open Visual Pinball\Tables\B2STableSettings.xml, if you have a line at the top that reads <FormToFront>1</FormToFront> change it to <FormToFront>0</FormToFront> so that the backglass will run behind the OBS playfield mirror Batch File to Open/Close the Playfield Mirror to Backglass Paste the code below into notepad and save as a batch file (*.bat) with a name and location that suits you (change the path in the code "C:\Program Files\obs-studio\bin\64bit\" to your install location if required) tasklist /FI "IMAGENAME eq obs64.exe" | find /i "obs64.exe" IF ERRORLEVEL 1 GOTO STARTOBS IF ERRORLEVEL 2 GOTO KILLOBS :KILLOBS TASKKILL /im "obs64.exe" /f GOTO EXIT :STARTOBS CD "C:\Program Files\obs-studio\bin\64bit\" START OBS64 --minimize-to-tray --scene "mirrorpf" GOTO EXIT :EXIT The batch file will toggle the playfield mirror to backglass on/off. Calling the Batch File Ideally you'll have a programmable button somewhere on the cab that can call the batch file directly when needed (i have a griffin powermate that i use mainly as a volume control, but i can also press it in to call a batch file). But it could possibly also be used in PinballX via launch before and launch after commands for tables (but you'd probably need to setup a new system in PinballX and duplicate tables across from an existing system). Note - I only tested using a programmable button. Performance I run a 3 screen system, all at 60hz, 4k playfield. VPX vsync / frame limiter set to 1 and exclusive fullscreen. I haven't noticed any lag at all introduced by mirroring the playfield using a GTX1080. So it's all good! 1 Quote Link to comment Share on other sites More sharing options...
Mike_da_Spike Posted August 18, 2020 Share Posted August 18, 2020 Nice one @scutters. You are full of surprises!. Not sure where you find all the time to figure this out If tested it and works ! Now I need to find some friends, that wants to play pinball 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted August 18, 2020 Author Share Posted August 18, 2020 4 hours ago, Mike_da_Spike said: Nice one @scutters. You are full of surprises!. Not sure where you find all the time to figure this out If tested it and works ! Now I need to find some friends, that wants to play pinball Thanks for testing it out Mike. Good luck with finding some friends 1 Quote Link to comment Share on other sites More sharing options...
scutters Posted August 20, 2020 Author Share Posted August 20, 2020 2nd take on this... as performance isn't an issue, i've decided to have the playfield mirror on the backglass always on!. Squeezing the backglass and using ~1/3 of the screen for a playfield mirror. mirror2.mp4 This has the advantage that you don't need a button to toggle it on/off, no need to use a background, and you don't get occasional issues with some backglass files still wanting to stay in front of the mirror image. Some backglass files also look better 'square' (using the other 2/3 of the backglass screen), some don't. Instructions are similar to first post above except; Install and Setup OBS Studio - no need to center to screen, drag the red rectangle in OBS to the left or right of the preview area. Optional OBS Setup - None of those steps are needed as no background used. Final OBS Setup - extra step needed in settings, Make Projectors Always on Top - uncheck this option Visual Pinball - no need to change formtofront in B2STableSettings.xml. And then a few extra bits to change; Visaul Pinball\Tables\Screenres.txt - Adjust , backglass width and x offset, also dmd x offset. See https://www.vpforums.org/index.php?showtopic=19589&p=179173. You can do this with trial and error or if you're a pup pack user you can user the pup screen setup program to work out the values by adjusting the screen preview settings (which you'd need to do anyway) PinballX - Adjust display settings backglass values- should be similar to screenres.txt changes, and then call the batch file to toggle the mirror on/off in Run Program at Startup and on Exit Program in settings.exe. Now Mrs Scutters can sit back and marvel at my playing ability from a distance while waiting her turn (edit - sorry about the size of the video window in the post, I don't know how to resize it!. Try right click and Open video in tab for a better view) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.