I was thinking, how cool would it be to create a virtual reality game in your own neighbourhood? Well I did it, below I will give you some more info about how I created this proof of concept for the Oculus Quest.

Photogrammetry with Meshroom

If you shoot a lot of pictures from different positions you can create a 3D-model. This technique is called photogrammetry. For this project I took around 30 pictures and I used Meshroom to render the model.

I used Google Colab, since I don’t have a graphics card with the CUDA technology. This service from Google offers a free environment with GPU. There is only one downside, the site must stay active and after 12 hours the machine and its content will be removed.

After it was finished I tried to reduce the faces in Blender with the “decimate modifier” and removed the superfluous parts. This was necessary to make it run smoothly in Unity.

The raw model from Meshroom in Blender

Unity

I was developing this virtual reality app for the Oculus Quest. In Unity you can make use of the Oculus SDK to help you with the head, movement and hand tracking.

I removed all the lighting, added some black fog and only placed one light to create a dark atmosphere.

Next I imported a simple gun add-on and adjusted the behaviour in code. For example: if you grab the gun it should grab it at the holster and only trigger the shooting if you have the gun in your hand.

The gun was grabbable, but didn’t snap to the right position. This can be fixed in code.

For the zombie character I used the nav mash agent in Unity. If the player was in a radius of 5 meters, the zombie would walk to you and try to hit you. If the zombie was very close, it started attacking.

Mixamo

This website owned by Adobe has an easy to use interface to rig your character and provides a library with free animations. For the zombie I used the idle, walking and attack animations.

I added blood and dust to the texture to make it a look a bit more like a zombie.

Conclusion

I loved the idea to create a zombie game in your own neighbourhood. With a technique like photogrammetry you can easily create a scene with your own house. The raw model is good for this proof of concept but I would need to investigate how I can optimise and clean the model.

Discover more on Twitter.