Dear all,
I'm developing a game where I have a window in the center which displays some instructions. The instructions are avi-videos that another member of my team recorded. On top of the video instructions, the game is supposed to be superimposed and transparent. That's why I originally went for XNA - I wanted to take advantage of its full 3d-capabilities to animate the game. What we want is best described with an image. Our ideal situation is something like
this. That is a screenshot from "Ultrastar" which is a Singstar clone where you can import your own videos. Notice how the graphics are on top of the background video, but you can see through the gaps between the note lines? That's what we want.
During my research, however, I found that XNA has no acceptable way to playback video, so I had to host my XNA game in a PictureBox on a Windows Form, so I could take advantage of WinForms' video capabilities, such as the managed DirectX library AudioVideoPlayback. But this introduces another serious problem: Winforms applications are drawn by GDI+ (right?) and are totally 2D. They can't do opacity like that, so I have no way to get the PictureBox with the XNA output to display transparently on top of the video.
I've tried like 4 or 5 different solutions to this pesky problem. I've tried overriding the Paint method of the picturebox to prevent it from drawing its own background since that supposedly achieves true transparency, but all I get from that is a black background when it's rendered. I've also tried to host everything in seperate MDI-windows inside an MDI parent container, thinking I could take advantage of the fact that the form itself actually does have an opacity property in WinForms, but that introduces the problem that MDI windows cannot be shown modally and I have no control over which windows wind up on top of one another when I pile them.
Finally, I started researching a port of my entire GUI to WPF because WPF controls all natively support opacity, but now I read that since WPF controls have no IntPtr-handle, I can't provide a target window for my XNA game to render its content to. So XNA can't be hosted inside a WPF application without interop, and then I fear the hosting control won't be a full-fledged WPF-control with the opacity that I want.
So... this is it. I've spent about 6 months of spare time on this ***, and now I'm afraid I'm out of ideas. Can anyone help me?
Thanks so much in advance,
Christian