JMRSDK Development
v4.38
v4.38
  • Jio Mixed Reality SDK Documentation
    • Changelog 4.38
      • Upgrade Guide 4.38
    • Application Requirements
  • Device Information
    • JioGlass
    • JioDive
  • Supported Smartphones
  • Controller Specifications
    • Physical Controllers
    • External Gamepad
    • 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
    • Video Tutorials
  • Interaction
    • Gaze Interaction
      • Gaze and Click
      • Gaze and Dwell
    • Interaction
      • Pointer Manager
        • Examples
      • Active Input Source
    • Interfaces
      • IFocusable
      • ISelectHandler
      • ISelectClickHandler
      • IBackHandler
      • IHomeHandler
      • IMenuHandler
      • IFn1Handler
      • IFn2Handler
      • ITouchHandler
      • ISwipeHandler
      • IVoiceHandler
      • IManipulationHandler
    • Controller Input Actions
      • Touchpad - Touch
      • Touchpad - Swipe
      • Source Buttons
      • Manipulation
    • Actions
    • Device State
      • JioDive Device State
      • JioGlass Device State
      • Controller Device State
  • 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
    • Running your application
      • JioImmerse App For Jio Mixed Reality (JMR) Devices
      • Running the application on Prism (Holoboard)
    • IPD Calibration
  • Publish
    • Branding Guidelines
    • Licensing Journey In Android JioImmerse
    • Signing your App
    • Publishing to Google Play Store
      • Play Store Upload Journey
    • Publishing to JioImmerse Developer Console
    • Publishing to Apple Store
    • Licensing Journey in iOS JioImmerse
    • iOS Deep linking
  • 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
      • FAQs - iOS
    • 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 1 year 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.