Skip to main content

Panorama Viewer

Description

The PanoramaViewer demo app demonstrates how a 360-degree image can be utilized to create a teleportation experience in VR. This app introduces the use of visual assets like pictures and offers insights into adjusting properties within the rendering engine.

Image: Screenshot of Panorama Viewer Quest app

The demo creates a large-radius rendering sphere object in the createTexturedSphere() function. A 360-degree texture is then applied from the inside. By default, the sphere (and texture) would not be visible from the inside due to default geometry visibility settings. This visibility issue is easily rectified by appending a PrimitiveAttribute to the sphere's attribute set.

Before the texture can be utilized, it must be transferred from the application's asset container to a temporary directory associated with the application. This transfer is facilitated by Ocean's ResourceManager for Android.

Building

The following instructions are for macOS but can be easily converted to other host operating systems. First, ensure that the

have been completed. And that the third-party libraries have been built according to these instructions.

Then run the following steps:

# Define environment variables required for Android and Quest apps as per setup instructions above:
# ANDROID_HOME, ANDROID_NDK, ANDROID_NDK_VERSION, JAVA_HOME, and OVRPlatformSDK_ROOT

# Adjust this to your location of the third-party libraries
export OCEAN_THIRDPARTY_PATH="${HOME}/install_ocean_thirdparty"

cd ${OCEAN_DEVELOPMENT_PATH}/build/gradle/application/ocean/demo/platform/meta/quest/openxr/panoramaviewer/quest

./gradlew assemble

# Install debug build of the app
adb install app/build/outputs/apk/debug/app-debug.apk

# Install release build of the app
adb install app/build/outputs/apk/release/app-release.apk

Features

  • 360-Degree Image Utilization: Uses a panoramic image to create immersive VR experiences.
  • Asset Introduction: Introduces the use of external assets like images in VR applications.

Application Potential

  • Tourism and Real Estate: Ideal for applications in tourism, real estate, and other fields where immersive visualization is beneficial.