Implementation
Next step was the implementation in Unreal Engine. And even though that it was mostly great fun, almost like playing a game, wasn't done without many troubles and frustrations. Many times we had to take two steps back to put one forward. At first, we were wandering blindly and making many mistakes that cost us a lot of time and nerves.
The first problems appeared when we were changing the placeholders with ready-made assets. Often, it turned out that a 1: 1 scale item due to HMD optics at some distance seemed too big and in closer look - became too small. A similar issue could also be observed at distances to objects. Sometimes something close to us seemed to be a bit further. Also, we had to learn again how to create materials, due to the specific characteristics of the engine and its shaders.
Optimization
The most difficult part of the work in the Unreal Engine was optimization. Many times, with heavy heart we had to go down to earth. Many elements that we considered "done" turned out to be too heavy for VR production and they hit the trash.
Among others, we optimized:
Meshes
By creating low poly models, deleting geometry invisible to the player, creating LODs and chunks that limit draw calls.
Textures
Through skillful creation of tiling, uv overlapping, and lightmaps.
Materials
We delated fades, blendings, and other heavy nodes, using channel packing and only the necessary textures needed for realistic rendering, creating instances of materials, etc.
Lights
By creating lightmaps, limiting dynamic lights to minimum and adjusting reflections.
Effects
By replacing millions of particles with flat images, getting rid of flares, blurs, etc.
In short - It was necessary to optimize extremely aggressively and comprehensive, like for games running on mobile devices. We built many illusions, for example, we replaced distant environment models with planes and facing billboards, and further objects were hidden by cull distances and streaming levels. We were desperate, how much we have to let go of the original assumptions, but also determined to maximize visual impressions with such limitations. This was the greatest lesson of humility for us.