Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

VR3DMediaViewer - View Stereoscopic 3D content in VR

Discussion in 'Assets and Asset Store' started by DarkAkuma, May 9, 2016.

  1. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    All looks fine I guess. I don't have personal experience with quest, so I cant begin to guess at what the issue is. I just know other customers have used the asset with quest before, so it should be able to work.

    Monoscopic display issues have been annoyingly common lately, but I boiled everything else down to the new xr management system which I cant support until its become more stable. You have the legacy system enabled as you have said though. It looks like you have an addon installed for the xr management system though. Maybe simply having that installed cause the issue? Beyond that it might be something with the SinglePass/MultiPass/Multiview setting. I doubt it, but maybe the SinglePass shader doesn't work on quest?

    I'm probably not going to be of to much help figuring this one out. But if you do get it figured out, please share. Ii'll continue to try and help as I can though.
     
  2. AlanPT

    AlanPT

    Joined:
    Jul 31, 2013
    Posts:
    32
  3. AlanPT

    AlanPT

    Joined:
    Jul 31, 2013
    Posts:
    32
    Disabling it didn't help. But in my tests, multipass worked on the Oculus Quest. When using Oculus Link it can use singlepass. Now I just need to optimize the videos. Cheers.
     
  4. ParallaxVirtual

    ParallaxVirtual

    Joined:
    Jun 27, 2017
    Posts:
    1
    Hey there - the Go version of my app doesn't display mt TB 360 stereo pano views - I get that bright pink instead (which I believe means a shader hasn't loaded). In testing, and on the Quest, everything works correctly. Any ideas?
     
  5. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    That does sound like a shader issue. Are you using the Shader Rendering Method? Or Layered? If Shader, it may mean that my custom shader is not supported on Go (I do not have a Go myself to know for sure). Or that its not being included in the build. If you are using Layered, then whatever Shader you have selected for the canvas object may not be supported and you would have to use another mobile friendly one. Mobile platforms can be picky about shaders like that.
     
  6. jeremedia

    jeremedia

    Joined:
    Apr 21, 2015
    Posts:
    63
    @DarkAkuma Any plans to update this for 2020? It no longer builds, failing due to
    PlayerSettings.virtualRealitySupported being no longer available after being depreciated in 2019.

    You should depreciate it in the store if you're done with it.
     
  7. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    People need to tell me that such things are broken for me to fix them, and before now no one has. I'm not done maintaining this asset. I've just been holding off on any significant update until they get the new XR Management system finally working with all devices. Last I checked it still does not work with my dev device, combined with the fact that sales among all my assets dropped when the virus happened making them very low priority. That said, I'm fine making such bug fixes when I'm informed.

    I'll try to get 2020 downloaded and installed this weekend and see if I can fix the issue. I still cant promise full modern support though most likely, due to the failings of the XR Management system. Though its been a couple months since I last checked... so maybe something has changed.
     
  8. jeremedia

    jeremedia

    Joined:
    Apr 21, 2015
    Posts:
    63
    Here's what needed updated.

    Code (CSharp):
    1.        
    2. public static RenderingMethod RenderingMethod
    3.         {
    4.             get => ((int)XRSettings.stereoRenderingMode >= 1 && XRSettings.enabled ? RenderingMethod.Shader : m_renderingMethod);
    5.             set
    6.             {
    7.                 if (XRSettings.stereoRenderingMode == 0 || !XRSettings.enabled)
    8.                     m_renderingMethod = value;
    9.             }
    10. }
    11.  
     
  9. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    Well, my fix is a bit different from that. Instead I removed the check for that stuff entirely with 2018.2+. It existed only to automatically display/set the best RenderingMethod for your stereo rendering mode. Now, it will simply return whatever you select, and thus requires the user to make a selection.

    While I was at it, I noticed and fixed some other issues. I moved the RenderingMethod option to a VRSettings file after I noticed my attempt to make it a global variable was not functioning properly. And I was finally able to experience an issue that people have long reported, but unable to be reproduced by me to fix, with images not displaying in one eye. In short, it was unique to SinglePassInstanced and the default VR3D Unlit shader.

    I'm going to hold off just a little on posting the update to make sure I'm not forgetting anything. If you require it before then, just email me.

    EDIT:

    The update, v2.5, is now live. Thanks for the feedback! And I hope it fixes yours and other peoples issues!
     
    Last edited: Jan 21, 2021
  10. CottonKittie

    CottonKittie

    Joined:
    Apr 26, 2021
    Posts:
    1
    Hello,

    I'm a complete novice to Unity and VR, but I'm wondering if your VR3D Media Viewer might be useful for what I want. Basically, I want to take simple SBS images and use them as a background to almost entirely cover the player's field of view, in either 180 or 360. The goal is an easy way to create different environments that although you can't really move around in, still look somewhat 3d and immersive. I also need to be able to place separate UI elements in front of the 180/360 view. I've attached an example of the kind of image file I'm working with. I tested the image in my headset in a Google Photos slideshow with 3d 180/360 and the effect is passable for what I want. It's just a personal pet project, so I don't need stunning results. However, in your asset's video/pictures, everything I saw had the media in flat square canvases, so I'm just wondering if the player being more *in* the media is possible. Any information you can provide would be much appreciated.
     

    Attached Files:

  11. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    From the sound of it, you want to make a panoramic 3D skybox. That's certainly possible, but as is my asset does not integrate with the normal skybox system itself. You would have to do a psuedo skybox. Basically, attach the panoramic canvas to the camera via a simple script to set the canvases world position every frame to that of the camera center/head.

    The image you provide is standard Side-by-Side Stereoscopic, and is not Panoramic. I cant say how well it would look when used as a 180 Panroramic image. I figure I should make that clear. I suppose using it as 180 would look better than 360, is all.

    The last image, with the blue left side and red right side. That's a capture of the panoramic demo scene. This asset started out just for traditional 3D, but was expanded to support Panoramic 3D too. Screenshots and video can only do so well. I need to update the demo link, as it helped convey the pano support better. Sorry.
     
    CottonKittie likes this.
  12. supneo

    supneo

    Joined:
    Jul 29, 2012
    Posts:
    32
    Hello @DarkAkuma , is there any way to use only one camera for both eyes?
     
  13. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    If you mean, can you use a single camera to view 3D images with the asset, yes. Just not with the Layered method. Only Shader.

    If you perhaps mean something like seeing the same image with both eyes, like monoscopic. Yes. Just set the mono image format for that stereoscopic 3d image.
     
    supneo likes this.
  14. supneo

    supneo

    Joined:
    Jul 29, 2012
    Posts:
    32
    Thanks, in the end I got it with the shaders as you said, the problem is that they don't appear in the list but as hidden, the solution is to drag them.
     
  15. supneo

    supneo

    Joined:
    Jul 29, 2012
    Posts:
    32
    Hello @DarkAkuma , it be possible to convert "Hidden/VR3D/SinglePass3DUnlit" to HDRP? , here they comment something and it seems that he got it but I have no idea how to do it.
     
  16. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello, it would be great if you could add to the ImageCycler script methods to display next / previous stereophoto. Only a few lines of code, but as I am not a C# friend...
    Best regards
    Philippe
     
  17. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    Hello!

    Thank you for the suggestion.

    The ImageCycler script is simply meant for demo purposes, hence it being in the Demo folder.

    But as you suggest, its an easy enough addition/change. You can replace the contents of your ImageCycler script with this. I added a pause option too. Pause can be enabled from the start via the editor or from calling the Pause() function. It disables the cycling based on time.

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using VR3D;
    5.  
    6. public class ImageCycler : MonoBehaviour
    7. {
    8.     public Stereoscopic3DImage[] stereoscopic3DImages;
    9.     public float cycleChangeTime = 5.0f;
    10.     public bool isPaused = false;
    11.  
    12.     private int currentIndex = 0;
    13.     private VR3DMediaViewer m_3DCanvas;
    14.     private float timer = 0;
    15.  
    16.     // Use this for initialization
    17.     void Start()
    18.     {
    19.         m_3DCanvas = GetComponent<VR3DMediaViewer>();
    20.     }
    21.  
    22.     // Update is called once per frame
    23.     void Update()
    24.     {
    25.         if (stereoscopic3DImages.Length > 0 && m_3DCanvas != null && !isPaused)
    26.         {
    27.             timer += Time.deltaTime;
    28.  
    29.             if (timer > cycleChangeTime)
    30.             {
    31.                 Next();
    32.             }
    33.         }
    34.     }
    35.  
    36.     public void Next()
    37.     {
    38.         currentIndex++;
    39.         if (currentIndex > stereoscopic3DImages.Length - 1) currentIndex = 0;
    40.  
    41.         m_3DCanvas.SetNewImage(stereoscopic3DImages[currentIndex]);
    42.  
    43.         timer = 0;
    44.     }
    45.  
    46.     public void Previous()
    47.     {
    48.         currentIndex--;
    49.         if (currentIndex < 0) currentIndex = stereoscopic3DImages.Length - 1;
    50.  
    51.         m_3DCanvas.SetNewImage(stereoscopic3DImages[currentIndex]);
    52.  
    53.         timer = 0;
    54.     }
    55.  
    56.     public void Pause()
    57.     {
    58.         isPaused = !isPaused;
    59.     }
    60. }
    61.  
    This updated script will be included in the next version.
     
  18. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    DarkAkuma, thanks a lot for your reply very fast ! I am a PlayMaker user, and these functions you added are very helpfull, you saved me a lot of time. Maybe - just a suggestion - you should add a some PlayMaker scripts to your asset, it is easy and always great to add "playmaker scripts included" in the description of the asset, as there are a lot of PlayMaker users like me ;-)

    Philippe
     
  19. JustinAHS

    JustinAHS

    Joined:
    Feb 18, 2013
    Posts:
    33
    I just bought this asset, created a new empty VR Unity project and imported the package.
    Only to find that nothing works.

    I'm on Unity 2020.3.28f1, using Oculus plugin.
    There are two missing MonoBehaviors on the First Person Controller of the "Stereoscopic 3D Screenshot 3rd Person GameTime Demo" scene. And VR3DSettings asset is broken. Says it is missing the script.

    I'm also getting other such errors like,
    > Component at index 2 could not be loaded when loading game object 'Left Main Camera'. Removing it.

    And,
    > [VR3DMediaViewer] Unable to find "VR3DSettings". Did you delete it?

    I did not delete anything because everything is freshly imported.

    Anything you can do to help? Or any other info I can provide?

    -----

    [Edit]
    The inspector for VR3DMediaViewer also does not render properly.
    It does not allocate space for its UI elements.
     
    Last edited: Feb 18, 2022
  20. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    Looking into that... I'm not sure what I was doing with that scene. There are 2 of that scene in different locations. Either I meant to delete that one, and it is an older version of the scene. Or its one I mean for working with a VR camera as opposed to the cross eyed camera.

    "VR3DMediaViewer\Demo\Scenes\2. VR Camera Demos\3. Screenshot\Stereoscopic 3D Screenshot 3rd Person GameTime Demo"

    and

    "VR3DMediaViewer\Demo\Scenes\3. Screenshot\Stereoscopic 3D Screenshot 3rd Person GameTime Demo"

    The second one works fine. But the first one has that and other issues...

    But if you must, you can safely delete the 2 missing components from the first scene. They arent anything important.

    Anyway.

    That warning appears to be from it removing a non-critical component that is now obsolete in that version of Unity. You can ignore this message.

    This is a common issue I thought I fixed. The VR3DSettings script is not selected by default in the "VR3DMediaViewer/Scripts/Resources/VR3DSettings" file. Just select it or drag it from "VR3DMediaViewer/Scripts/Utility/VR3DSettings.cs"

    I really need to get around to finishing the update I was working on before covid hit and made me have to shelf this stuff...
     
  21. supneo

    supneo

    Joined:
    Jul 29, 2012
    Posts:
    32
    Hello @DarkAkuma , do you plan to support HDRP , thank you.
     
  22. xczy21

    xczy21

    Joined:
    Jun 6, 2017
    Posts:
    2
    Hi,After I purchased the resource, I published the Web display as shown in the picture. I think the Demo display is normal. Is there something you need to set up? I used unity2018.2.9 upload_2022-12-20_14-25-13.png
     
  23. xczy21

    xczy21

    Joined:
    Jun 6, 2017
    Posts:
    2
    • I see the demo you sent has left and right screens
     
  24. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    Hello.

    The online WebGL demo I made is designed to work on a normal 2D monitor. As such, yes, I use a split camera screen with left and right sides to represent what each eye of a VR device would see. If you are only using 1 camera, then you will only see one side of the 3D image.

    What is your goal? I have no experience with using WebGL to display in a VR device (if you even can). I doubt the split screen camera would be what you would want for a project, but there are demo scenes in the asset package that use such a camera rig. The prefab camera rig in question is named "Example Cross-eyed Camera Rig".
     
  25. dar3os

    dar3os

    Joined:
    May 18, 2022
    Posts:
    1
    Hello. Sadly I am not able to use this plugin with unity 2022.3.11f1 and both the Oculus Integration nor Meta XR Interaction SDK OVR. I don't think the Oculus Rift/Quest (OVR SDK) are supported anymore as they cant be found in the unity asset store. The 3D effect in the demo scenes work but without the OVRCameraRig the head does not get tracked. When I try to add the VR3DMediaViewer Camera Setup it seems to work and i can see the setting 'Target Eye' change from both to right (also the audio listener is removed for some reason), but when the scene is beeing played it is reset to 'both' and while the video is played it does not show in 3D. Also Camera-Left and Camera-Right is missing and do not get created. After every play of a scene the option VR3DMediaViewer Camera Setup comes up again. I set the Stereo Rendering Mode from Multiview to Multi Pass as Multi Pass was mentioned in the turorial and I also changed the option it in the settings scipt to 'layered'. I do not get any error messages. Please take a look at this... Thanks in advance!
     

    Attached Files:

  26. daggasoft

    daggasoft

    Joined:
    Jun 29, 2013
    Posts:
    22
    I feel like I'm getting the same issue as Dar3os. Any idea whats up? Trying to simply do a stereoscopic frame from you examples into a pretty bare bones scene built for the meta quest 3. The closest I can get is the image rendering but no 3d effect.

    Center camera shows the VR3Dmediaviewer camera setup component, and so does the right camera, but the left doesn't. I'm not sure how it's supposed to look.
     
  27. DarkAkuma

    DarkAkuma

    Joined:
    Nov 28, 2013
    Posts:
    100
    It has been a little while since I have personally checked compatibility with more modern versions of Unity and common VR SDKs. So I will download what I can, try, maybe fix and report back when I can.

    I was recently made aware of a similar sounding issue, but the user gave up before we could even begin to solve it. So I was unable to confirm if it was their unique error, or possibly even have a answer that worked as a workaround until a fix could be provided.

    EDIT:

    I'm afraid I will require some more info. Things keep getting DRASTICALLY changed every time I come back to look at Unity and VR, and on my own I am so confused.

    What VR device SDK/Camera Rig, are you using? What Plugin Provider in XR Plugin Management are you using? What other setup process details can you provide? Render Mode (XR Plugin Management) and Rendering Method (This assets VR3DSettings file) are you using? Thanks to all these modern changes, consider me a newb who you are guiding for the response.

    I will need to be able to set my testing project up like yours, as close as possible, to be on the same page and hopefully help. All I can say right now is, I have tested importing v2.5 of the asset into v2023.2.11f1 of Unity, specifically chose to not have it auto fix some scripts, fixed a common VRSettings error (If this is something you have not fixed yourself, just navigate to Assets > VR3DMediaViewer > Scripts > Resources, select the VR3DSettings file, and select the VR3DSettings script in the Script field in the Inspector panel.)... and the "Monitor Cross-eyed Demos" scenes work.

    EDIT2:

    I have now also tried using the Make 3D Camera button on a new Camera object, and using the Unity Mock HMD Plugin. I do not see any issues with those. Tons of Serialized Object errors ill need to look into and fix (if I haven't already in the WIP build). But nothing serious as described.

    This issue will likely be unique to Meta Quest 3, a device I do not own. So will probably take some effort to solve.

    EDIT3:

    Well, with no response after a day, for now I will stop waiting and just leave my thoughts on what I recall causing that issue in the past.

    As I recall... I think it happened with the Shader Rendering Method, and required either changing to the Layered Rendering Method. Or maybe just changing the Render Mode to something else between Multipass/Multiview/Singleview/SingePass-Instanced/etc.

    This was not the case with the other person I talked to recently, but I now think he had a different issue. So hopefully it does help with your issue.
     
    Last edited: Mar 6, 2024