Inspiration

When I was a kid, I received a basic electronics kit for my birthday. It had a few basic elements like batteries, light bulbs, resistors, and wires housed in big shells that had sockets that snapped together. It was easy to experiment and immediately see the results. Maybe you had a lightbulb connected to a battery, and you found that adding a resistor dimmed it. The kind of exploration that the kit allowed was early fuel for my passion for engineering.

What it does

VR Circuits is a virtual version of a basic electronics kit. Users are given large electronic elements and have the ability to connect them with wires. Elements are meant to be responsive - the wires can be added or removed, and the switch can be thrown. If users create a circuit, they will see the wires being used change color, and the lightbulb in the circuit light up just like it would in real life. To aid exploration and learning, I created four levels using four basic elements (battery, lightbulb, resistor, and switch). Users can follow these levels to build circuits of increasing complexity and difficulty, from a simple light to a dimmable one.

How we built it

VR Circuits was built for Oculus Quest using Unity. I used EchoAR for my backend. I made all of the assets in Blender and Photoshop. Textures are from photos I have taken in the past. I started the project by working on assets. First I built the wire in Unity because I wanted to figure out a way of making it change lengths seamlessly. Then I moved on to building the battery, lightbulb, resistor, and switch in Blender and Photoshop. I am relatively fresh to Blender, but I had a blast learning more about it in the process. Following the modeling/texturing, I moved on to setting up EchoAR. After reading through their documentation and looking at the examples they provide, I was able to get my project set up so that the Blender models/textures would load into my project, where I would populate them with any Unity data I needed. After this, I moved on to setting up the Oculus Integration and interactions (such as adding and deleting wires). After getting the interactions to the point where I could make a circuit, I worked on getting the circuit to work (lightbulb turns on when powered, switch works when thrown, etc). Since my project only uses a few elements, I was able to set up a fairly basic algorithm that uses BFS and then checks a few conditions in order to know what it needs to do. If I continue this project, I will work on a more robust algorithm. For this though, it works. Finally, I beautified the scene to try to make it more pleasant for users.

Challenges we ran into

This project was full of challenges! As I mentioned, I am still pretty new to Blender, so I frequently made mistakes that took a while to solve. One great example is with the switch. In order to make the toggle shape, I had to fuse together two spheres, which was messy. There is probably a better way to do this, but after trying different things, I eventually found something that worked. When I was figuring out EchoAR, it took me some time to figure out why I was not able to move objects that had been downloaded. Eventually I found that I had forgotten to remove the RemoteTransformations script that automatically took over control of object transformations. Oculus Integration was also challenging. I have developed for Quest using Unity in the past, but I used MRTK for hand interactions instead of controllers. Getting the controllers to show up and then getting them to be able to grab objects took me a little while, but it is working great now! The switch interactions were also very difficult to figure out - I could not get the switch to move with the controller. Eventually I figured out that I could add another object for the controller to grab, and then have the toggle rotate to follow that object. Even then, the rotations took a while to work out. Finally, coming up with an algorithm for modeling the circuits was something that I spent a lot of time thinking about. I initially wanted to make something robust that could handle throwing in as many batteries, resistors, switches, and lightbulbs as a user wanted. Despite this, I decided that for this step in VR Circuit's creation, it was more feasible to do something with a limited scope. Coming up with this algorithm was nevertheless a challenge.

Accomplishments that we're proud of

I am proud of several things! I think that the wire interactions feel really good. Dragging vertices to add and dragging wires to delete works fantastically well. I am also very proud that the circuits work. I was worried that I would run into major bugs with the algorithm and not have enough time to get it working, but it works well.

What we learned

I learned a lot about Blender, EchoAR, and Quest controller support in Unity. Additionally, any time I get to use Unity, it is an opportunity to learn or try something new. This time I gained a lot of experience with rotations, which I hope to be able to apply to Unity projects in the future.

What's next for VR Circuits

As I mentioned previously, I would like to improve the electric circuit algorithm. I would also like to add more elements and levels to the game. I'm a bit rusty when it comes to electronic circuits, so this has been a great opportunity to relearn the basics. I'm excited to keep on relearning as I continue building this project!

Share this project:

Updates