Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
BlueLeopard543's avatar
BlueLeopard543
Honored Guest
10 years ago

Topic for helping a noob through a easy and fast learning.

Hi,

I'm new, and I'm trying to learn Oculus SDK. I just want to use the basic stuff, for a project in my company. So it will probably spread, so it would be great if you help me in some little stuff that for you is super easy, for me it requires a bit of time to understand and learn.

So, I've started working with the 0.6 oculus SDK, and I've learned some stuff, then I started studied both the 0.7 and 0.8.

I know how to get data from oculus, like position, and rotation, and I've successfully implemented the movement and rotation functionalities in my application.

I used the old 0.6 trick of the extended monitor, and everything went fine.

Now "direct to oculus" is a must, and I'm stuck (it's been some months). I'm studying the code and it's complex (mostly long) for me learning direct x sdk PLUS the missing part of the oculus SDK.

My question is: can you copy paste the essential code lines for trasmitting the images directly to oculus, without the direct x part? Let's suppose I have the video stream from another source, and that I will focus on the direct x part later, so I just need to know which lines are the indispensable parts for trasmitting the video stream directly to oculus.

I know it's a strange question, but I've tried many things, and I have some issues with every version of the sdk with my pc (0.6 "direct to oculus" works only for some applications, demo for example doesn't work; 0.7 and 0.8 don't work on my pc because video card is too old), so I need to have lend a pc from another person to develop, and if I save time I can use someone else's pc less times, so my strategy is to try on focusing on the parts that I'm missing of the knowledge, and work around it until I have the entire puzzle complete, as I did for the 0.6 (easily).

Thank you for your help, I hope that even other users can help me to not trouble the main admins (and maybe the base users can understand better my inexperience issues?)

7 Replies

  • The SDK uses DirectX for rendering (also compatible with OpenGL) so you'll need to be able to communicate with these APIs. Programming in straight DirectX and C++ is actually fairly complex, and may not be the best way to get started (unless you just want to learn for fun or whatever). If you actually have a project to complete, it's much easier and more productive to use an engine like Unity or Unreal as all the heavy lifting has been done for you.
  • galopin's avatar
    galopin
    Heroic Explorer
    I am not so fan of the "jump on unreal" advice. Unreal and unity are huge, someone that does not understand the basics of graphic development is nowhere to be confortable in these "pro" level engines.
  • Yes, some people have different opinions. I know some people say to start with making a Pong clone, while others say go straight for an open-world RPG. Some say start with DirectX while other say full-service game engine. There are certainly merits to either approach.

    It really does depend on the goals of the project but (in most cases) new-comers will have a much easier time with something with Unity than working from scratch in C++. With Unity, you can work for a weekend and have a working prototype ready (with Asset Store art or whatever). With C++ and graphic APIs you will spend that weekend and only have a colored triangle.

    Not to mention, trying to learn C++ is a battle all by itself. I think Unity C# is a little more forgiving for beginners and Unreal can do visual scripting which can be even easier (or at least easier to grasp for a non-programmer).

    Though working in DirectX/C++ is certainly more rewarding (because it is so hard) but not anywhere close to as productive as using an off-the-shelf engine. You don't really need to understand the low level of graphics programming to use Unity, just some math and basic logic skills and you can make a game.
  • Guys, yeah, thanks for the advice but I MUST use Direct X because another SDK then must interface with Direct X to use it as a bridge for the two technologies.

    So any help on Direct X would be appreciated. I just need to stream some video output on the direct with oculus mode, the workaround I imagined is to apply this stream as a texture on a wall, and then direct stream this to oculus.

    Any help in this direction could help, just telling me which section of the code interest these parts.

    Or at least, you can tell me which code lines are the ones for streaming "direct to oculus", indipendent from Direct X or Open GL or whatever, there should be some.
  • There isn't any code for 'streaming direct to Oculus' independent of DirectX or OpenGL. Whichever API you're using, with recent Oculus SDKs the way you send output to the Rift is by creating API specific resources using the Oculus SDK and then using standard DirectX/OpenGL APIs to get data into those resources for display on the Rift.

    In my cutdown version of OculusRoomTiny for example, the D3D11 Texture Swap Chain resources are created using Oculus SDK calls here and set as render targets here before being submitted to display on the Rift here

    For your use case of streaming some video you might want to look at using a Quad layer - see the docs on layers here and API reference here