Search Unity

How to work with Oculus Rift and Unity?

Discussion in 'General Discussion' started by AlexFormoso, Aug 30, 2013.

  1. AlexFormoso

    AlexFormoso

    Joined:
    Aug 12, 2012
    Posts:
    25
    Hello. Im almost graduated from Informatics Engineering and im in the lookout for a thesis. The Oculus Rift came to my attention and since I have almost 2 years working in Unity its a good choice. My idea is to create a simulation game, where a user can import a FBX file, add some settings like lightning (hour of the day) and actually WALK inside the building using the Oculus.

    To me it sounds as a major selling point if you work in architecture or projects (architectural). Imagine how cool would it be to actually showcase your project to your client that way, allowing him to walk inside the building.

    My problem is that I don't know anything about the oculus, work related. What do I need to work with it? is it too hard? is it too complex? My worries are that I need to accomplish what I've stated above in 3-4 months, working alone, partial time, and I don't know if its possible.

    Any oculus devs care to share their experiences?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
    Oculus integration is super easy, you can do that in few clicks..

    Difficult parts would be
    - Importing the model in runtime (if i understood it correctly, that users have empty executable "player", and can there import own models). Unity cannot read fbx files just like that.. obj might work? Some external library can read fbx runtime..(it was mentioned in the forums sometime ago)
    - Creating colliders, difficult.. if your model is big building with "millions" of separate surfaces and small objects.
    - Optimisation, might need something, if the model is made from lots of objects (and they usually are) and there are sometimes terrains, trees, other objects on those models (unless its cleaned up)

    I think it would be pretty nice already,
    to be able to walk/fly around and inside the model, without colliders..
     
  3. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    There are libraries to help you import OBJ. I opened sourced mine, and there's one on the wiki. Eric5h5 has one on the store for sale that's pretty advanced and I assume is better-tested than mine or the wiki one.

    With Unity Pro, I believe you can use the FBX SDK to import FBX's directly, though I don't think it's free.

    I agree that creating Colliders can be difficult. It would be best to find a way to let the user make them. Perhaps a second file that's imported.

    If you're worried that you can't complete it in 4 months, working alone, starting with knowing nothing about Unity or the Rift, then I think you're right to be worried. A seasoned developer could do that easily, I think, so long as you don't go crazy on the requirements. But a total newcomer? It's going to take a *lot* of work.
     
  4. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    736
    Quick Question - does the Rift require the pro version of Unity?
     
  5. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    It requires render textures to distort the two images so Pro is required.
     
  6. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,971
    sounds like a great excuse to get pro
     
  7. Justei

    Justei

    Joined:
    Aug 31, 2012
    Posts:
    133
    I saw someone actually have this idea on these forums, about 2 weeks ago, actually propsed by dogzerx2!
    http://forum.unity3d.com/threads/188490-Oculus-Rift/page3?p=1325322&viewfull=1#post1325322

    And I kind of agree, you do get quite dizzy quite fast with the Oculus, especially if you are not used to it. So having people wanting to throw up in your office is kind of a flaw :).

    However, since this is a thesis, it could still be a theoretical fun idea, so you can still go ahead with it with the excuse that it's going to be using the Consumer version, which hopefully will lessen the motion sickness.
     
  8. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,214
    I assume that to integrate a Unity application with the Oculus Rift, you'd just need to send two frames (one for the left eye, one for the right), or is it more complicated than that? Their website says that their SDK comes with pre-made shaders that are designed to work with the Oculus Rift, which seems puzzling... do you really need to change your shaders?
     
  9. [RV]CWolf

    [RV]CWolf

    Joined:
    Jan 24, 2013
    Posts:
    33
    The Oculus Rift needs to use barrel warp shaders to correctly fit the game view. As far as I know you don't need to change your existing shaders but I know deferred shadows/lighting doesn't currently work with Oculus Rift.

    More is explained in this video http://www.youtube.com/watch?v=3CrjjN7W2qY
     
    Last edited: Nov 13, 2013
  10. DerrickLau

    DerrickLau

    Joined:
    Sep 29, 2013
    Posts:
    70
    Where is the documentation on how to use Occulus Rift with Unity3D Pro? Am I wrong to assume that the integration between Occulus Rift and Unity3D will be automatically published to game consoles for console game development?
     
  11. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    I'm not sure if the rift will be compatible with consoles but documentation on how to use the Rift with Unity 3d can be found here: https://developer.oculusvr.com/?action=dl
    You'll want the Unity Pro integration and probably the appropriate SDK as well. Documentation should be included. A new SDK should be out in the next couple of days for the DK2 release.
     
  12. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I think the problem would be in setting up the lighting/shaders of the imported fbx models and textures.

    The placements of lights and baking of shadows would also be another problem.

    So it would probably be this aspect of your architectural app that would take the time to get right.

    You would need to look into dynamic lighting systems and realistic shaders.

    For example using unity for architectural visualisation NVYVE import the models as fbx files then use a team of artists to bring them to life as apps in a matter of weeks.