New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

Doom 3 WIP

gplourdegplourde Posts: 63
edited July 2015 in Showcase
Original Doom3 for Oculus Rift DK2 - WIP!

Last updated: [September 16, 2014]

Doom3_VR.jpg

This is using the original GPL code so compatible with mods.

Project page: https://github.com/Perpixel/Doom3
Current build download link: https://dl.dropboxusercontent.com/u/22702748/Doom3_VR_09162014a.zip

Objectives:
1) Getting 100% of Doom3 functionality working in the Rift DK2.
2) Adding VR experience with updated UI and controls.
3) Keeping the code portable and usable to other projects.

Status:
This is a project started in mid August 2014 and progress very quickly so far the game is playable but missing head position tracking. No work done on the UI yet. Not recommended to play just yet.

Known issues:
Post processing look different from one eye to the other.
Frustum error cause problem in some very small area where one eye see something and the other doesn't.
HUD doesnt fit screen.
Head position tracking is not working.
Using the PDA offset the HMD orientation. Workaround is to not move your head at all when you open the PDA
«1345

Comments

  • jngdwejngdwe Posts: 566
    Art3mis
    This is exactly what I've been wanting since day one of my DK1. If you pull this off, I will marry you..... to the woman of your choice.
  • 50105010 Posts: 18
    Looks amazing!

    Doom3 is a game I've wanted to play in VR since it launched and I drew my blackout curtains while putting my face as close to my 21"CRT as possible to try and fill my FOV and immerse myself. Can't wait to play!
  • ImmersionistImmersionist Posts: 18
    NerveGear
    Awesome. I can't think of a title I'd rather seen ported to the Oculus Rift than Doom 3. Can't wait for this.
  • gplourdegplourde Posts: 63
    I made really goo progress yesterday with the eye distance now feel better even if its still hardcoded. I also got the UI to render in the center of the screen. Even managed to play the first 2 level. Aiming is a bit hard without the correct crosshair position but still pretty fun.
  • gplourde wrote:
    I made really goo progress yesterday with the eye distance now feel better even if its still hardcoded. I also got the UI to render in the center of the screen. Even managed to play the first 2 level. Aiming is a bit hard without the correct crosshair position but still pretty fun.
    KEEP UP GOOD WORK IT IS APPRECIATED IF U HAVE PAYPAL DONATE BUTTON I WOULD DEFINITELY CONTRIBUTE RIGHT NOW !
    THANKS
  • OculusRiftRocksOculusRiftRocks Posts: 331
    Brain Burst
    really looking forward to this one, will the mod work with boxed retail versions? have you had a look at 2eyeguys mod for the game?
  • gplourdegplourde Posts: 63
    MOD should work I guess since I didn't modify the gamedll. What does need to be redone are GUIs so they fit the screen. The other problem I need to fix without touching the gamedll is aiming. Using the crosshair just doesn't work. Right now I made a red dot on the left eye to aim with but its doesn't feel good. I need it to raycast on the target in 3d and draw a laser or something.
  • gplourdegplourde Posts: 63
    If anyone want to give it a try PM me. Only the first five and need to show proof you developed something with the devkits.
  • n00854180tn00854180t Posts: 323
    @gplourde, I posted this in your other thread but I figured I'll mention it here again:
    n00854180t wrote:
    OP, you would forever be my hero if you could port your Doom 3 integration to The Dark Mod.

    It uses Doom 3's engine, so I imagine it might be at least somewhat straight forward, as these things go. If not, I understand, but I think it would be awesome :D Especially since TDM is free and has lots of content.

    I'd be willing to help out a bit with the port, my Steam name is the same as on here. I'm mostly good at debugging.
    Storyteller: Fireside Tales - An immersive VR audiobook player.

    The VR Dungeon Survival Project - First person 3D roguelite survival game.

    Twitter
    IndieDB
  • ImmersionistImmersionist Posts: 18
    NerveGear
    gplourde wrote:
    If anyone want to give it a try PM me. Only the first five and need to show proof you developed something with the devkits.

    Did anyone PM you? Unfortunately I can't help you aside from donations and user feedback on implementation of the port.
  • Shannonb1Shannonb1 Posts: 210
    Hiro Protagonist
    gplourde wrote:
    If anyone want to give it a try PM me. Only the first five and need to show proof you developed something with the devkits.

    Did anyone PM you? Unfortunately I can't help you aside from donations and user feedback on implementation of the port.


    I did but no response. Feelings aren't hurt
  • gplourdegplourde Posts: 63
    I'm not ready to share it with everyone since I have not a single clue how I will handle aiming and UI yet. My offer was for peoples that would be able to compile the code themselves and set things up without support. AKA programmers interested in this stuff.

    Today I integrated the laser aiming from BFG but I think its a pretty poor option. I'll look into a laser Dot that move on screen with the mouse (like the Quake2 port) but with depth. I also want to align the weapon with that dot so it feel right. My other problem is with the view models of the weapons. They are way to close to the player camera and look double pretty much like when you move something close to your face. It is very distracting and need to go.

    About the dark mod. I believe the modify the Doom3 source and not just the gamedll. Integrating my change into that should be easy but not something I want to do myself. The other thing is that I realise its not really possible to give player a good VR experience if you don't modify the HUD and aiming. I'll look into using a wiimote or PS eye/move.
  • gplourde wrote:
    I'm not ready to share it with everyone since I have not a single clue how I will handle aiming and UI yet. My offer was for peoples that would be able to compile the code themselves and set things up without support. AKA programmers interested in this stuff.

    I'd strongly suggest getting set up with Github if you aren't already. You could set up your own fork of the source that you'd check your work in to. Then other developers can collaborate and/or help you without needing to wait on emailing source code around. It's really a great way to collaborate.
  • gplourdegplourde Posts: 63
    I do use private git repo. Not to sure how to manage the conflicting licensing issue with the rift SDK. Probably need to write a rift sdk DLL and not link to the sdk library. That is pretty much why I don't have it public. At this point I even consider having all the GPL code on GIT and non GPL code somewhere else with a script to download all the code and then merge/build locally on the user PC with VS express. That way I don't have to deal with the licensing problems.
  • gplourdegplourde Posts: 63
    https://dl.dropboxusercontent.com/u/22702748/DOOM3_DK2_270814.zip

    +set com_allowConsole 1 +set vr_enableOculusRiftRendering 1 +set si_pure 0
  • 2EyeGuy2EyeGuy Posts: 1,091
    Trinity
    gplourde wrote:
    I do use private git repo. Not to sure how to manage the conflicting licensing issue with the rift SDK. Probably need to write a rift sdk DLL and not link to the sdk library. That is pretty much why I don't have it public. At this point I even consider having all the GPL code on GIT and non GPL code somewhere else with a script to download all the code and then merge/build locally on the user PC with VS express. That way I don't have to deal with the licensing problems.
    Just do what I do, use the SDK like normal, don't include LibOVR in the repository, and ask the developer to copy the LibOVR folder from their SDK to a directory where your project looks for it.

    If it's GPL 2 then you are explicitly allowed to use operating system components (eg. hardware drivers) in source code form. I haven't checked GPL 3, but as long as you don't work for Oculus or Zenimax, close enough is good enough here.

    The far more important licensing issue is the one you are violating by not giving us the source code!
  • gplourdegplourde Posts: 63
    Are you asking for the code? Because from what I understand on GPL you have to provide the code on request. So no I don't violate anything. I'll upload the code on github probably tonight when I have some time. Last night I finished putting back the original rendering path in so you can use command line to enable or disable VR. PRetty useful when you just want to work on non vr code change. Also I think I got every code added inside a ifdef oculus so its easy to track.

    Next task is to decouple the aiming and head tracking. moving the mouse will aiming the weapon and lasersight on screen. Moving it to the edges will turn the player. Also ordered a PS move.. Not sure if thats a good option for control but I want to try.
  • govnygovny Posts: 105
    Hiro Protagonist
    gplourde wrote:
    https://dl.dropboxusercontent.com/u/22702748/DOOM3_DK2_270814.zip

    +set com_allowConsole 1 +set vr_enableOculusRiftRendering 1 +set si_pure 0

    tryed it.
    extended mode.
    Doesn't work.
    AMD videocard.
  • SvenVikingSvenViking Posts: 298
    Art3mis
    About the FOV being wrong: This doesn't help?
    g_fov [angle] - Specifies the angle for the Field of View (FOV). The wider the angle, the larger the field of vision for the player, giving a "fish eye" view in effect, however performance will be reduced. The smaller the angle, the higher the performance. The default of 90 is recommended, but players can try 85 which is a value used in some other games and will gain a slight boost in FPS. In multiplayer, g_fov can only be changed between 90 and 110.
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux)
    Jungle Juice
    Sven Co-op
  • gplourdegplourde Posts: 63
    Crash?
    Error message?
    Does it work if you dont use the vr_enableOculusRiftRendering switch
    Works fine on my pc! (TM)
  • govnygovny Posts: 105
    Hiro Protagonist
    gplourde wrote:
    Crash?
    Error message?
    Does it work if you dont use the vr_enableOculusRiftRendering switch
    Works fine on my pc! (TM)

    without vr_enableOculusRiftRendering stars loading then quit

    with vr_enableOculusRiftRendering I see a black screen then return to descktop.
  • hellionhellion Posts: 51
    Hiro Protagonist
    Just gave it a shot. I think this will be great when the aim is decoupled. I am not sure why but my FPS are horrible. The glass material effects felt very strange but thats just doom3... the cut scenes were cool i think so far, and it felt cool floating inside of and then controlling the doom marine ... hoping the bad fps is just because the head tracking is not decoupled
  • gplourdegplourde Posts: 63
    Try com_fixedTic 1

    The bad performance is because I just don't worry about that yet and its compiled in debug. Doom3 cap the performance to 60fps and I probably need to change a bunch of stuff to make it 75 and for each eye.
  • hellionhellion Posts: 51
    Hiro Protagonist
    I thought that might be the reason but wanted to mention it .. looking good so far keep it up thank you!
  • gplourdegplourde Posts: 63
    It crash with ATI carfs in the SDK at DistortionRenderer::renderPrimitives in CAPI_GL_DistortionRenderer.cpp

    Doing this, glDrawElements(prim, count, GL_UNSIGNED_SHORT, NULL);
    ATI Driver -> atioglxx.dll!0d733b86() Unknown

    No idea why and I don't have much access to ATI cards so I guess its pretty much end of the road for ATI owner. Sorry.
  • 2EyeGuy wrote:
    Just do what I do, use the SDK like normal, don't include LibOVR in the repository, and ask the developer to copy the LibOVR folder from their SDK to a directory where your project looks for it.

    If it's GPL 2 then you are explicitly allowed to use operating system components (eg. hardware drivers) in source code form. I haven't checked GPL 3, but as long as you don't work for Oculus or Zenimax, close enough is good enough here.

    The far more important licensing issue is the one you are violating by not giving us the source code!

    I'm with 2EyeGuy as far as GPL licensing worries are concerned. There's been various bits of talk about the GPL and the Oculus SDK licensing incompatibilities.

    GPL code has to link with proprietary operating system components in order to deal with initialization, input (keyboard,mouse,joystick) and output (opengl/video, audio, etc.). The Oculus runtime & SDK deals with interacting with hardware on both open and proprietary platforms.

    It is up to the copyright holders (or the EFF?) to pursue legal action regarding GPL violations. What kind of monetary damages would a hacker owe the copyright holders for violating the GPL, ESPECIALLY if said hackers release their source in accordance with the GPL? I imagine the worst that would happen is a cease and desist. Basically, "Stop releasing hacked GPL code to support 'closed' devices and platforms — it's against the license".

    It's all debatable because it hasn't been challenged in court. I'm assuming it hasn't been challenged in court for a reason — even if it is technically against a potential gray-area or edge-case in the GPL license, is it really worth taking someone to court over EXTENDING open source software to work with closed devices/code?

    Take for example, having some GPL code that asks the OS to open the default web browser. That isn't some sort of essential device/operating system API function — it's a matter of convenience. Does that mean calling a proprietary function to open the OS's default web browser is against the GPL because that function links against non-GPL code that doesn't deal with hardware or the OS? Wow.......

    ....considering that John Carmack open sourced the various id Tech/DOOM/QUAKE engines, this tweet regarding the licensing is a little ironic:
    It is self-serving at this point, but looking back, I wish I could have released all the Id code under a more permissive license. :-)

    https://twitter.com/ID_AA_Carmack/status/434005543506550784
  • gplourdegplourde Posts: 63
    The code is now up on Github with no instruction yet but should compile just fine on Visual Studio 2013 Pro. Drop the Oculus SDK in the right folder. Doom3 base data in the base/ folder. Simple stuff really.

    https://github.com/Perpixel/Doom3
  • Decoupled aiming integrated. Still need to tweak the value to find something nice. The reticule is too far.

    https://www.youtube.com/watch?v=A5dejnAo39E
  • Looks amazing really great work! Will try this when i got time :o
    http://oculusrifters.se/
    Gigabyte GA-990FXA-UD3 - AMD Bulldozer [email protected] 4,5ghz Noctua NH-U12P - 2xGigabyte GeForce GTX 780 3GB OC Windforce rev2.0 SLI -Corsair 16GB DDR3 1600MHz/CL9/VENGEANCE
  • Cant get it to work :cry:

    The code is now up on Github with no instruction yet but should compile just fine on Visual Studio 2013 Pro. Drop the Oculus SDK in the right folder. Doom3 base data in the base/ folder. Simple stuff really.

    Tried this and did´nt work :(

    Its just launch like normal.
    http://oculusrifters.se/
    Gigabyte GA-990FXA-UD3 - AMD Bulldozer [email protected] 4,5ghz Noctua NH-U12P - 2xGigabyte GeForce GTX 780 3GB OC Windforce rev2.0 SLI -Corsair 16GB DDR3 1600MHz/CL9/VENGEANCE
Sign In or Register to comment.