Monday, 2 May 2016

Siege

Siege was a self imposed challenge.

With most of my work going into my lecturing job, I end up not having a lot of finished pieces that I can show off, beyond the odd experiment or two. I decided to give myself something to do that would both fix that problem and push my skills a bit. The challenge was this: To build a VR experience in Unreal, in a very short period of time. In this case, it was over a weekend, in whatever spare hours I could get.


The task had a number of challenges to overcome.

Firstly was assets. With such a limited amount of time available, creating custom models and textures did not seem viable. My focus was on creating an interesting VR experience, so the majority of time needed to be spent in the Unreal Editor actually building the scene. The solution was to use ready made assets. I decided to go with the excellent Infinity blade assets by Epic games. The modular props included are both high quality and flexible, and so were a solid choice to work with. I would still need to create some custom assets, mainly materials and particle systems, but the asset pack was an excellent foundation. It also helped direct the theme of my scene: a castle under siege.

Notably absent from the asset packs are sound assets. There are a few for some ambiance and generic combat sounds, but not enough to create the type of soundscape I was going for. While I love sound design for environments, the time needed to source and implement appropriate sounds made it a low priority, outside the scope of the project. I chose to leave sound out, rather than do a half-job on it, and focus on other aspects.

The player themselves was the next major concern. Working with VR means that most design rules go out of the window, particularly dealing with UI. Scale feels very different when viewing a scene through a HMD, and the way a human looks around an environment is very different to the way someone explores with mouse or thumbstick control on a screen. The eye is drawn to colour and movement, so I planned to use this to help direct the player towards areas of interest. This became more important due to the lack of audio feedback; I was relying almost entirely on visual cues. I made the choice very early on not to allow the player to move. Not only was it not necessary for the project, but it allowed me to focus on just what the player would see from that one location. This helped with optimization and the planning of the more dynamic elements.

Another challenge was getting the lighting right. Unreal's default HDR options look great on a monitor, but don't make any sense when using a HMD. Your own eyes are doing their own exposure compensation, so having the in engine exposure layered on top of that can be a little disorientating, especially in a night scene like this one. With the automatic exposure disabled in engine, I had enough visual consistency to play with some very dim lights, that add a lot to the atmosphere. The screenshots end up looking quite dark, but it looks great in VR. I could have also gotten around this by setting the scene in daylight, but a night scene allowed for flaming projectiles to be spotted with way more ease, which helped with player direction.



The dynamic elements were put together with Blueprint. Nothing particularly complex here, just some matinee and triggers. The trick was to get them to draw the player's attention. The player starts facing in the right direction to see the volley of fire arrows, which set fire to the hay bales. Shortly afterwards, they should see the trebuchet shot fly overhead and destroy the tower, a fragment of wall landing near the player. Each element of the sequence is designed to draw the player's vision smoothly from one event to the next. 



I'm pretty happy with how things turned out, though obviously I had to make a lot of compromises due to the time constraints. Some of the particle systems react oddly in dim lighting, and the collision on the arrow volley does not occur unless the player was looking in the right direction when it activates, something I only noticed while demoing the scene to others. I could have played with scale a little more to make the VR experience a bit better. The plaza looked fine while in editor, but looks a bit empty when in VR, as increased FOV lets you have more things closer to the player without it feeling crowded. A little more polish, a longer dynamic segment, and of course, sound, are all elements I would have liked to include.

The final scene had a total of 15 lights, 444 meshes (not counting those painted on terrain), 11 emitters, and 10 brushes.

If you want to see the scene for yourself, it's available here:

https://drive.google.com/file/d/0BzvAo5Z23YJSSUJPY1VTM1d1Yzg/view?usp=sharing



I've tested it with an Oculus DK2, but should work with any HMD. Upon launch if it does not run on a HMD you should be able to enable it with Alt+Enter. If you do not have a HMD available, it will still work with mouse controls.
During the siege, visual cues should help aid you with where to look, though the initial arrow volley can be a bit tricky to notice on a HMD. Looking between the two statues (directly forwards) when you press space will help.

No comments:

Post a Comment