Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Designing for VR

Discussion in 'AR/VR (XR) Discussion' started by SAOTA, Feb 23, 2015.

  1. SAOTA


    Feb 9, 2015

    I've seen lots of people mentioning that there are some optimizations required to get a scene working nicely in VR.

    Some people seem to suggest that parallax mapping be used over normal maps.
    Others have stated that screen space effects do not work that nicely in VR...

    Some are even boycotting the future all together.

    I will be updating this post with my solutions for vr design.

    Please contribute with your tricks and tips for designing in Virtual Reality using Unity3D.

    As an architect, I am coming from a ArchViz standpoint, but the following should apply for most First Person projects.

    I have found there are a couple of things that need to happen at once to experience presence in 3D Space.

    • No Judder
      • FPS > 60 preferably 75.
    • Scale must be true to life.
    • Movement must feel natural.
    • Detail
      • Positional Tracking brings with it a plethora of exciting new challenges. The ability for detail exploration of 3d space and objects means that there can be no shortcuts in designing environments. A user can inspect anything in the world that you build.
    • Lighting
      • An entire scene is basically one massive light calculation. Everything we see is a reflection or manipulation of light. Master lighting, now.

    Users chuan_I & wprtogh on the /oculus subreddit recently discussed this as follows.


    VR needs to address —
    • Presence, the feeling of being in space according to human scale and by de facto the pacing, interactions as a consequence.
    • Embodiment, realistic or otherwise in a creative sense. The idea of being corporeal in space though without haptic cues.
    • Affordance, or the natural interactions that arise as a result of the above. Control schemes and movement that does a good job of integrating our bodies.
    • Realism, in terms of proximity and pacing. Much slower than the exaggerated sense of speed, dynamics when you show 3d actions on a 2d plane.

    Game design has its own fundamental issues, irrespective of whether the game is VR-based or not. Here are a few:

    • Accessibility - The ease with which a person jump into the game, begin playing, learn the mechanics and improve their skills (if the game is skill-based).

    • Convenience - The ease with which a user can own, set up, and put away the game.

    • Comfort - The ease of the mechanical movements involved in playing the game. Long-term strain should be minimal or nil.

    • Control - Interactions must give the player a sense of ease in executing actions. They must never feel like they have to fight the controls.
    It should be immediately clear that fun gameplay and immersive VR can be at odds with one another in many situations. Presence and affordance suggest experiences where you stand up, turn around, and even walk from place to place, but comfort and convenience are then sacrificed. Control and realism are at odds too, for similar reasons.

    Consider a modern shooter game. A good VR interface for that needs to let you feel like you're in another world, it needs to make both aiming and 180-degree turns feel effortless and natural. It needs to enable your avatar to be immensely more mobile and agile than you real body, without making your real body feel sick. And it needs to do all these things while your butt is firmly planted on a couch or recliner.

    It's a very tough balancing act to do all that :)

    Last edited: Mar 5, 2015
    mgear likes this.
  2. SAOTA


    Feb 9, 2015
    Last edited: Feb 23, 2015
  3. SAOTA


    Feb 9, 2015
    Resources | Links:
    Latest Runtimes

    Useful Tools / Assets

    Unity Scripts to Test in Editor - still waiting for asset store link
    same person who makes - also very useful
    like above but for mac.

    seieibob@ Oculus forums also has a version, works a little different.

    Mirror single camera's gameview to desktop
    u/harutowatanabe on reddit | originally on

    Unofficial "Black Smear Correction"
    drash: Oculus Forums

    Recommended PC Builds:

    Getting Started with the Rift

    Rift DK2 and Unity Free



    Interesting Reads:

    Oculus Best Practices:

    Michael Abrash : Valve Dev Days 2014.pdf
    more info at blog

    The Power of a VR Experience: We Need More Focus on Game Mechanics Than Flashy Graphics Right Now

    More Tips:
    Arch Virtual:


    Nick Pittom: Gamasutra
    Last edited: Apr 10, 2015
    mark-007 and sleekdigital like this.
  4. SAOTA


    Feb 9, 2015
    Integration Issues and Tips:

    Darker Colors in Build

    I ran into some issues with Linear Colorspace in DX11 with the Oculus 0.4.4. integration package.
    Issue is referenced here.

    What it comes down to is that somewhere something gets confused when a project is built in Unity 5 using linear colorspace and DX11. Strangely enough bringing up the OVR menu resolved these issues, but hiding the obtrusive menu brings them back.
    After rummaging though the web I came across some similar issues and suggested solutions.

    In the end all that is needed (for now) is some modifications to the OVRMainMenu.cs.

    I've attached the modified script.

    if you would like a fps counter remove the // from line 443
    // OVRUGUI.strFPS = strFPS; becomes OVRUGUI.strFPS = strFPS;

    Now colors are corrected and Its running in DX11 mode which improves performance dramatically for me.

    Attached Files:

    Luckymouse likes this.
  5. TheSniperFan


    Jul 18, 2013
    Oh my god, no! :eek:
    Two things:
    Firstly, 60 fps is bad. It's just terribly bad for VR. The difference I experience when I try F-Zero GX in the Dolphin VR emulator (60 fps) and Radial-G (Unity, 75 fps) is immense. Valve is pushing for 90fps and who knows what the CV1 will bring to the table.
    Either way, the trend goes away from 60fps. You need more!

    Secondly, the framerate must be constant. A game that runs at a constant 60 fps is better than one where the framerate fluctuates wildly between 75 and 60. With VR you don't just see that; You feel that.

    The latter one is something many Unity developers will learn the hard way. Practically every "programming language comparison" thread I've seen here had people claiming that "C# is better than C++ because you don't have to worry about memory management", which is utter bullshit.
    The fact is that you don't have to do as much work, but if you go in with the mindset that you don't have to worry at all, the garbage collector will kick your ass.
    My PC is far above the average indie gaming machine in terms of specs (GTX 970, Xeon E3-1231) and in a completely different universe when compared to mobiles, and GC still completely tanks my framerate when it kicks in. When I tested, a GC collect took about 7.8ms on my machine (iirc).
    You absolutely need to take this into account.

    (Also manage unused scripts, because the calling overhead of the Update() functions is huuuuuuuuuuge. Disable scripts that are not needed.)
    SAOTA likes this.
  6. jashan


    Mar 9, 2007
    This talk discusses a lot of the interesting design aspects. It's less on the technical side, though, but more on the content side: Valve - Virtual Reality in 2015
    SAOTA likes this.
  7. Luckymouse


    Jan 31, 2010
    Hey SAOTA, just lets you know I just sent you a PM for latest version of the uSky v1.1.3f4. I clean up some garbage collect issue. It should help for some performance and framerate consistance .
    SAOTA likes this.
  8. SandMagic


    Mar 18, 2015
    Hi Soata, tried using your modified script, but Unity threw out this error:

    Assets/OVR/Scripts/Util/OVRMainMenu.cs(197,9): error CS0246: The type or namespace name `OVRVisionGuide' could not be found. Are you missing a using directive or an assembly reference?

    I am terribly new to all this, being mostly on the art side, and I simply downloaded your modified .cs file and replaced the previous one with it.

    Any insight is appreciated thanks!
    SAOTA likes this.
  9. SAOTA


    Feb 9, 2015
    Try this one. Should work with

    Attached Files: