Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

monitors DAT confusion

General discussion about anything TouchDesigner

monitors DAT confusion

Postby harveymoon » Sat Jul 20, 2019 3:02 am

I am trying to uniquely identify what screen/projector is connected to an output.
This information should be in the EDID.

In Windows 10 It is possible to get the monitor's serial number using the WMI utility
see this example:
https://www.activexperts.com/admin/scri ... thon/0073/

The monitors Dat orders its "index" based on X/Left position of the display arrangement. The windows display manager index ordering shows a completely different index order and seems arbitrary.

https://www.derivative.ca/Forum/viewtopic.php?f=27&t=6502&p=24777&hilit=monitors+dat#p24777

But I think it is in the order it was plugged in. WMI orders its list of displays in the same order, but it doesn't reveal an "index" variable or a screen position, just a unique display name.

Where is the "name" column in the Monitors Dat coming from in the system level? how come WMI comes up with a very different name? Any way to identify what display WMI is referring to in the Monitors Dat list?

how can I connect the data I am finding with WMI to the spacial coordinates shown in the Monitors DAT? I can't figure out how to get screen position from WMI or I would use that as a way to identity each display.



chanOrder-windows.PNG
Windows shows a numeric order different then the arrangement
chanOrder-windows.PNG (2.77 KiB) Viewed 581 times




ChanOrder-TD.PNG
Touch shows and order based on X, that re-orders when arrangement changes
ChanOrder-TD.PNG (49.98 KiB) Viewed 581 times




ChanOrder-WMI.PNG
WMI outputs an ordering the same as windows display manager, coincidence?
ChanOrder-WMI.PNG (64.19 KiB) Viewed 581 times
harveymoon
 
Posts: 119
Joined: Mon Jun 29, 2015 8:42 pm

Re: monitors DAT confusion

Postby harveymoon » Sat Jul 20, 2019 11:36 pm

ok, it seems that Touchdesigner uses the win32api to request monitorInfo

Code: Select all
 
import win32api
monitors = win32api.EnumDisplayMonitors()
win32api.GetMonitorInfo(monitors[0][0])

     
win32api.GetMonitorInfo(monitors[1][0])




responds with
{'Device': '\\\\.\\DISPLAY1', 'Work': (0, 0, 1920, 1080), 'Flags': 1, 'Monitor': (0, 0, 1920, 1080)}
{'Device': '\\\\.\\DISPLAY2', 'Work': (1920, 0, 3360, 1080), 'Flags': 0, 'Monitor': (1920, 0, 3360, 1080)}

the question remains how can I confidently connect each display instance from this method to the serial numbers I am getting from WMI?
harveymoon
 
Posts: 119
Joined: Mon Jun 29, 2015 8:42 pm

Re: monitors DAT confusion

Postby harveymoon » Sun Jul 21, 2019 10:37 pm

So it appears that the ordering of both the win32api and the results from WMI monitorID are both in the same order.

I am guessing that Touchdesigner is automatcally re-ordering them based on X position between parsing this value and displaying it in the Monitors DAT.

I was able to merge the two results and so far they match up every time, I will need to keep plugging in new screens in different orders to keep testing this.

I don't know windows very well so I am sort of blind in the dark finding this out.
It would be SUPER COOL if the Monitors dat had some additional info about the connected displays. I will post my results soon.
harveymoon
 
Posts: 119
Joined: Mon Jun 29, 2015 8:42 pm

Re: monitors DAT confusion

Postby jmt4zj » Sun Jul 21, 2019 11:11 pm

I agree.

It seems like the automatic reordering of windows is great for casual use of the monitor DAT, but definitely is more difficult to use for permanent installations where you want to programmatically attach to things - things like reboots from windows updates can change this reported ordering, if I'm remembering a few past gigs of mine correctly.
Jonathan Thompson
@pointshader
http://pointshader.com
User avatar
jmt4zj
 
Posts: 160
Joined: Mon Nov 01, 2010 3:15 am
Location: NYC

Re: monitors DAT confusion

Postby malcolm » Mon Jul 22, 2019 11:30 am

Can you elaborate on how it makes things harder for permanent installations? We specifically did the automatic reordered because this way your monitor indices are consistent between reconnects, so when you say 'Open a Window on monitor 0', it'll always open at the same spot on your desktop.
Without the automatic reordering your Window COMPs could end up anywhere after reconnects.
User avatar
malcolm
Staff
 
Posts: 4396
Joined: Tue Nov 13, 2007 1:11 am

Re: monitors DAT confusion

Postby harveymoon » Mon Jul 22, 2019 1:23 pm

It's fine if you want to re-order them by X, it just makes it harder for me to connect the serial numbers. Maybe you can just add this serial number info to the Monitors Dat?

This is a holy-grail technique I have been trying to figure out for years.

If it were possible to identify uniquely what display by serial number, you can define a configuration file that opens a specific tox/media for that output, regardless of its arrangement or whatever computer it was connected to. This essentially removes any windows arrangement adjustments needed.

A server rack of machines all with the same config file listing all possible serial numbers could be plugged in randomly to a bunch of projectors, a configuration file will uniquely identify each projector's serial number and assigned TOX, we would know it's position using monitors DAT.

Knowing uniquely what display is connected makes the system arrangement agnostic and allows for a high degree in system flexibility if any routing needs to change.

Historically I would build a config file that dictated what outputs I expected per machine and opened a perform window of that bound size. It would not know if those screens were in the correct order or if they were in the correct windows arrangement, this would require re-routing manually, virtually on the video switcher, in the config file or in windows display arrangement control panel.

This technique removes any need to re-arrange outputs ever, since the output EDID dictates what media TOX loads.
harveymoon
 
Posts: 119
Joined: Mon Jun 29, 2015 8:42 pm


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 9 guests