Public VR Demonstration using Rift DK1

I rarely post about anything work-related on this blog (the last time was over a year ago), but I really wanted to write about this one. I’ve been a huge supporter of VR and the Rift since before the kickstarter, but the overwhelmingly positive reception when I had the chance to use it in a public demonstration still surprised me.

Background

There is an annual event at Austrian universities called the “Lange Nacht der Forschung” (Long Night of Research). Basically, for one evening/night – starting at 17:00 and going on until 24:00 – the Universities prepare demonstrations, talks and interactive sessions about research for a general public. It’s (surprisingly?) popular, with 136500 visitors this year. There’s a great variety of visitors, students, families with their children, and even seniors.

Our Demonstration

This year, our group was asked to do a demonstration again. Since I wanted to do something which is both related to our current research and engages people I had a pretty hard time coming up with ideas. In the end, I settled on taking the result of one of our compiler analysis methods (designed and implemented by Herbert Jordan) which generates a Petri net representing the parallel execution of a program, and visualizing it in VR using the Rift.

I had a prototype up and running using OpenSceneGraph, but with the recent release of UE4 with licensing for mortals, I decided to try it using that. With just a bit over a week to go (and, it turned out, a few graph layout papers to read and 3D models to create in addition to getting used to coding for and working with a huge engine from scratch) it was a tight squeeze, and quite exhausting, but I completed it in time.

If you can read German you can find more detail here. Basically, it’s a set of nodes (2 types) floating in space, connected by “bridges” representing graph edges, and with pillars showing the ID of the related program node/construct, as well as (optional) “monitors” showing the associated code for e.g. region constructs. Here’s a screenshot:

Screenshot of the Visualization (Non-VR mode)

Screenshot of the Visualization (Non-VR mode)

For the actual demonstration at the event we also had a 30″ screen mirroring the Rift output set up, so that people could see what’s going on, as well as a copy of the poster I linked above to explain the context of what was being presented.

The Reactions

Now we get to the part which is actually interesting. I was really curious how these “normal” people would react to the Rift. I am happy to say that the overall reaction was much more positive than I expected, despite all the technical shortcomings of DK1. We had a group of people watching and waiting for their turn for the entire duration of the event (so 7 hours, actually closer to 7 and a half if you take all the time before and after the official start into account), and probably around 250 people using the Rift.

We had a wide range of visitors over all age and gender boundaries – with families, normally it would be the kids trying the Rift first and then convincing their parents or grandparents. Here are a few photos:

Some remarkable incidents and things of note I observed:

  • We actually had to reassure people multiple times that “we’ll still be here for 5/4/3 hours” during the most crowded periods.
  • Upon it being explained that importing DK2 to Austria will cost about 400€, most people were surprised at how inexpensive that is. One particular remark I remember is a boy (probably elementary school age) exclaimed “Wow, that’s 100€ less than the new Xbox!”.
  • A young woman in her early 20s telling her boyfriend “we need one of these at home” after walking around in the demo for 2 minutes.
  • More people recognized the Rift than I expected. I’m sure some of that had to do with the Facebook deal and the reporting around it.
  • You could easily tell if someone who tried it was familiar with twin stick FPS gameplay. Gamers would zip around using both sticks, but often fail to move their head and just look at stuff until prompted to do so. On the other hand, non-gamers would turn exclusively using their head/body, and be in danger of getting wrapped up in cables.
  • “Mom, can I get this for Easter?”

That’s it, pretty much. After this exhausting but fun experience I’m more certain than ever that VR will not just become big, it will do so very quickly. Oh, and I’d like to thank Philipp Gschwandtner for helping me with the demo, and for taking all the good pictures you see in the gallery above. The bad ones were taken by me.

Aliasing and Anti-aliasing Comparison Tool

ss_2013-12-24_20-32-42This is a tool for illustrating the various types of aliasing which can occur in computer graphics, and how many common methods of anti-aliasing interact with them. I wrote it to accompany an article which will be published some time in the future, and which contains a rather detailed treatment of the topics of aliasing and anti-aliasing.

A main point is to also show aliasing (that is, flickering and image instability) in motion, which is insufficiently captured by the common screenshot or (compressed) video comparisons.

There are 6 types of aliasing shown (transparency aliasing, geometry aliasing (2D and 3D), sub-pixel aliasing, texture aliasing and shader aliasing), and many methods of anti-aliasing are available.

ss_2013-12-24_20-44-07The 1-8 keys are mapped to presets which show some common anti-aliasing methods:

  1.  none
  2. 4x MSAA
    multisampling, generally sparse grid
  3. 2×2 OGSSAA
    ordered grid supersampling with 4 samples
  4. 4x SSAA
    turns the 4 multisamples into supersamples, thus 4x SGSSAA on most HW
  5. FXAA
    just post-processing, see sub-pixel effects
  6. SMAA
    as above (note better motion stability)
  7. 1.5×1.5 OGSSAA + SMAA
    similar to what can be achieved via injection in most games, often decently playable
  8. best
    maximum number of SGSSAA samples plus 2×2 OGSSAA. Close to the “ground truth”, that is the perfect representation of the scene on the pixel grid

Let me know if anything breaks. I do know that the PXAA and TPXAA PPAA methods don’t work on AMD, if anyone wants to help fix it (and has the time) contact me and provide some means of synchronous communication (e.g. Steam ID).

Source code release soon.

Download here!

(If you encounter an error about missing some .dll when running the program, get the Microsoft C++ redistributable here)

(Edit 2014-1-14: updated to fix an issue which could occur with some AMD drivers)

DPfix 0.9.5

Changes:

  • Various adjustments to improve compatibility with version 1.01b of Deadly Premonition
  • Removed the “disableJoystick” option, as it is now superfluous (the bug it was designed to work around was fixed by the developers!)
  • Made AA apply in some circumstances where it did not before, like the in-game menu
  • The distribution version now includes (optional) logging, to make debugging problems easier

Sorry for the delay, as I wrote in the last update I didn’t really have much time to work on this over the past 2 weeks. One important thing: if you are experiencing any issues, please reboot your system and see if they are still reproducible afterwards. Even in its current version the game is still quite susceptible to strange random issues which go away after a reboot.

Download DPfix 0.9.5 here (donate)

DPfix 0.9.1 (Updated)

Here we go, I hope this one works well for everyone (unlike 0.8).

VSSAO2 screenshot

Changes:

  • Fixed the issues introduced on some systems by 0.8
    (which were caused by the haphazard way I tried to fix the offset issue)
  • Fixed Video size during profiling
    (this was a bug related to improving the reflections introduced in 0.7)
  • Really fixed the pixel offset error, at all resolutions
  • Added high quality “VSSAO2″ option (see above, compare: off / on)
  • Adjusted windowed mode so that it’s possible to move the window

Tracking down the profiling issue and the correct fix for the offset error was rather cumbersome. Here you see the culprit for the “halos”:

Downlaod DPfix 0.9.1 here (donate)

 

DPfix source release

The source code for DPfix is now up on github.

I always planned to do this, but I decided to do so earlier rather than later for a few reasons:

  • 0.8 works perfectly for me, but causes problems on many other systems, and it’s very hard to “remotely” debug issues.
  • I’ll be really busy with work the rest of this week and throughout next week, so I can’t spend as much time on Deadly Premonition (or anything really) as I would like.
  • Someone asked for it.

Now, when I released DSfix I was a bit disappointed by the lack of external contributions. There were a few brave souls, and I’m very grateful, but overall 95% of the code in DSfix is still written by me and untouched.

I think the problem was at least partly a lack of documentation and guidelines on my part, so I just spent over 2 hours writing up a developer README for DPfix. Have a look if you are thinking about contributing, or if you simply want to get a better idea about how Deadly Premonition works or how I create these interceptors.

DPfix 0.8

Edit: Apparently there are some issues with this version on some configurations. If you experience any problems, revert back to 0.7.1 until I can figure this out.

Closing in on the final version.

Changelist:

  • Fixed pixel offset error in light buffer with higher rendering resolution (caused small halos around some objects)
  • Fixed AA not being correctly applied when the game uses the alternative rendering path (e.g. in the gallery)
  • Added option to improve the Depth of Field effect (reduces flicker/pixelation)
  • Added intial version of SSAO (screen space ambient occlusion) option

Some of these were much harder than they should have been. Maybe I’ll write up a longer post at some point with some more in-depth explanation of some of the things which go on in Deadly Premonition’s rendering pipeline, and how they affected DPfix development.

Download DPfix 0.8 here

Also check out this high-res font/UI pack by InfiniteNine.

This is the “halo” effect I’m talking about in point 1:

It was caused by some pixel size (or rather, 0.5/pixelsize) shader parameters not being correctly updated with the increased resolution, both for vertex and for pixel shaders, and it got worse with higher resolutions. It should be completely fixed now.

The DoF improvements can be seen in the shot up top already, with a less muddy/pixelated but still unfocused image in the distance. Finally, here are two screenshots showing off the current SSAO effect:

SSAO off | SSAO on

As always, if you like DPfix you can consider donating here, and if you enjoy the work InfiniteNine did on high-res UI textures you can donate here.

DPfix 0.7.1 (Updated)

I’m quite proud of this release, since it accomplishes something which is amongst the hardest things I did in any of my interceptor .dlls so far, and which I failed to do back in DSfix: improving the quality of the shadow mapping.

mirror finish

Changes:

  • Fixed an issue that could happen when reloading and encountering a dual-perspective scene twice (0.7.1)
  • Fixed crash when accessing the Add-ons menu (might also fix other crashes)
  • Added the ability to improve shadow rendering: shadow map resolution and precision settings
  • Added reflection resolution setting (affects e.g. mirrors, see screenshot above)

The most complex of these is the shadow change, and it also make a rather large difference, as you can see for part of the shadow map of the opening scene below (Left shows the default, and right with settings shadowMapScale 4 and improveShadowPrecision 1):

shadow buffers

There are some minor bad news which come with the crash fix, since it involves changing how textures are hashed:

  • All A few existing texture mods may no longer work, until they are updated to the new hash code.
  • The fix for dual-scene rendering is also affected, and will not work until I can get to such a scene in the game again and find the right hash. (Or until someone provides me with a savegame in the room in chapter 5)

I will release a 0.7.1 to fix the latter issue once I am able to do so, I did not want to delay this release further since I might not get a chance to work on anything concerning Deadly Premonition until Saturday.

Download DPfix 0.7.1 Here

As always, if you enjoy this release, you can donate here.

DPfix 0.6.1 (Updated)

Screenshot

Just a small update:

  • Fixed crash caused by using the texture override functionality (sorry about that one)
  • Added screenshot functions for both normal and hudless screenshots
    You can configure the keys for screenshots in DPFixKeys.ini and the path they are stored at in DPFix.ini (default is [game path]/dpfix/screens)

Download DPfix 0.6.1 here

You can get the override textures used in the screenshot above here. The key texture can be used together with a controller profile to get correct key prompts when playing with a controller (particularly handy during QTEs).

(Ye olde donation link is here, since every post tagged dpfix could be the first/only one someone new sees)

Edit: 0.6 broke texture dumping, 0.6.1 fixes it again. Download from the link above.

DPfix 0.5

After a weekend spent mostly on Deadly Premonition, here’s another version of DPfix. Due to the number of fixes and additions in this one I bumped the version number by 0.2.

Screenshot

Changelog:

  • Fixed additional map locations/sizes for main menu map and large overlay map
  • Fixed positioning and size in scenes with 2 viewpoints being shown (also fixed size of their storage buffers)
  • Fixed enemy shadow trails on the world map at night
  • Added anti-aliasing support (FXAA and SMAA1x supported, see DPfix.ini to enable)
  • Added texture dumping and overriding functionality (works as it did in DSfix)

Download DPfix 0.5 here

(If you like this version you can consider donating)

Some other things:

  • Some people think their posts here on the blog are being deleted, rest assured this is not the case. Because of spam issues I run a rather rigorous spam filter and most posts need to be manually accepted (particularly if it’s your first post) so there may be some delay involved in that. (You may have noticed that there’s no spam in the comments, unlike most blogs :P)
  • If you have issues with the game which are unrelated to DPfix, (e.g. stuttering, crashing) try rebooting and setting DP.exe to Windows 98 compatibility mode. Sounds silly, but it fixed everything for me.
  • I can’t really fix audio issues or add real gamepad support to the game, sorry.

In the upcoming week I have quite a lot of work to do, so I probably won’t get much done in DPfix, but I think this version is really good enough to enjoy the game with.

Edit:

Oh, and someone please make a high-res texture pack for the 3D stuff in the in-game menu. It’s hideous!

DPfix 0.3 beta

This version fixes all issues I was aware of (which were caused by DPfix and not inherent in the game), so I’ll call it a beta. Of course, there might still be problems I’m not aware of yet.
Screenshot

Changes:

  • Fixed normal mapping/lighting of many surfaces in the game (this is a big one)
  • Fixed minimap location
  • Added windowed mode (in addition to fullscreen and borderless windowed fullscreen modes), since it was requested

Get DPfix 0.3 beta here

Unless something more crops up, I can now focus on additional features (and I’ll also slow down the pace a bit probably, I’ve done little else these past few days).

I’ve also been contacted by Rising Star Games about DPfix, so maybe we can work something more official out.

(If you find DPfix useful, you can consider donating here)

Update:

There is a remaining issue with scenes that render 2 camera perspectives later in the game. I’ll have to play a bit to get to those before I can attempt fixing them (I don’t really want to skip forward by downloading a save, I’m actually enjoying the game)