Search Unity

Unity VR Template scene

Discussion in 'VR' started by ROBYER1, Jul 31, 2019.

  1. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    So far in Unity 2019, the VR preset has disappeared from the new project settings window when making a new project. Will the VR preset return? I feel that a basic VR template scene with something like teleportation or even an input example would benefit myself and a few other developers I spoke to recently who are trying to use Native Unity VR support.
     
  2. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    Just came here to find out where the template is as well :)

    I used to see a VR LWRP template but its vanished. I'm using the latest 2019.2 build which has VR HDRP as well. I've had a little snoop around the packages docs etc and reading between the lines I think the VR LWRP template has been rolled into the LWRP package. An the VR HDRP is in the HDRP package.

    Can anybody confirm at all please? I'm back using Unity after a break an am a bit lost with all the previews and packages!
     
  3. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    Found this as well..

    https://issuetracker.unity3d.com/issues/lwrp-vr-template-is-missing-when-creating-a-new-project

    So not included by design suggests what I'm thinking above could be right. Can't find any special 'VR' render pipelines in the available packages in Unity either, just LWRP and HDRP.

    If I'm right with the above and you render to a supported HMD for either LWRP or HDRP are things just magically optimised for VR? I assume the original VR LWRP template did some things above the normal LWRP template in the rendering dept?

    Again, excuse my ignorance is all the above is wrong, I'm no Unity expert...... yet that is! I'm trying ;) :p
     
  4. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    LWRP is still quite volatile and works in progress so I wouldn't trust it yet!

    You can make your own VR Rig using the tracked pose driver (i think its its called) component but it would be neat to have a template scene or project preset for VR anyway with most things set up already :D
     
  5. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    Thanks @ROBYER1 I'm finding things a little confusing to be honest. LWRP and HWRP are new(ish) if I'm right so that leaves the old bult in renderer, I'm guessing the template with extras is asking for trouble with the post processing bits added on?

    For input looks like Unity is in the middle of introducing its new input system and after fumbling around I've found the XR Legacy Input Helpers in the packages with the tracked pose driver but not much idea how to use it.

    As a VR newbie building a rig in principle makes sense but I'm not entirely sure of the best practises for that. Frustrating to get started.

    I saw your reference to Unreal and the VR workflow and template there and tried the same and it all just works and has those needed systems in like teleporting, selecting etc.

    Be nice to have a go to up-to-date guide that helps on-board people into VR / XR. I see the Unity docs have a section which gets you as far as a tracked HMD and then sort of explains the inputs (but I couldn't see any explanation on how to track an Oculus controllers position / rotation etc in the world lets say).

    I'm no Unity expert so I may be missing things but if anyone has got a good guide thats current it would be appreciated. I have an Oculus Rift S so would it just be an inde to grab to 'offical' Oculus integration from the asset store and start there?
     
  6. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I would use built-in for now until the new SRP pipelines are ready and bug-free, im still reporting bugs for them most days.

    The input system is fine once you get your head around it - the tracked pose driver all you need to do is make a cube for each hand, and an empty gameobject for a head. Then put the tracked pose driver on each other the hands (and maybe the head too?) and there are some dropdowns on each so you can set the left/right hand. That should all just work tracking the head and hands - it is that simple :)
     
  7. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    Thank again @ROBYER1 Will check it all out. Still a bit torn between Unity and Unreal for VR projects, Unreal seemed very simple to get going and has a template with all the toys in. I suspect the learning curve is more of a wall then, think they both have their strengths and weaknesses. Will have a play with both and see which I get on better with, can't harm to at least learn the basics of it regardless.
     
    ROBYER1 likes this.
  8. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    @ROBYER1 I installed the XR Legacy Package and the Tracked Pose Driver (thanks for the tip) works great after playing and guessing how to make up a 'rig'. Still not sure its right but it seems to work lol Frustrating to not have a solid reference point and template, then again no better way to learn why something is the way it is then falling over a lot :)

    Next stop will be the new input system, I believe there's something to replace the tracked pose driver in there. Any ideas on where to start with it or know any good VR samples using it?
     
    Last edited: Aug 3, 2019
  9. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    https://github.com/Unity-Technologies/Onslaught

    Found that which is a few months old and promises the be an XR example with no 3rd party content, just using the Unity API's. Had a ton of AR errors out the box even though I seemed to have the right packages installed and could see what I believe to be the correct references in the VS project. I ended up literally just removing tons of code so it would compile and play. I really like Unity but is it normal to have so many conflict like this around versions and assets etc? Bit tired of fighting today :(
     
  10. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Thanks for the link, I will take a look at that sometime soon (after next week as Im away for a bit).

    SO the tracked pose driver stuff it is hard to go wrong with luckily as all tracking follows the headset/hand controllers and you can have it all as a child of a gameobject which is the player character controller or whatever you want to move the whole rig around with.

    As for inputs, that took me a short while to figure it out - if you are confused or unsure of where to start, take a look at VRTK V4 which has a setup for input bindings.. all it seemed to do is set up the right hand controller inputs in the unity project settings input menu but it's a great starting point if you are very stuck. All I did was start a new project, and set my inputs up exactly the way they are in the VRTK v4 project here https://github.com/ExtendRealityLtd/VRTK

    It's all set up in a way that works with native Unity, from there you can figure out how to use Input.GetKey("examplekeynamehere") to do things with the controller buttons and you are flying from there!
     
    appymedia likes this.
  11. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    Unreal is very simple to get started with for VR, I feel Unity has a bit of catching up to do there and I speak for a lot of people on the forum saying that, I wouldn't mind sharing an example scene at some point soon but everyone's VR solution will be different in some ways so I wouldn't want to mislead anyone or share code which may not be optimised for everything.
     
    appymedia likes this.
  12. appymedia

    appymedia

    Joined:
    May 22, 2013
    Posts:
    95
    Thanks again @ROBYER1

    I'll take a look at what VRTK is doing regarding the input setup and I'll checkout the new input system as well along the way. If I'm understanding things correctly the tracked pose driver is being made legacy at some point hence it being in the XR Legacy Input Helpers package and the new input system has us covered but its not clear how it works to me yet. Maybe I just need to reread the docs, I'm not totally new to unity and have dabbled with it over the years but now I have some serious focus on something I'm having to dig deeper :)

    An yes re Unreal they really do have things covered in this respect. I tried last night and it took me 2 mins via their template and I was able to teleport around a scene and interact with things and dive into blueprints showing me how all that works and probably with best practises as well. I've been trying for a few hours to get that far in Unity, I've purposely avoided installing a 3rd party asset like VRTK as I want to understand whats going on but I'm thinking it will be good for the learning experience regardless.

    I certainly know more then what I did a day ago so that's a win :)
     
    ROBYER1 likes this.
  13. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,454
    I finally had a response from the QA team on this -


    Currently, the UniversalRP-VR template project is removed from Hub due to some bug fixing required for template release. Unfortunately, we not exactly sure when the bugs will be fixed and UniversalRP-VR template will be released.