Jump to content

In the Mixing Reality, how to achieve the top of the screen is the Unigine picture, the lower part of the screen is the real world picture


photo

Recommended Posts

  Here I'm useing the varjo plugin to develop the Mixing Reality function.But the picture of the physical world fades from the bottom up,And i want to achieve the top of the screen is the Unigine picture, the lower part of the screen is the real world picture.Do u have any idea about this?

Link to comment
2 hours ago, jackoolya said:

  Here I'm useing the varjo plugin to develop the Mixing Reality function.But the picture of the physical world fades from the bottom up,And i want to achieve the top of the screen is the Unigine picture, the lower part of the screen is the real world picture.Do u have any idea about this?

The first picture is the current effect, and the second picture is the effect I want

 

微信图片_20230808163207.jpg

R-C.jpg

Link to comment
    auto varjo_plugin = Unigine::Plugins::Varjo::get();
    std::cout << varjo_plugin->isMixedRealityAvailable() << std::endl;
    varjo_plugin->setVisualizerEnabled(true);
    varjo_plugin->setAlphaBlend(true)
    varjo_plugin->setVideo(true);
    varjo_plugin->setFoveatedRenderingEnabled(true);

Hello, I have implemented the Mixing Reality, here is my code.But how to achieve the top of the screen is the Unigine picture, the lower part of the screen is the real world picture.In other words,when I look down, I see the physical world, and when I look up or up, I see Unigine.

Link to comment

You need to try either:
1. If you have Chromakey enable chromakeing via setChromaKeyConfigType.
 Tune it with setChromaKeyConfigFalloff, setChromaKeyConfigTargetColor and setChromaKeyConfigTolerance so that you see Unigine in place of Chromakey in HMD.

2. Another possibility for more versatile solution is to use Blend Masking with either BLEND_MASKING_MODE_RESTRICT_VR_TO_MASK or BLEND_MASKING_MODE_RESTRICT_VIDEO_TO_MASK of the modes. Use setBlendMaskingMode to switch between modes.
 You have to create a separate mesh that will include (or exclude Unigine content from the HMD) and assign special material to it - varjo_mesh_mask.
 - For the RESTRICT_VR_TO_MASK mode you have to create mesh that will show Unigine content only, then place it to the scene and assign varjo_mesh_mask material.
 - For the RESTRICT_VIDEO_TO_MASK mode do the opposite - create mesh that will Show real world, then add it to the world and assign varjo_mesh_mask material.

3. Combine Chromakey and Blend Masking using BLEND_MASKING_MODE_RESTRICT_VR_TO_CHROMAKEY_REDUCED_BY_MASK as Blend Masking Mode.

I am not sure how alpha blend might help here, so you might want to disable it.
 

For more info check C++ VR Sample and documentation:
https://developer.unigine.com/en/docs/2.17/api/library/plugins/class.appvarjo?rlang=cpp

Link to comment
×
×
  • Create New...