jackoolya Posted August 8, 2023 Posted August 8, 2023 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?
jackoolya Posted August 8, 2023 Author Posted August 8, 2023 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
sweetluna Posted August 8, 2023 Posted August 8, 2023 Hi, You have to enable Mixed Reality via code, tune some options like try using Chromakey, or different Blend Masks. You can try our VR Sample which incorporates all of the above. More info on the APIs is available in our documentation: Unigine::Plugins::Varjo Class - Documentation - Unigine Developer Hope this helps! May RenderDoc/Nsight Graphics/Intel GPA bless you
jackoolya Posted August 9, 2023 Author Posted August 9, 2023 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.
sweetluna Posted August 9, 2023 Posted August 9, 2023 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 May RenderDoc/Nsight Graphics/Intel GPA bless you
Recommended Posts