Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upHolographic (HoloLens) support #5915
Comments
|
@vladkol would you mind setuping a pull request to get your work upstream? |
|
@vladkol 's repository isn't mine, though he is a Microsoft Dev that has a good rep for this sort of integration. There's no issues section on his repository, so I'm not sure how he might be notified to bring him in on this. If there's no one on the MonoGame team side to do the HoloLens support, please let me know and I will look into getting the work done. I think HoloLens support would be a good win for MonoGame! The @nkast tag appears to be unrelated. |
https://github.com/nkast/MonoGame/blame/90a6168313df00a42cf5a0083a32343afbcf600a/MonoGame.Framework/WindowsUniversal/UAPFrameworkView.cs#L16 https://github.com/vladkol/MonoGame/blame/8a11d8370a6d3eccf7789b0ae54eda12f74b54ca/HolographicSmokeTest/AppViewSource.cs#L7 I can go on... 8-) EDIT |
|
@vladkol repo seems good but would have been better if they had committed under a new branch to make seeing the changes easier. Walking through the commits, not sure I agree with creating "another" platform as Holographic is a superset of UWP (so @nkast 's link is right as it's updating uwp). Should really just be a few extensions to enable special mapping and other holographic extensions to UWP. I completely agree, this should either be in the base or (maybe better) an extension project to MonoGame like MonoGame.Extensions. MonoGame.Hologaphic? I'm digging more in to the Mixed Reality space which also uses similar extensions so I would be very interested in this, |
|
My fork is not quite done yet. So far, it only establishes non-XAML framework (CoreWindow only) for running the game, which would be helpful to have in MonoGame regardless of HoloLens/Mixed Reality support. |
|
The changes @vladkol has made to MonoGame are encapsulated within his last 4 commits. The recent SharpDX based HoloLens templates Microsoft put out are reasonably straight forward; the bulk of the Holographic initialization is just a form of preamble. I think @vladkol is the best person to move the Holographic MonoGame bits forward, but if that doesn't pan out I can look at doing this. What are your suggestions? (Thanks @vladkol , your post arrived before I sent this, so I didn't see it when this was written, this being an edit of the post) |
|
This is a great idea. I would love to have Hololense support in the main repo. @tomspilman just to get this on your radar. |
|
This thread has gone quiet for a month. Are there any HoloLens devs out there that are looking for Monogame support? Anyone taken another crack at this? |
|
At home I'm working on a proof of concept experiment with SharpDX and Oculus Rift... when it's mature enough, I want to try integrating it with monogame, trying to keep the changes to monogame core to a minimum, and I was planning to use vladkol's PR as a template. Sadly, it's going to be that way for a while, until we can settle on a common framework for VR. What's worse is that almost nobody has all the available helmets to work on a common framework. In my case I own a Rift, so it's the only one I can work with, but looking forward to see a Hololens/Mixed reality inplementation! |
|
I have made some progress with HoloLens. The basics are starting to work. There are input modalities that presently have no analog in the existing code, so I really have no clue how to wire in aspects of the HoloLens capabilities. Given where VR is headed, this is something that will have to be resolved soon. |
|
Is there a market for HoloLens ? wouldn't it be better to focus on Google/Apple AR solutions ? |
|
@Scellow The full story is: Microsoft developed the Hololens as a proof of concept to research and understand what's really needed for all aspects of VR, not only gaming. As it is, the hololens it's always been intended for developers only. Now that microsoft has achieved this stage, they've rebranded Hololens SDK to Mixed Reality SDK, which now supports many more VR headsets, and way cheaper than Oculus and VIVE. You can see the new batch of Hololens compatible headsets here. What's interesting is that, unlike all other VR platforms, the mixed reality SDK begins to look like some sort of standard... some people even call it DirectVR. And the best thing is that any company can build compatible headsets for it... and there's speculation whether Oculus and VIVE will eventually support it or not. The bad thing is that, of all existing VR platforms, is the less mature one... but, well, it's microsoft. Long story short, supporting Hololens means now, not only supporting the hololens itself, but all these new cheaper headsets, because they essentially use the same SDK. |
|
@vladkol I've forked and updated your branch, you can take a look at my changes here. I made a quick test with your demo project, it's a XamlGame, I changed few things in the XamlGame.cs to force MR but I got a black screen (but it starts, we can see the fancy animation in the MR headset when the application is started). I don't know if it can help you, but I'll continue to work on that fork if you can't. |
|
This will probably work better with the recent changes for the MonoGame CoreApplication template, rather than XAML. Although I haven't the time at the mo to dig through it. I think we also need to expose the "CoreWindow" from the Platform, like what is done in iOS and Android, as it's needed by the HL / MR API's for defining space. See #6038 |
|
Thanks to @nkast s work and the new "CoreApplication" template, I'm revisiting this again now. Digging in to this further now and although I like what @vladkol has done, it's (imho) a bit overkill. We shouldn't be adding a "Holographic" device with all it's mannerisms. Issue I'm facing with this atm, is that when you define a "Holographic" workspace, there is no one "graphicsdevice", these are initialised later (likely to allow for extension). So MG trips up because there is no GD to initialise. So I'm investigating options to either:
Slowly getting there. The "Holographic" example provided by the HL API in C#, uses SharpDX direct. So it's just a case of unpinning that work to implement in MG in a good framework way. |
|
Hey guys, I made some progress with @vladkol's branch, but I still have some problems because I'm not very good with SharpDX, maybe someone can help me. We've to create a IntPtr pSurface = IntPtr.Zero;
Marshal.QueryInterface(pResource, ref WindowsUniversal.DXUtils.IDXGISurface, out pSurface);
var obj = Marshal.GetIUnknownForObject(pSurface);
using (var dxgiBackBuffer = new Surface(obj))
_bitmapTarget = new SharpDX.Direct2D1.Bitmap1(_d2dContext, dxgiBackBuffer, bitmapProperties);This code crashes because the interface is unknow. So I tried this SharpDX.Direct3D11.Resource resource = SharpDX.Direct3D11.Resource.FromPointer<SharpDX.Direct3D11.Resource>(pResource);
Marshal.Release(pResource);
var texture = resource.QueryInterface<SharpDX.Direct3D11.Texture2D>();I can get a valid The idea behind this code to initialize the Holographic Space into MonoGame. The GraphicDevice is responsible to
|
Would be nice to see this integrated:
https://github.com/vladkol/MonoGame
so HoloLens support was built in.