Jump to content

VR Sample questions


photo

Recommended Posts

Hello,

I recently downloaded the VR Demo sample in 2.18.1 and copied it as a C++ project.

I have two questions regarding the sample

1 - In the code there is a file named VRPlayerVive.h. This header is including AppViveProxy.h and EyetrackingProxy.h that are not in the project. I was wondering what is that header used for ? (it doesn't seem to be compiled with the project).

2 - In the editor, in the world vr_sample.world there is the vr_node in it, but in that vr_node there is no reference to the vive_pad.node. I was wondering how are the vive pad models put in the scene when I use it in VR with my vive controller ? (for exemple when I press run in the editor for the project vr_sample)

Regards.

Link to comment

Hello!

17 hours ago, AntoineAB said:

1 - In the code there is a file named VRPlayerVive.h. This header is including AppViveProxy.h and EyetrackingProxy.h that are not in the project. I was wondering what is that header used for ? (it doesn't seem to be compiled with the project).

These headers are leftovers from the previous version of the VR template. With the transition to the engine's built-in VR capabilities these proxies are no longer used. All necessary functionalities are now available through the engine's API. You can safely ignore these files as they are no longer needed and will be completely removed in the upcoming update 2.19 this summer.

Quote

2 - In the editor, in the world vr_sample.world there is the vr_node in it, but in that vr_node there is no reference to the vive_pad.node. I was wondering how are the vive pad models put in the scene when I use it in VR with my vive controller ? (for exemple when I press run in the editor for the project vr_sample)

Starting from SDK 2.18 the VR system is integrated into the engine and fetches the controller models directly from OpenVR. You might take a look at the classes InputVRDevice and its subclass InputVRController. The models are retrieved using the method InputVRDevice::getModelMesh.

For more details, you can refer to the documentation here: https://developer.unigine.com/en/docs/2.18.1/api/library/controls/class.inputvrdevice?rlang=cpp#getModelMesh_int_Mesh

Thanks!

Link to comment

Hello,

Thank you for the information, it was helpful.

I have two other questions regarding mixed reality :

- In the vr_sample project, when I enable mixed reality, then enable Blend Masking and I put the blend masking mode to "Restrict Video to Mask" -> I see a cube behind the wooden desk that shows the "real world" and I can't find that cube in the editor. Do you know where it is (or where is the node created) and how can I disable it ? (see screenshots for reference)

- I want to get the same comportment of the cube in the previous question but on other meshes. I know I require a special material for varjo to recognize some meshes as "masks" but how to configure that material ? is there a example in the vr_sample ? (I saw in this forum post : 

that I should create some kind of "varjo_mesh_mask" ?)

 

Regards.

varjo_screenshot_2024-06-27_16-33-34-224.png

varjo_screenshot_2024-06-27_16-34-03-324.png

Link to comment
×
×
  • Create New...