tentone / potree-core

Potree point cloud viewer library core components for easier integration in a three.js project.
https://tentone.github.io/potree-core/
Other
169 stars 52 forks source link

WebXR multi-camera in VR mode !!! #17

Open akharroubi opened 4 years ago

akharroubi commented 4 years ago

Hi, thank you again,

I test the project with WebXR for a VR application, but once I apply the VR mode, I find myself with two cameras at the same time; that of the headset and that of the scene ... I do not understand is what it is a conflict between the camera of Potree and ThreeJS !

Thank you so much for the quick responses. @tentone in normal mode: Capture d’écran (149) in VR mode activated Capture d’écran (150)

tentone commented 4 years ago

Hello

This is a tricky one, multiple view is not supported in potree because nodes are loaded/discarded based on the camera view.

With multiple cameras (e.g) you will get some conflict with nodes getting loaded and discarded without any consistency.

For VR two cameras are created intenally in threejs (check https://github.com/mrdoob/three.js/blob/dev/src/renderers/webxr/WebXRManager.js), I will have to do some tests in order to propose a solution:

For VR using a single camera for node selection should work fine since they are really close.

Thanks a lot

akharroubi commented 4 years ago

hello,

I still have the same problem with augmented reality (AR), I find myself with two objects rendered, one on the ground (anchored and fixed) and another which is always visible on the screen, can you help me I am blocked?

normally once I return in AR the object must disappear and be projected on the ground and not remain too !!!

is it because of the presence of two synchronized scenes or what?

@tentone