question

RulerReal-7534 avatar image
0 Votes"
RulerReal-7534 asked SethDu-MSFT edited

Cannot capture mixed reality video by Micosoft Hololens companion app or Windows Device Portal

I would like to use Windows Device Portal or Microsoft Hololens app to capture mixed reality videos with both real and virtual objects.

But after trying, I found that I could only capture some of the virtual objects. For the virtual objects not captured, I think there may be a problem with its material. I say this because I did the following experiment. First, I created a virtual cube with the default material, and the cube could be captured normally. After that, I added my own material to this cube, and it was not captured.

The parameters of the material are shown in the figure below. The material uses a shader that I wrote to implement the smoke rendering based on the Volume rendering. The shader is in the attachment.195786-smokeraycast.txt

I am using Unity for development and Win10 for OS. My application is running on PC side and using Holographic Remoting for display on Hololens side. I am using Hololens2.

What could be the cause of this problem, thanks.

195683-caizhi.png


hololens-development
caizhi.png (10.5 KiB)
smokeraycast.txt (4.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SethDu-MSFT avatar image
0 Votes"
SethDu-MSFT answered SethDu-MSFT edited

Hello, welcome to Microsoft Q&A,

I have imported your shader into my project and the test object goes transparent immediately, no matter in Editor or Remoting play. Meanwhile this doesn’t occur when using the other customized shaders. I think this issue is not related to MRC and you may need to troubleshoot the shader script. It is also recommended to use MRTK standard shader rather than Unity Standard Shader, please refer to MRTK standard shader - Mixed Reality Toolkit | Microsoft Docs.



If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your answer. For the situation you mentioned, I think it is caused by not providing the corresponding smoke data for the shader.
I uploaded a Unity project to Google Cloud Drive. In the SmokeData folder, the smoke data is saved as a binary file, and the LoadSmoke_Unity script can read these files and send the data to the shader.
Please note that the parameters set in line 29 of the script should be consistent with the translate parameter of the cube; the parameters set in line 30 of the script should be consistent with the scale parameter of the cube.
To summarize, you can copy the smoke data files to the appropriate directory in the project you tested before, use the above script to send the data to the shader, and then use Holographic Remoting to display it on Hololens. I hope you can help analyze the cause of the original problem based on this, thanks.

baidu drive: https://pan.baidu.com/s/1vMQwN3YWGPm1KpoqPlGT9w?pwd=heqw, code: heqw
quark drive: https://pan.quark.cn/s/9a6184c2c61e
google drive: https://drive.google.com/file/d/1roTz1ZZxJwgiqWBwYfx5eIftSU7x2THV/view?usp=sharing

0 Votes 0 ·

I have tested your sample and the shader is rendered only in Left eye. Though there is inconsistent behavior compared with official document, the MRC does only capture one eye's view. Please refer to Single-Pass Stereo Rendering for HoloLens to debug your shader code.

0 Votes 0 ·