Then use the hit result to render something where the object exists in world space: Here we cast a 2-meter ray from the camera lens to the camera-space position ¼ from the top left of the frame. To find what exists in world space at a particular pixel coordinate, use a line trace with the world space ray: GetPVCameraIntrinsics returns the camera intrinsic values, which can be used when doing computer vision processing on a camera frame: GetWorldSpaceRayFromCameraPoint casts a ray from the camera lens into the scene in Unreal world space to find a pixel's content in the camera frame: GetPVCameraToWorldTransform gets the transform in world space of the PV Camera and will be positioned on the camera lens: A few functions exist to locate the camera in world space to account for the offset.
![capturing reality add camera capturing reality add camera](http://cdn.mos.cms.futurecdn.net/AKjVfaMTAUJG3C6CRExtC7.jpg)
The camera on the HoloLens 2 is offset vertically from the device’s head tracking. Finally, scale the plane by the camera image’s aspect ratio:.If the texture isn't valid, start a timer and try again after the timeout: Get the texture from the camera feed and assign it to the dynamic material if it's valid.Create a dynamic material instance from CamTextureMaterial and assign this material to the actor’s plane:.In the CamCapture blueprint, turn on the PV Camera:.Send the texture’s rgb data to the output emissive color: Add the actor to your scene, create a new material called CamTextureMaterial with a Texture Object Parameter, and a texture sample.
![capturing reality add camera capturing reality add camera](https://www.capturingreality.com/assets/Images/Overhead_RC_interior_thumbnail.jpg)
![capturing reality add camera capturing reality add camera](https://i.ytimg.com/vi/CZymvOHgN00/maxresdefault.jpg)
Also, OpenXR for Unreal 4.26 has a limitation: camera can work with DirectX11 RHI. However, OpenXR needs the Microsoft OpenXR plugin to be installed.
Capturing reality add camera windows#
The PV camera is implemented in both Windows Mixed Reality and OpenXR plugins.