Closed michaelosthege closed 12 months ago
@michaelosthege Thanks for bringing this to my attention. Rotating a viewport makes absolutely no logical sense since the viewport is rendered by DCS and Helios does not have the ability to influence the orientation. The layout editor for the viewport should not provide the option.
@michaelosthege If you want to rotate the exported MFD viewport within Helios, then the "Screen Replicator" in the "Special Controls" category will allow you to take viewport rendered somewhere inconsequential, and then rotate it when Helios renders it.
Shipped in 1.6.6030.1
@michaelosthege If you want to rotate the exported MFD viewport within Helios, then the "Screen Replicator" in the "Special Controls" category will allow you to take viewport rendered somewhere inconsequential, and then rotate it when Helios renders it.
Thanks for this pointer!
With the Screen Replicator I'm getting closer to a solution. I tried to place the viewport just outside the small screen, but within the render area:
(The left red rectangle is the left MFDC viewport.)
An in-game screenshot confirms that the viewport is there:
However, it looks like the screenshot only captures the screen are, not the render area: If I place the center of the screenshot area on the top right corner of the bottom-left screen, the screenshot contains half the content rendered on the screen and remains transparent in the area where the viewport is located.
It will probably work to add another monitor just for displaying the viewports, but this would almost double the total render area 🤔
Do you have an alternative idea? How hard would it be to make the screen replicator also capture off-screen render area?
EDIT: Maybe this https://stackoverflow.com/questions/891345/get-a-screenshot-of-a-specific-application
I tried the screen replicator, but it maxed out at a couple of FPS with considerable lag. I think this is because its capturing the whole screen, which in my case is 7680x2760.
So I searched for alternatives that might be more efficient and found this: https://github.com/justinstenning/Direct3DHook
This hooks into Direct3D 9/10/11 and gets the frame data from the "back buffer", actually just copying the region of interest.
I tested their "TestScreenshot" app with DCS and it managed to screenshot the off-screen region at about 7 fps. And this was in a way that only triggered the next screenshot once the previous one got displayed in the Windows Forms app, so with some refactoring towards a one-way pipeline it should give enough FPS to look good.
Without knowing a little more detail, my current thinking is:
How hard would it be to make the screen replicator also capture off-screen render area?
Have you tried it? The capture location for the Screen replicator does not have to be a location on the current monitor, and it can take a negative offset.
Thanks for the links however the Screen Replicator is so niche that I don't know that anyone uses it (other than you) so completely changing the screen capture is unlikely to ever have sufficient priority to get implemented. I'm happy to consider a PR if you want to submit it ;-)
Currently at work, so I can't take a screenshot, but this is my monitor configuration:
For the tests I expanded the green box to cover all monitors (I know, not the most efficient), but eventually I'd like to keep the right 4K monitor deactivated because only the left one and the small ones are attached to my simpit.
Have you tried it? The capture location for the Screen replicator does not have to be a location on the current monitor, and it can take a negative offset.
Yes I tried that, and the screenshots it took were partially transparent, right in the off-screen area. That's why I'm excited about the Direct3D thing.
In your 5. proposal, are you suggesting to create a "virtual monitor" using this usbmmidd thing and then screenshot-replicating from those virtual monitors to the real ones?
screenshots it took were partially transparent
Not sure I understand why some viewports get exported with no background and some have a black background, however the setup in 5. causes Monitor 2 to be black so if the viewport is transparent, the capture is not.
I am suggesting creating a virtual monitor and have it operate as you describe.
Got it working: https://github.com/michaelosthege/ViewportReplicator
Details and screenshots are in the README.
I looked up the PCB800099 manual, but there was no documentation about hardware settings, and I didn't want to disassemble it again..
I also didn't try the Adjustable Screen Replicator, but from the way how it takes screenshots, it would probably require placing the viewport in a different position too, while my solution via Direct3DHook doesn't require the viewport to be visible in the foreground.
@michaelosthege Many thanks for documenting what you've investigated and accomplished. I'll take a look at your repo, and hopefully there will be options for a wider audience for your code. Thanks for sharing.
[x] I have read Getting Help
Describe the Helios Issue
Using v1.6.602 (the latest right now) I'm trying to rotate my left MFD by 180°.
After setting
Rotation="180° Turn"
, clicking theConfigure
button in the DCS Monitor Setup has no effect and the button does not disappear.When setting a 90° rotation, I can save the monitor setup by clicking
Configure
, but ingame the viewport was still in its original orientation.Steps to Reproduce the problem
Steps to reproduce the behaviour:
Expected behavior
I expected the "Rotation" setting to rotate a viewport around its center.
Screenshots
Fig 1.: MFD Viewport with 180° rotation setting
Fig 2.: "Configure" button doesn't execute
Please complete the following information:
The problem happened while using
(place an 'x' between the square brackets for all that apply)
Additional context
Just started using Helios today, because I couldn't rotate the MDF viewport in pure DCS monitor config. Even though my MFD is still upside down, I'm very impressed by Helios so far!
This is the monitor configuration from the profile, with the
ROT180
edited by hand:I found the Configure method in MonitorSetupViewModel.cs#L386. Maybe the callbacks passed as
installationDialogs
don't work? Because I never saw any dialogs, but the installation apparently failed.And what's the matter with the
DisplayOrientation
enum which is in the XML but not in the GUI?Oh and of course I tried to rotate the screen in Windows, but the damn thing just ignores that.