WPF 3-D Efficiency for Head Tracking Application

Im working on creating a full-screen 3-D application (based on the Johnny Lee Wii head tracking application ) with some added steps, and it seems that WPF is too slow to display even simple Im models using a reasonable frame rate. I think the problem is that I need to change the view and projection of the camera on almost every frame due to the nature of the application (it uses a webcam to track the face and uses this data to move the camera around and change its perspective).

I spent a lot of time trying to narrow down the problem, and this is definitely related to the graphics, and not the speed of the header tracking API that I use. Also, I recreated the application in XNA and it seems to work fine (28 FPS versus 9 in WPF). Finally, when I remove the “walls” or increase the size of the window (say, 800 x 600), WPF's performance improves significantly, which makes me think that the graphics bottleneck is.

As a result, I need to either find a new GUI to work with or find a way to make WPF much faster for this application. I mainly look at DirectX and XNA, and possibly OpenGL. Any recommendations on which of these APIs is best used for this application in .NET? Or, alternatively, any idea what I am doing wrong in WPF is slowing down?

+3
source share
3 answers

I haven’t done enough with 3D in WPF to be able to say what might cause slowness, but I noticed that the data modeling model is not very efficient. Although this may not be the cause, it may be a symptom of general slowness for the entire pipeline.

One thing spring does is that WPF creates the scene in the software, rather than using hardware acceleration on the graphics card. The fact that you get better performance (although you don't say how much better) with a smaller window.

If you remove any textures from your model, do you also get better performance?

, , Direct3D OpenGL - . XNA - , .NET, Visual Studio - Express Edition.

+2

SlimDX, DirectX, XNA WPF

, API, XNA/WPF werent, , , .

+1

: WPF , ( Windows, ..), XNA 3D. , XNA WinForms. "" XNA WPF.

:, , XNA WPF. , XNA WinForms, WinForms WPF . ().

0

Source: https://habr.com/ru/post/1716519/


All Articles