-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a better way to render an 3D stereoscopic image for VR than create two scenes? #6437
Comments
What about adding a "root" Object3D to both scenes and then adding all your common objects to that root? Any eye specific objects can be directly added to the pair of scenes but everything else would be added to the common root. |
I think the masking idea in #5562 could solve this. We will then have a single scene with everything and two cameras with different layerMasks. How does this sound? |
It sounds the best solution but I'll wait for more progress in the implementation of that because I've been trying to understand the #5562 but I do not know if I would be able to help a lot now :( |
I just came accross the same problem, and was about to duplicate each of my meshes. Have you found a better way to solve this problem? |
We can now use Take a look at the VR video example for reference: |
Looks great, but I can't see where you developed the object.layers functions. Is it still work in progress? |
Yes, I added it last cycle as https://github.com/mrdoob/three.js/blob/dev/src/core/Layers.js The code is definitely not very easy to understand, but it basically allows us to control what objects a camera is able to see. |
OK thanks, I think I got it working with Channels (for now, will update to Layers with next build). Seems to work fine, thanks for the good job, it'll simplify things! |
I cant get this to work. With 74dev, the example only shows one half (i think the last added -> right eye) And the linked example is dead |
@curti55 I reverted the |
I'm using the webvrmanager to enter vr mode (debug in this case). When i enter VRMode only layer 1 Meshes are displayed. I tried the StereoCamera but as i cant get it to work, i took the perspective cam! |
ok, i think i found the problem: #7732 |
I'm reviewing the http://threejs.org/examples/#vr_video and there are two scenes to render a different part of the video corresponding to the left and right eye shot. But I thought if I will need to add some HUD elements, this option would make me hard to include 3D elements over this stereoscopic background.
In this case, the right way would be included in a third scene? or duplicate in both scenes?
What I did (with an image instead a video) is to create 2 meshes (one for each eye) and changed StereoEffect and VREffect to make visible or hide each mesh on every render before "paint" every part of the scene.
Makes sense? or will have a worse performance?
Example working > www.unboring.net/lab/image3DPano (Cardboard & Oculus)
Source code > www.unboring.net/lab/image3DPano/image3DPano.zip
The text was updated successfully, but these errors were encountered: