Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Oculus Integration Plugin / Oculus in General

Discussion in 'AR/VR (XR) Discussion' started by matrix211v1, Mar 27, 2020.

  1. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    Hello All!

    I would like to scale the OVRCameraRig. I have a full size room, like a living room, and everything looks fine. However, I want to shrink this room down to something small ( or scale up the player ) so the room would look like a doll house.

    I know I can scale down the entire environment, but this causes a lot of shaders to freak out so I want to avoid that.

    In other VR packages, like SteamVR, you would just create a Empty GameObject and put the CameraRig as a child and scale the parent. That doesn't seem to work for Oculus.

    Any suggestions?

    Thanks!
     
  2. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,873
    Out of interest ... which shaders fail on this? I would expect most shaders to be fine, since they all work in screenspace or clipspace, both of which are independent of worldspace, but I'm guessing you have some that do vertex deformation in world space (?), and the GPU is messing up the precision on mobile (?)
     
  3. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    Toon shaders. They go crazy when you scale the world down to 0.025f
     
  4. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,873
    Hmm. I'm guessing that's the border/outlining code (there's some dumb-but-easy ways of implementing this that are dependent on world size, which is just ... wrong, but pretty common because it's much easier than doing it properly).

    If it *is* the borders ... I'd try and find different shaders (in addition to figuring out the rig-scaling issue - I've given up on OVR myself, using XR for everything now, but I'm with you that it SHOULD work, don't know why it doesn't). My experience of "simple" border/outlining shaders is that they come back and bite you sooner or later, and you end up having to throw them away / fix them to have a better implementation anyway.
     
  5. matrix211v1

    matrix211v1

    Joined:
    Jan 20, 2009
    Posts:
    193
    I'm fine with using something different than OVR, but I need the hands working on the Quest. If I can get the scaling working with XR and Hands, I'm game.

    Question is, can you scale with XR?
     
  6. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,873
    I'll try it - I'm currently in the middle of debugging some other XRIT stuff right now, but when I get some free time I'll have a go, would like to see if it works.

    (although XRIT is so fast to setup and install that I recommend trying it out in a new project for yourself - just make sure to go to Project Settings and click the various buttons in the XR section to auto-install the sub-modules it needs)