Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: store DMD hole position/dimensions with FullDMD / grill #70

Open
francisdb opened this issue Nov 9, 2023 · 27 comments
Labels
B2S Designer for the B2S Designer enhancement New feature or request good first issue Good for newcomers

Comments

@francisdb
Copy link

Feature request

Let the b2s author indicate the location of the hole reserved for the DMD.

This would have to be a relative position so coordinates within the FullDMD window can be calculated from the actual window size.

eg:

x1, y1, x2, y2
0.2, 0.2, 0.8, 0.6
FullDMDRes = 1024*768
DMDLoc = 0.2*1024, 0.2*768, 0.8*1024, 0.6*768

On standalone we could then automatically place the DMD window relative to the FullDMD window.

@francisdb francisdb changed the title DMD location inside FullDMD Feature Request: DMD location inside FullDMD Nov 9, 2023
@francisdb
Copy link
Author

In case of 2 screens the location might be in the backglass instead of the FullDMD

eg: Checkpoint (Data East 1991)

@JockeJarre
Copy link
Collaborator

JockeJarre commented Nov 13, 2023

Sounds like a cool feature... but for the B2S Designer (as a first checkpoint) ?

This way the directb2s files would get this information into it's xml structure. Something you would like to look into?

@JockeJarre JockeJarre added enhancement New feature or request good first issue Good for newcomers B2S Designer for the B2S Designer labels Nov 13, 2023
@francisdb
Copy link
Author

Feel free to move this to the appropriate repo.

@francisdb
Copy link
Author

Regarding looking into this I guess that's not doable on Linux/Mac?

@JockeJarre
Copy link
Collaborator

Feel free to move this to the appropriate repo.

We can leave it here, cause we will need a change both here and in the Designer. So another issue on the Designer to make it possible to mark the DMD position.
By the way, I checked your Table inspection tool as inspiration for my VPinballX.starter.

Regarding looking into this I guess that's not doable on Linux/Mac?

You are right, it doesn't make it easier. I guess .NET isn't a blocker anymore, but these tools use Windows Forms for the GUI, so that isn't easy. I know there are users running the B2S Server on linux through Wine.
But it is of course possible to use a VM with VS already installed. M$ even has the VM files available for download with a license active for a couple of months.

@francisdb
Copy link
Author

francisdb commented Nov 15, 2023

@JockeJarre A Developer section in the readme that explains how to get started, what tools needed, how to build the project would be great. Same for the designer.

Not saying that I will find the time to look into this as I have other higher priority standalone issues I would like to see fixed first.

@JockeJarre
Copy link
Collaborator

Good point! Done!

@JockeJarre
Copy link
Collaborator

I think it should be rather easy once the DMD can be set in the Designer, the calculation of the position is already handled by the Server.

@francisdb
Copy link
Author

Personally I am mostly interested in the directb2s file and the designer as vpinball standalone ported the server code to C++ and standalone has a specific way of showing dmd's.

https://github.com/vpinball/vpinball/tree/standalone/standalone/inc/b2s

@francisdb
Copy link
Author

ping @jsm174

@jsm174
Copy link
Contributor

jsm174 commented Nov 15, 2023

Sorry, I'm not fully following. So we know the position of the B2S DMD window, but not the position of the VPinMAME or FlexDMD window inside the B2S DMD window. Or am I wrong on this?

@francisdb
Copy link
Author

francisdb commented Nov 15, 2023

We want to know from the .directb2s file what the location of this dmd hole is so we can put the dmd automatically at the correct location.

As you can see below these holes are not always the same size and at the same location

Fulldmd with hole from Corvette

image

Fulldmd from Black Rose with DMD at more or less correct location

image

@JockeJarre
Copy link
Collaborator

So that future version of the B2S.Server could potentially know where the DMD should be placed. Hopefully make a more seamless experience...

@toccata10
Copy link

Hi,
I'm developing the configgen on batocera for vpinball. The idea is to get everything as easy as possible for the user.
So, full DMD currently requires per table manual adjustment of the position and size. It would be great if this thing could be implemented.
I just wanted to let you know that this enhancement would be super useful for us to have automatic positioning.

@JockeJarre
Copy link
Collaborator

If you want to make it as easy as possible, I would inspect the images for the full DMD and grill and then find the largest rectangle within the image, to automatically define the position. Se the image examples above...
Or maybe to make it more bullet proof, have the full DMD and grill images defined as transparent where the DMD is to be positioned.

@francisdb
Copy link
Author

The simplest way is adding 2 relative coordinates to the xml. Other heuristics will be imprecise and slow down b2s startup.

@toccata10
Copy link

I completely agree that it's best to add coordinates in the xml. I would say: x,y,width and height.

@francisdb
Copy link
Author

For example here finding an empty square or transparent pixels won't help

image

@JockeJarre
Copy link
Collaborator

JockeJarre commented Jun 30, 2024

yes, sounds good! The B2S.Designer needs the possibility to mark the DMD position and save it in the directb2s file.
Here is the repository: b2s-designer

Do not forget, two different DMD positions are needed. One for 2 screen cab with grill and one for 3 screen with full DMD.

@Ltek
Copy link

Ltek commented Jul 4, 2024

this is 100% needed and was quite surprised it wasnt added long ago. basic text in a location of the B2S that other apps can read... even if it need to be manually input (eg, not using the designer's GUI to find the coordinates) would be better than nothing.

@JockeJarre
Copy link
Collaborator

It is so good we are open source, just hack away!

@stevejones72
Copy link
Contributor

stevejones72 commented Jul 10, 2024

Must admit this whole resizing all my DMD's has gotten a bit 'stale'.....

@francisdb francisdb changed the title Feature Request: DMD location inside FullDMD Feature Request: store DMD hole position/dimensions inside FullDMD / grill Nov 18, 2024
@francisdb francisdb changed the title Feature Request: store DMD hole position/dimensions inside FullDMD / grill Feature Request: store DMD hole position/dimensions with FullDMD / grill Nov 18, 2024
@ScreaminDemon
Copy link

For 2 screen I would make an alternate proposal.

The objective is to remove a few complex process from BG designer workload and at the same time standardize the output. That means that only by exception does the BG designer need to do any work related to the BG Grill - semi automated.

In the B2S designer app, BG designer only has to pay attention to the BG image. No need to set Grill/DMD dimensions or include it in the BG image. As part of the BG design process the designer only has to "call out/declare" the required Grill and B2S will insert it automatically when B2S server runs that BG. B2S server should include default Grill image of each table brand, including a few generic Grills e.g. unbranded round speaker, unbranded rectangular speaker etc. All default Grills are designed to be same dimensions and all DMD in same position.

@francisdb
Copy link
Author

Looks like something similar has been implemented by vpin studio.

https://github.com/syd711/vpin-studio/releases/tag/3.11.0

image

@francisdb
Copy link
Author

@Le-Syl21 wrote a tool to automate this
He is using Open Computer Vision to find the hole
https://github.com/Le-Syl21/dmd-config

@superhac
Copy link

@Le-Syl21 wrote a tool to automate this He is using Open Computer Vision to find the hole https://github.com/Le-Syl21/dmd-config

I can confirm I did over a dozen tables now and its been spot on. I couldn't do it better by hand on standalone. Nice work and thanks for the great tool!

@francisdb
Copy link
Author

To be complete, vpin studio also has this and uses a similar computer vision library

https://github.com/syd711/vpin-studio/blob/main/vpin-studio-server/src/main/java/de/mephisto/vpin/server/dmd/DMDPositionDetector.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B2S Designer for the B2S Designer enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants