Jump to content
The Dark Mod Forums

I'm working on a VR version - early alpha


cabalistic

Recommended Posts

I think I figured out how to get rid of the two geo's in the drawsurf struct.

Please see svn rev 7625 and advise.

The idea is to not store frontendGeo at all since it's not used anywhere*.

I tested this in TD2: chalice of kings where the guards used to visibly flicker with my earlier unsuccessful attempts.

 

*Deforms and subviews need separate testing.

  • Like 1
Link to comment
Share on other sites

Uhm, but there are still two geos in the struct?! You just made one not a pointer. I'm not really sure what benefits or drawbacks that brings (without thinking about it some more), but I'm not seeing a fundamental change here.

 

The BFG engine actually does not replicate the whole geo structure for the backend, it merely copies the caches. I think it might be better to try and use that approach, as well. I did not initially, because I did not fully understand the implications. BFG works only by caches, whereas the original Doom3 engine did not, so it seemed risky to do it that way. But I think we are at a point where the cache is also always guaranteed to be set in the backend, so the backend no longer needs access to the full geo.

 

By the way, imho you should remove code that you replace, not comment it out. It makes reading the diffs harder, and it leaves a lot of dead code in the repository over time. Source control exists for a reason :)

  • Like 1
Link to comment
Share on other sites

It's one geo, and backendGeo is a mere pointer to that. (So that I could push the code sooner for review without a ton of changes in the backend).

BackendGeo is going to disappear after code review.

Effects how I see it: one geo is less confusing than two. Fewer memory writes (It's micro-optimization weekend BTW lol). One less pointer lookup in the backend if geo is struct member, not a pointer.

On the other hand we might as well try to copy the ambientCache, shadowCache, indexCache, etc.

  • Like 1
Link to comment
Share on other sites

Mh, I have to go through it carefully again to understand the impact. However, keep in mind that we must absolutely, positively, make sure that the backend is reading caches that are not at the same time updated by the frontend for the next frame. That was the whole reason why I had to add the separate backend geo in the first place (or why BFG copies those cache handles). Possibly your copy solves that, but we better be sure about it... Don't think it's going to do anything for performance, though.

  • Like 1
Link to comment
Share on other sites

After some thoughts, I'd rather go the BFG way but can you point me where they copy their ambientCache for ambient and interaction surfaces? Search on github did not show any.

 

NM, found it.

 

The BFG style is great that it does not need full copy of a srfTriangles_t for each surface and it the backend does not need to load srfTriangles_t content from a pointer.

  • Like 1
Link to comment
Share on other sites

I finally gave this a good testing a few days ago! It's really looking good I have to say. I played my own mission (needed to look for bugs and mistakes anyway) and I can happily report that I had no real issues at all in VR. Performance was smooth as butter 90% of the time, no crashes or game breaking glitches spotted.

 

There were a few things, that you're probably already aware of, and are things that are most likely far down the line on your to do list:

 

-Many materials and particles draw completely differently in each eye which looks really odd, when you shut one eye at a time you see it clearly. Fire, water and shadows were the most prominent examples.

 

-The focus of the player is still bound to the mouse, and not the orientation of your head which makes frobbing really hard in many cases. (maybe adding a "crosshair" would be an acceptable solution for now).

 

-Related to the above having to use the mouse with freelook on to navigate around is incredibly nauseating, as it's tricking the brain into thinking the whole world is swinging on a pendulum as you look up and down. I consider myself pretty resistant to motion sickness, but that about put me over the edge.

 

Aside from these things honestly after getting some true roomscale and controller interactions, not being able to look under the hood, I would say it's a finished product, really great work!

  • Like 1

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

Thanks. Though I have to point out that adding roomscale is actually the majority of the work, and that's not even been started :) So it's a long way to go.

 

As for differences between the eyes, for the shadows at least there is a workaround. See here: https://github.com/fholger/thedarkmodvr/issues/4

  • Like 3
Link to comment
Share on other sites

Yes, but I'm afraid it's quite outdated by now. TDM has moved on quite a bit since then, anx I have a couple of branches lying around with partial experiments, some of which I want to consolidate. Unless yoz are bored to death right now and desperately looking for work, I'd suggest to wait until I've at least updated the code base to the current TDM version. There is one thing left to do for me on the base game concerning fbos, though, before that really makes sense.

  • Like 1
Link to comment
Share on other sites

I have started porting over the VR changes to the latest trunk version. The initial merge is done, but it's going to take a couple days to fix the remaining issues and get it to actually work again.

 

@Samson: I don't know what time zone you're in (western Europe here), but perhaps we can find some time on a weekend or so to chat or something. Then I could walk you through the current state of things, the particular challenges compared to Doom3 and we could perhaps decide how to proceed? Let me know if you're interested.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

I am watching this project with interest and check back on this thread every now and again; This will be the thing that gets me back into TDM big time I think.

 

Also, I know it's way too early in development to start suggesting shit so I was gonna wait until this was further along in development past the "Shit, can we even get this working and keep it up to date with the game's current version?" stage, but Vman339 basically all but peer pressured me into starting to give feedback since they're a person as passionate about this game as I am about my VR headset.

 

Last time I played this (which was a reasonable while back and probably a much earlier version), it was more than a bit difficult to understand where your arrow was gonna land when you shot it since your head was independent of your bow and arrow, and having a 3D perspective where the bow and arrow was meant to be operated with a 2D one complicated things even further. I think it would be great to have an optional arrow trajectory indicator like a blue/greenish laser dot (colored after Garrett's new eye) or something along the lines of that specifically for this mod; This is if I assume correctly that it won't ever operate on straight up motion controls like something like say, the Doom 3: Fully Possessed Mod.

 

Apologies if this has been already suggested or already exists in a more recent version.

Anyway, thanks for working on this project, TDM has huge potential in VR if you can wrangle the UI and mechanics well enough.

  • Like 1
Link to comment
Share on other sites

Well, my near-term roadmap currently looks like this:

  • fix one outstanding bug to get the preliminary port to 2.06/2.07 working
  • get UI elements including menu to render to a separate plane so that you can actually see and read them in VR
  • decouple vertical mouse movement from the head motion as it's incredibly confusing

After that, I'll see if I can quickly add some sort of "pointer" like a 3D crosshair to give an indication of where the mouse is currently aiming at. This isn't just important for bow and arrow, but also basic things like looting and picking up stuff, because that's still bound to the mouse aim.

 

As for roomscale: it's always been my distant goal to make this a full roomscale experience, but it is a very long road. And performance is still a huge concern. There is one major change and a few quick wins that are specific to VR that I'm going to try to implement that will probably help a little. But even then there are going to be maps which are not playable in VR, and probably few will be playable without reprojection. Some further performance optimisations will have to go through improvements in the base TDM project, so that will take a while, and it won't do miracles, either. I'll just have to see what's possible in what timespan.

So for a first step, I'm just trying to make it a decent seated experience, because I figure that's better than nothing :) Whether roomscale will ever truly happen remains to be seen.

  • Like 4
Link to comment
Share on other sites

  • 4 weeks later...

Thanks for the update! I check back in on this thread from time to time. That looks like a solid roadmap. If you can nail the bullet points, I think it'll be good enough to recommend. I wonder if the 3d cross-hair could be toggle-able...? Crosshairs are weird in VR. Like, it's easy to go cross-eyed, if that makes sense. But I understand the desire for something like that. Sometimes I feel like I'm frobbing forever, struggling to move the mouse over the correct spot.

 

BTW, I agree seated is better than nothing. Alien Isolation taught me that. Roomscale is great, but it's not everything. Thanks again and keep up the great work!

  • Like 2
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

Any news on the 2.06 port? I've held off updating. Does anyone know what'll happen if I try to play a mission designed for 2.06 while still on 2.05? I guess it'd be easy enough to try and see for myself.

 

On another note, TDM-VR works with opencomposite (https://gitlab.com/znixian/OpenOVR/blob/master/README.md) for anyone who's using that in lieu of SteamVR for Rift. The downside is you can't reset your position because you need the SteamVR menu to do that, so you're out of luck if you don't begin the game sitting completely still, facing forward. Nevertheless, I thought it was worth mentioning.

 

Also, I'm going to try to bind keyboard controls to the VR-controllers (https://steamcommunity.com/games/250820/announcements/detail/3809361199426010680). It won't be like having "hands" in-game, but I found with other games (Alien Isolation, for example), it positively impacts the experience. Plus it'll allow me to stand up.

 

Last night, I played through Chronicles of Skulduggery: Pearls & Swine. I really enjoyed that one! No VR-related issues to speak of. Performance dipped in a few places, but no show-stoppers.

  • Like 3
Link to comment
Share on other sites

It's all good. Thanks for the reply! You're doing something for free in your spare time. Your efforts have been very appreciated. It sounds like waiting is the smart move. I'm honestly happy to play it as is right now, I just wanted to try out some new missions. I'll probably download another instance of TDM and keep 2 versions to make it easier to go back and forth between VR and pancake.

 

Cheers!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

It's all good. Thanks for the reply! You're doing something for free in your spare time. Your efforts have been very appreciated. It sounds like waiting is the smart move. I'm honestly happy to play it as is right now, I just wanted to try out some new missions. I'll probably download another instance of TDM and keep 2 versions to make it easier to go back and forth between VR and pancake.

 

Cheers!

 

I would love to have two versions as well. I really enjoyed this experience despite the nauseating vertical mouse movement. It was quite a while ago I had the VR mod installed so I don't remember how to install it. So my questions are:

 

1) What is the easiest way to get a hold of a stock 2.05 install?

2) How do I make sure I grab the correct package of GitHub?

 

I really hope to see the mod catch up to main-line TDM once 2.08 rolls around, and hopefully we can have the major issues ironed out so that we at least have a solid seated experience! My lack of coding knowledge unfortunately makes me pretty useless to the process, but I will certainly test any progress with pleasure!

Edited by Bienie
  • Like 1

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

 

If you mean fresh TDM 2.05 install, then tdmsync prototype is probably the easiest way.
Copy your current TDM installation (no matter which version), then downgrade it to 2.05 with tdmsync updater.

 

 

I got the downgrade to work, I think... Had to turn AVG off cause it was having a hissy fit. In game it says 2.06 though, even though I added the correct 2.05 mirror. Should I be concerned?

 

Secondly compiling the VR mod files gave me 123 warnings and one error about building MFC application... Not sure if this is related to the error I got while installing Direct X SDK (it was called S1023). Sounded like you have to install that first, before Visual Studio 2013 Community Edition, or some bs. Sigh. I really have no experience with these things. Can't even remember how I got it working last time since I have no memory of going through the motions of compiling it. Would be really nice if the pre-built files were uploaded somewhere, so us non-programmers could just "plug-and-play" while testing.

Edited by Bienie

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

I haven't removed the previous releases, they are still there: https://github.com/fholger/thedarkmodvr/releases

No need to compile anything, the latest (0.1.3) is the latest working version.

 

Oh, yes that looks a lot more familiar haha.

 

So it's telling me "Error during initialization", the same way it did to me last time. I thought I had messed something up in the folder or something so I deleted it and tried reinstalling. That doesn't seem to be the problem though, any ideas?

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

Yes, it is most likely 2.06.

Do you have a tdm_update.log?

Where exactly do you see 2.06?

Could you attach condump?

Could you post tdm_mirrors.txt?

 

Here is my tdm_update.log

It displays 2.06 in the main menu of the game, but only there. When I try opening it with VR mod installed and the game gives me the initialization error it's called 2.05:

wt2ho00.png

 

This is how my tdm_mirrors looks

# This file lists mirror sites for The Dark Mod, which are used by the
# tdm_update utility to update your TDM installation.

[Mirror azure]
url = http://tdmcdn.azureedge.net/release205
weight = 1

My Fan Missions:

   Series:                                                                           Standalone:

Chronicles of Skulduggery 0: To Catch a Thief                     The Night of Reluctant Benefaction

Chronicles of Skulduggery 1: Pearls and Swine                    Langhorne Lodge

Chronicles of Skulduggery 2: A Precarious Position              

Chronicles of Skulduggery 3: Sacricide

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 1 reply
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...