Camera View Texture in an XML Gauge - Disable Alpha Write Issue?

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Locked
MS1787C
Posts: 13
Joined: Fri May 16, 2014 12:34 pm

Camera View Texture in an XML Gauge - Disable Alpha Write Issue?

Post by MS1787C »

Hi all,

I've encountered what appears to be a complex issue, and is Prepar3D 4.1 specific. Posting here, as this is one where the LM team's input is needed and would be greatly appreciated.

After upgrading my Prepar3D installation to 4.1, from 4.0, I've encountered a problem that appears to stem from a change in the rendering process. My own installation, as ever, is entirely default, and the issue appears independent of any change in my graphics drivers.

In short, I have been doing some work on the default F-22 included with P3D, implementing a sensor ('camera') display texture in a simple XML gauge, with a text overlay, for use in the Virtual Cockpit. The sensor view itself is defined in the Aircraft.cfg and has a post-process effect applied.

In 4.0 and previous, the sensor gauge displayed perfectly with the addition of "disable_alpha_write = 1", alongside "textures_below_panel = 1", in the appropriate VCockpit entry of the panel.cfg.
However, in 4.1, use of "disable_alpha_write" causes the gauge to not be visibly rendered at all (though it *is* still present and functional/mouse-able), whilst "textures_below_panel" allows the gauge itself to display but the view texture is not visible (i.e. it's black / transparent / behind the VC $texture?)

With both the above options set at '0', the view texture displays, but appears as a semi-transparent overlay on top of the gauge text and bitmaps, which is clearly not what I'm after - I want the text and graphics to lay above the view, opaque. Screenshot below to illustrate the issue - note, again, this arrangement rendered correctly in v4.0 and beforehand.

Image

Use of "textures_use_additive_blend = 1", whether standalone or in combination with the above panel.cfg entries, has never had any impact on the display, or otherwise, of the gauge, either in Prepar3D v3.4, v4.0, or v4.1, *except* whenever I display the view texture *without* the post-process effect applied. In this case, the text overlays the texture perfectly. When set at '0' the texture disappears, leaving only the gauge/text visible. Unfortunately, I really do need this post-process effect for the sensor display to be of any worth (it uses GDATA), unless there is a way of integrating it as a custom sensor mode.

I have exhaustively tested every combination of the above, so I'm fairly confident I've captured the key behaviours. At this point, however, I'm afraid to admit that the deep technical processes involved in rendering gauges in a 3D view are rather beyond my knowledge. All I know, is that what once worked does no longer, and the issue appears to hinge on how 4.1 treats these specialist panel.cfg entries vs. 4.0.

This is an unfortunate issue, especially as this is a feature I've been working on for a while and is nearly complete. Any help from knowledgeable experts and the LM team will be received gratefully.
MS1787C
Posts: 13
Joined: Fri May 16, 2014 12:34 pm

Re: Camera View Texture in an XML Gauge - Disable Alpha Write Issue?

Post by MS1787C »

Rare it is that I would reply to, and thus bump one of my own unanswered threads, but having given this problem some more thought, I'm now wondering whether the problem I've experienced lies in the way that post-processing is handled at some level in v 4.1 rather than v 4.0.

This is guesswork, I know, but the above image is a GDATA sensor mode with post-process applied. In the raw, the GDATA sits below the XML text fine, but the post-process then becomes applied to all elements of the gauge, rather than just the view texture.

Any thoughts? All input and ideas would be most welcome and appreciated.
Locked