A client came to me to discuss issues they were having, with explaining their new designs for a retail store with the client. There were areas the client was having difficulty visualizing, and worries about traffic control.
I decided to leverage (at the time) newly released Oculus Rift devkits, to create a Virtual Reality walkthrough of the designs of the store.
First I asked for the designs, which came in a Google Sketchup format. I then export those designs as a Collada file (a common 3D file) and imported that into the Unity Game engine. Immediately I noticed some serious performance issues. The model was so large that rendered in real-time, it would lag, shutter, and sometimes crash altogether.
I found that every element in the scene, was it’s own mesh, creating more overhead than necessary. To solve this, I started by taking all repeating elements (bottles, stacks of shirts, tables, etc) and began replacing them with an instance of one mesh. Then I took any and all repeating colors and textures, and replaced those with one.
That instantly sped up the model, but it still felt sluggish. I decided to employ a technique calling “Frustum Culling.” Instead of rendering all the models, all the time. This takes and hides all models outside of the viewport. Below is a gif of that process.
Doing that made a HUGE impact on the performance, making it render a consistent 60 frames per second, on our display computer.
I now needed to make create a body moving through the space. Simply making a floating camera would have sufficed, but the end user wouldn’t have gotten a sense for any choke points in the design. Basically they would have floated through sections where a human being, would have struggled to move. I created a simple, stretched sphere, at the same height and width of an average human. Then calculated the collision bounds for all the tables, floors, places where the user would be likely to run into. And then told the engine to collide the user, with those items.
With all this in place, it was time for the final touches. I played a documentary on the maker of the product on the TVs around the store. I build an inclined plane up the stairs, so that the user could go up and down stairs.
This was a quick and easy way to allow their client to experience the still unbuilt, and for the client to sell their designs and process. This led to beneficial conversations, and lasting changes.