Google Inc. source texts for application development for the platform , allowing the use of any smartphone to create affordable virtual reality headsets. In the simplest case, to create a headset, it is sufficient to cut out a frame from cardboard based on the proposed to hold the smartphone in front of the eyes and use two lenses for focusing.
Google VR SDK for developing virtual reality applications and demonstration mobile for Cardboard under the Apache 2.0 license. The SDK includes libraries for creating VR applications for Android and iOS, a rendering system for generating output for viewing on Cardboard headsets, and a library for pairing headset frame parameters with the application via QR code.

SDK to create applications for smartphone-based VR headsets, forming a stereoscopic image by splitting the screen into two halves, where individual images are created for the right and left eyes. When generating output, parameters such as the type of lenses used, the distance from the screen to the lens, and the distance between the pupils are considered. The SDK includes built-in functions for creating virtual environments, including motion tracking tools, user interaction interface elements, and stereoscopic rendering with distortion correction support.
The image changes depending on the position of the head and the user's movements, allowing not only the display of a static stereo image, such as watching 3D movies, but also navigation in virtual space like in specialized VR headsets (playing 3D games and viewing videos and images in 360 degrees). To assess spatial displacement, the smartphone's camera, gyroscope, accelerometer, and magnetometer are used.
It is noted that Google has recently stopped actively developing the SDK, but interest in the project remains, so it has decided to transfer development into the hands of the community and develop the project together. Interested enthusiasts have been given the opportunity to independently enhance the functionality of Cardboard and add support for new configurations of mobile device screens. Meanwhile, Google intends to continue participating in the overall development and provide the project with new capabilities, such as components to support the Unity game engine.
Source: opennet.ru
