JMRSDK Development
v4.57
v4.57
  • Jio Mixed Reality SDK Documentation
    • Changelog
      • Upgrade Guide
    • Application Requirements
  • Device Information
    • JioGlass
    • JioDive
  • Supported Smartphones
  • Controller Specifications
    • Physical Controllers
    • External Gamepad
    • Virtual Controller
  • Getting Started
    • Development Platform
    • Setting Up Jio Mixed Reality Project in Unity
    • Video Tutorials
    • URP Support
      • Setting Up Your Project With URP
  • JMRSDK
    • JMRSDK Content
    • JMRMixedReality Prefab
    • System Dock
    • JMRRig
      • Local Rig
      • Setting Homepage (Quit functionality)
    • Webcast
  • Develop
    • Editor Emulator
    • JioGlass Controller Interactions
    • Cameras
    • Tesseract Mixed Reality UI Toolkits
    • In-app purchase
    • Examples
  • 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
      • IManipulationHandler
    • Controller Input Actions
      • Touchpad - Touch
      • Touchpad - Swipe
      • Source Buttons
      • Manipulation
    • Actions
    • Device State
      • JioDive Device State
      • JioGlass Device State
      • Controller Device State
  • 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
      • IPD Calibration
    • Licensing Journey In Android JioImmerse
    • Licensing Journey in iOS JioImmerse
  • Publish
    • Branding Guidelines
    • Signing your App
    • Publishing to Google Play Store
      • Play Store Upload Journey
    • Publishing to JioImmerse Developer Console
    • Publishing to Apple Store
    • 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
  • Forcing skybox mode in your application
  1. Develop

Cameras

PreviousJioGlass Controller InteractionsNextTesseract Mixed Reality UI Toolkits

Last updated 4 months 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

In the unity editor skybox is enabled by default.

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

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

Virtual Controller has the functionality to turn the skybox on and off by changing the camera Clear Flags.

Forcing skybox mode in your application

You can force the cameras to render in skybox mode by changing the camera clear flags on the OnEnable event after 1-2 frames delay.

Users can still revert to Clear flags - Solid Color by toggling VR mode in Virtual Controller.

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.