Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

Locatable camera in Unity. When will Hologram photo capture will be enabled?

ZelethZeleth
edited August 2016 in Questions And Answers

The documentation states the following:
-Holograms cannot be captured in images and videos regardless of settings
-Hologram capture will be enabled by a future update

I am just wondering, when the community will have access to this feature? What is the best way to go about photo capturing mixed reality within Unity application?

Best Answer

Answers

  • You can get an image which includes what the hololens camera sees as well as any holograms in view. Use PhotoCapture class and when calling StartPhotoModeAsync then ensure you pass CameraParameters which have hologramOpacity set to 0 (I think 0 so it is not opaque).

  • After making sure hologramOpacity was set it 0 in CameraParameters. I still didn't get a successful mixed reality capture. After checking the code I released "PhotoCapture.CreateAsync" bool showHolograms was set to false. After turning showHolograms bool to true, mixed capture still didn't work. Any other suggestions to try?

  • Thank you Patrick for the code! I'll check it out and let you know the results.

  • @Zeleth said:
    Thank you Patrick for the code! I'll check it out and let you know the results.

    hello,

  • utekaiutekai ✭✭✭

    I used the sample code for taking pictures, here https://developer.microsoft.com/en-us/windows/holographic/locatable_camera_in_unity

    Then modified opacity to 1 from 0.

    CameraParameters c = new CameraParameters();
    c.hologramOpacity = 1.0f;

  • For C++ there is a Holographic Mixed Reality Capture Example on GitHub

  • @Patrick
    I want to record mixedreality video in unity. I already tried using VideoCapture ( https://developer.microsoft.com/en-us/windows/holographic/locatable_camera_in_unity) .
    but hologram is not appeared even if cameraParameters.hologramOpacity = 1.0f.
    how can I use above code for capturing video instead of picture?

  • As of a couple of months ago, the Hololens is able to capture mixed-reality photos using the locatable-camera standard code (i.e. PhotoCapture.CreateAsync).

    You no longer need to use the technique posted by Patrick above (though it must have helped a lot back then).

    Just ensure that you set the showHolograms parameter to 'True' when calling CreateAsync, and that you set the hologramsOpacity under cameraParameters to 1.0f as utekai's answer suggested above.

Sign In or Register to comment.