😅
JMRSDK Development
v4.33
v4.33
  • Jio Mixed Reality SDK Documentation
    • Changelog 4.33.0
      • Upgrade Guide 4.33.0
    • Changelog 4.33.13
      • Upgrade Guide 4.33.13
  • Device Information
    • Supported Smartphones
  • Controller Specifications
    • Physical Controllers
    • Virtual Controller / Virtual Keyboard for JioGlass
  • Getting Started
    • Development Platform
    • Setting Up Jio Mixed Reality Project in Unity
    • URP Support
      • Setting Up Your Project With URP
      • Reverting Back to Built-In Render Pipeline
  • JMRSDK
    • JMRSDK Content
    • JMRMixedReality Prefab
    • System Dock
    • JMRRig
      • Local Rig
      • Setting Homepage (Quit functionality)
      • Recenter Application on Resume
  • Develop
    • Editor Emulator
    • JioGlass Controller Interactions
    • Cameras
    • Tesseract Mixed Reality UI Toolkits
    • Examples
  • Interaction
    • Gaze Interaction
      • Gaze and Click
      • Gaze and Dwell
    • Interaction
      • Pointer Manager
        • Examples
    • Interfaces
      • ISelectHandler
      • ISelectClickHandler
      • IFocusable
      • ISwipeHandler
      • ITouchHandler
      • IBackHandler
      • IHomeHandler
      • IMenuHandler
      • IVoiceHandler
      • IFn1Handler
      • IFn2Handler
      • IManipulationHandler
    • Controller Input Actions
      • Touchpad - Touch
      • Touchpad - Swipe
      • Source Buttons
      • Manipulation
    • Actions
    • Device State
      • Device Connected
      • Device Disconnected
      • Battery percentage update
      • Scanning for Device
      • Battery Percentage
  • Voice
    • Voice
      • Speech Events
      • Speech Result
      • Speech Error
      • Speech Session End
      • Speech Cancel
    • Listening
  • Tracking
    • Tracking
      • Coordinate System
    • Tracking Framework
      • TrackerManager Actions
        • Get Head Position
        • Get Head Rotation
        • Get Head Transform
      • TrackerManager Methods
        • Get Head Position
        • Get Head Rotation
        • Get Head Transform
    • Recenter
  • Building and Testing
    • Building to Target Device
      • Merging AndroidManifest
      • Performance Optimization
      • App optimization
    • JioImmerse App For Jio Mixed Reality (TMR) Devices
      • Running the application on Prism (Holoboard)
    • IPD Calibration
  • Publish
    • Licensing Journey
    • Signing App for App Store
    • Publishing to JioGlass Developer Console
    • Publishing to Google Play Store
      • Play Store Upload Journey
  • Capturing and Recording
    • Capture Videos and Screenshots
      • Capturing Screenshot/Videos using scrcpy
      • Capturing Screenshot/Videos using Vysor
  • Troubleshooting
    • FAQs - Develop
    • FAQs - Building to device
      • Gradle
      • Old aaptOptions error fix
    • FAQs - Running and Publishing
    • Laser Point Not Visible
Powered by GitBook
On this page
  • Rendering from cameras
  • Skybox
  • Adding skybox in AR devices
  1. Develop

Cameras

PreviousJioGlass Controller InteractionsNextTesseract Mixed Reality UI Toolkits

Last updated 2 years ago

There are 4 cameras in the JMRMixedReality prefab.

The head camera is tagged as the main camera and is disabled when running on target device, hence if you are using Camera.main in your application, it will return with a null reference exception.

Rendering from cameras

The head camera renders the application in 2d mono view in the unity editor.

Left and right cameras render the application in 3d stereo view on the target device.

POV camera is used for casting your application to other devices.

Skybox

Skybox is enabled by default in VR devices i.e., JioDive

Skybox is disabled by default in AR devices i.e., JioPrism, JioGlass Lite, and JioGlass Pro.

In the unity editor skybox is disabled by default.

Adding skybox in AR devices

You can add a skybox to AR devices i.e., JioPrism and JioGlass Lite by changing the camera clear flags on the OnEnable event after 1-2 frames delay.

public class SkyboxAddition : MonoBehaviour
{
    Camera head, left, right;

    private void Awake()
    {
        head = JMRRigManager.Instance.transform.Find("JMRRenderer/Head")?.GetComponent<Camera>();
        left = JMRRigManager.Instance.transform.Find("JMRRenderer/Head/Left")?.GetComponent<Camera>();
        right = JMRRigManager.Instance.transform.Find("JMRRenderer/Head/Right")?.GetComponent<Camera>();
    }

    private void OnEnable()
    {
        StartCoroutine(AddSkybox());
    }

    IEnumerator AddSkybox()
    {
        for (int i = 0; i < 2; i++) yield return null;
        head.clearFlags = left.clearFlags = right.clearFlags = CameraClearFlags.Skybox;
    }
}

Skybox can be used to render the sky. Skybox has other use cases as well as mentioned in .

unity's documentation
Mono View - Covers the entire screen - Usually rendered by the main *head* camera in unity editor.
Stereo View - Split into two views - Rendered by the *left* and *right* cameras.