I have a WPF application that makes extensive use of Viewport2DVisual3D (renders 2D elements within 3D viewport). Themes are heavily customised as well. Basically, most of the content is 2D, but the 3D viewport is used to create the look of an angled panel.
Is Viewport2DVisual3D supported by Ab3d.DXEngine? What performance gain/loss could I expect?
Viewport2DVisual3D is only partially supported in DXEngine. This means that DXEngine can render its content but does not support interaction. The problem is that for the interaction to work the Viewport2DVisual3D needs to be shown on a Viewport3D that is visible in the WPF visuals tree (when Viewport3D is rendered with DXViewportView, it is not visible).
I have checked the source code of Viewport2DVisual3D object to see if there is another way to enable interaction with somehow passing mouse data to the object but there seems to be no way around this.
A similar limitation exists for UIElement3D objects. There it is also not possible to get mouse events from the object.
Therefore, if you need interactive Viewport2DVisual3D, you will need to use WPF 3D rendering (Viewport3D without DXViewportView).
To show 2D WPF controls in DXEngine, it is possible to use VisualBrush for a material. But you will need to manually update the material when the 2D controls are changed. See the "VisualBrush Test" sample that comes with DXEngine for more information.
Thank you for the response, Andrej. I downloaded and built your samples. It was on a rather old laptop so GPU performance isn't that great. The 3D performance gains were quite impressive, though. Other tests (like the VisualBrush) shows little perceivable difference from the standard WPF rendering engine.
What I really need to do is some testing specifically with my app. Hopefully I'll be able to do this soon.