October 11, 2017, by Stuart Moran

Developing the Corrupt Kitchen VR

The Digital Research Team are working with Computer Science, Law and Politics on developing a VR game about corruption.

Dr Paul Tennent describes some of the development below:

Stage 1: Building the Kitchen Environment.

The first challenge for creating Corrupt Kitchen VR has been the development of the virtual environment. It would have to be populated with suitable fixtures and fittings as well as characters. Players would have to be able to perform the core task of cooking food, and the environment would have to become dirty requiring the player to clean it.

We built the environment in Unity 3D with a combination of purchased, free and internally developed graphical assets for the furniture. Scale was corrected by importing a character avatar, and using their height to ensure a correct feel.

To create a sense of life, we situated the kitchen within a very simple, low-polygon external environment – a few buildings, tables with simply animated customers, streetlights and a skybox. The user is never able to go into this space, but will be able to see it out of the doors and windows.

To make the dirt work, we elected to develop a kitchen with layers of dirt built in a layered fashion. This would mean we start with a clean kitchen then add overlays to make it horrible. These overlays can then be scripted to appear over time. Each dirt layer is a quad, with a simple “grunge” cut-out texture, laid on the clean surface. By scripting the alpha cut-off of the cut-out texture over time, this dirt appears over a matter of minutes, and can easily be overlaid on all the surfaces. Similarly, we included other aspects such as a particle based blowfly system to make meat appear to go bad by slowly increasing the frequency of fly spawning when it is left out; creating mice with a very simple AI to avoid obstacles and be attracted to traps and also increasing their spawn rate over time.

Stage 2 – Into Virtual Reality

Next we needed to make the kitchen accessible in VR. At a basic level this is as simple as checking th VR box in unity’s build settings, however there are a number of constraints. We needed to develop a room scale kitchen, with a size within the bounds of the HTC Vive’s maximum tracking space (4mx4m). This meant being careful with the size of the virtual model. Much more interestingly was the need to allow for interaction. We planned to use the Vive controllers and create a kind of ‘sandbox’ environment, in which every interaction made some sense – if it looked like you should be able to interact with an object you should be able to do so. As such we began by making all the small objects: pans, spatulas, plates etc into interactable objects – all of them can be picked up and moved around by touching them with the controller and pulling the trigger. We achieved this using the SteamVR toolkit. Beyond small objects, we also created a system to allow users to interact with static objects, for example taps can be turned on; the oven and hob can be tuned on etc.

Stage 3 – The Television

One core requirement of this work will be to provide a range of sets of health and safety guidelines for the player. Taking a cue from example health and safety videos, we have elected to include a television to play live-action pre-recorded (or possibly live) videos.

To do this we use unity’s render-texture and a video player overlaid on the screen of a 3d model of a flat screen TV mounted on the wall. This can be controlled either by a keypress from an operator, or with an interactable remote control object within the environment.

Next Steps

The next stage will be to develop a set of processes for the user to cook burgers, clean up, hire staff and all the other “game” tasks.

 

Next blog in series: Corrupt Kitchen VR Dev-Diary

Previous blog: The Corrupt Kitchen VR

Stuart Moran, Digital Research Specialist for Social Sciences

Posted in Uncategorized