XGRIDSDocs
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • Polski
  • Nederlands
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • Polski
  • Nederlands
  • Lixel PortalCam Series

    • PortalCam P1

      • Product Overview
      • Basic Operation
      • Using the LCC Scan App
      • Maintenance and Care
      • FAQ
  • Lixel K Series

    • Lixel K1

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
    • Lixel K2

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
  • Lixel L Series

    • Lixel L2 Pro

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Measure Point
      • Appendix
      • FAQ
    • Lixel L3

      • Product Overview
      • Basic Device Functions
      • Device Activation and Connection
      • Data Capture
      • Capturing Absolute Coordinates
      • Appendix
  • Accessories

    • Stick Light

      • Installation Guide
      • Basic Operation
      • FAQ
  • Lixel Studio

    • Version and Copyright
    • Installation and Activation
    • Software Interface
    • File Operations
    • Project Processing
    • Tools
    • 2D Drawing
    • Applications
    • Settings
    • Device Connection
    • FAQ
  • Lixel CyberColor

    • LCC Studio

      • Getting Started
      • Version and Updates
      • Download and Installation
      • Interface Overview and Navigation
      • Before Reconstruction
      • Model Reconstruction
      • Single Model Reconstruction
      • Map Fusion
      • Aerial-Ground Fusion
      • Aerial Reconstruction
      • My Models
      • Other Features
      • Settings and Account
      • Converter
      • Video Reconstruction
      • FAQ
    • LCC Scene Editor

      • Version & Updates
      • Account & Login
      • Product Overview & Home
      • Editor Interface
      • Scene Navigation Modes
      • File
      • Settings
      • Edit Operations
      • Window
      • Global Toolbar
      • Assets & Properties
      • Left Toolbar
      • Viewpoints
      • Portal
      • Skybox
      • Annotations
      • Measurement
      • Flythrough
      • Scene Report
      • 3D Layout
      • Mini-Map
      • Preview Mode (Viewer)
      • Help
      • FAQ
      • Spawn Point
    • LCC Model Editor

      • Version and Updates
      • User Guide
      • Overview and Interface
      • File Operations
      • Selectors
      • Editing Models
      • Measurement
      • Color Grading
      • Asset Management
      • Settings and Help
      • FAQ
    • Capture Guide

      • Overview
      • Capture Devices Overview
      • General Capture Principles
      • Indoor Scene Capture
      • Outdoor Scene Capture
      • Large-Scale Capture (Map Fusion)
      • Aerial-Ground Map Fusion Capture
      • Object Capture
      • People Capture
      • Video Reconstruction Capture
      • HD Enhancement
      • Control Points (Lixel P1)
      • FAQ and Troubleshooting
    • LCC Studio Linux

      • Product Overview
      • Architecture Guide
      • Installation and Deployment Guide
      • Container Startup Parameters Guide
      • CodeMeter Offline Licensing Deployment Guide
      • API Reference
      • Appendix - Developer Data Guide
      • Appendix - Error Code List
      • Single-Machine Multi-GPU Cluster Deployment QuickStart
    • Best Practices

      • Merging Multiple Large 3DGS Models
    • Version History
  • Plugin & SDK

    • Unreal

      • Introduction
      • Quick Start - Windows
      • Quick Start - Linux
      • Quick Start - Quest3
      • Editions and Licensing
      • Rendering
      • Tiled Rasterization (Experimental)
      • Visual Settings
      • Normals and Lighting
      • Scene Editing
      • Performance Parameters
      • Performance Guide
      • Third-party and Engine Plugin Integration
      • Proxy Mesh
      • Loading Animation
      • Collision
      • Navigation System Support
      • Single Layer Water Support
      • Localization
      • FAQ
      • Troubleshooting
      • Logging and Diagnostics
      • Contact Us
      • Best Practices

        • Relighting 3DGS with a LixelStudio Mesh
      • API Reference

        • ALCCActorBase
        • ULCCComponentBase
        • ULCCComponent
        • ULCC2Component
        • SOG / SPZ / PLY Actors
        • ALCC2ProxyMesh
        • ALCCClippingVolume
        • ALCCSectionPlane
        • ALCCLoadVolume
        • ULCCUtilLibrary
        • Enums
        • Structs
      • Changelog

        • v3.4.0
        • v3.3.1
        • v3.0.0
        • v2.2.1
        • v1.0.0
        • v0.9.0
        • v0.8.0
        • v0.7.1
        • v0.6.1
        • v0.5.2
        • v0.4.1
        • v0.4.0
        • v0.3.0
        • v0.0.5
        • v0.0.4
        • v0.0.3
        • v0.0.2
        • v0.0.1
    • Unity

      • Unity SDK Introduction
      • Technical Features
      • Development Environment Requirements
      • PC Quick Start Guide
      • Project Settings Optimization Guide
      • Pico 4 Ultra Development Guide
      • Pico 4 Ultra PC Streaming Guide
      • Quest 3 Development Guide
      • Quest 3 PC Streaming Guide
      • OpenXR Development Guide
      • Pico 4 Ultra Business Streaming Guide
      • Glossary
      • FAQ
      • Contact Us
      • Feature Development Guide

        • Multi-Scene Mixed Rendering Development Guide
        • Shadow Receiving Development Guide
        • Real-Time Lighting Development Guide
        • Multi-Camera Rendering Development Guide
        • High-Resolution Image Rendering Development Guide
        • LCC and LCC2 Data Format Compatibility Development Guide
        • Loading Effect Development Guide
        • Mip Rendering Mode Switching Development Guide
        • Edge and Corner Snapping Development Guide
        • Projected Decal Development Guide
        • Video Projected Decal Development Guide
        • Highlight Development Guide
        • Real-Time Clipping Development Guide
        • Color Adjustment Development Guide
        • Getting Scene Mesh Data Development Guide
        • Editor Mode Development Guide
        • Render Performance Parameter Configuration Guide
        • Application and Data Co-packaging Development Guide
        • Collision System Development Guide
        • macOS Development Permission Issue Guide
        • iOS Device Compilation and Packaging Development Guide
      • API Reference

        • LCCManager
        • Renderer
        • Data Types
      • Changelog

        • v2.3.0
        • v2.2.10
        • v2.2.0
        • v2.1.19
        • v2.0.14
    • Web

      • Introduction
      • Rendering Performance Optimization Guide
      • Graphics Configuration
      • FAQ
      • API Reference

        • LCCRender::clearIndexDB
        • LCCRender::dispose
        • LCCRender::load
        • LCCRender::setCamera
        • LCCRender::unload
        • LCCRender::update
        • LCCObject::checkRenderNextFrame
        • LCCObject::clearRenderNextFrame
        • LCCObject::ecef2Prj
        • LCCObject::getBounds
        • LCCObject::getEnvInstancedMesh
        • LCCObject::getInstancedMesh
        • LCCObject::getLodInfos
        • LCCObject::getOriginPosition
        • LCCObject::getProjectionCoordinateSystemInfos
        • LCCObject::hasCollision
        • LCCObject::hasEnvironment
        • LCCObject::hasShcoef
        • LCCObject::intersectsCapsule
        • LCCObject::intersectsRayExt
        • LCCObject::intersectsRayFromOriginExt
        • LCCObject::intersectsSphere
        • LCCObject::lowerToBottom
        • LCCObject::prj2Ecef
        • LCCObject::raiseToTop
        • LCCObject::raycast
        • LCCObject::raycastFromOrigin
        • LCCObject::setAlpha
        • LCCObject::setClipBox
        • LCCObject::setClipPlane
        • LCCObject::setEndLod
        • LCCObject::setLodAutoLevelUp
        • LCCObject::setMaxDistance
        • LCCObject::setMaxNodeSplats
        • LCCObject::setMaxSplats
        • LCCObject::setOriginPosition
        • LCCObject::setPointsColor
        • LCCObject::setRenderState
        • LCCObject::setRotation
        • LCCObject::setScale
        • LCCObject::setSemantic
        • LCCObject::setSemanticColor
        • LCCObject::setSmooth
        • LCCObject::setStartLod
        • LCCObject::setTranslation
        • LCCObject::setVisible
        • LCCObject::togglePointsDisplayMode
        • LCCObject::useEnvironment
        • LCCObject::useShcoef
      • Changelog

        • v0.6.3
        • v0.6.2
        • v0.6.1
        • v0.6.0
        • v0.5.5
        • v0.5.4
        • v0.5.3
        • v0.5.2
        • v0.5.1
        • v0.5.0
        • v0.4.1
        • v0.4.0
        • v0.3.1
        • v0.3.0
        • v0.2.0
    • Lixel OpenAPI

      • Overview
      • Connection & Authentication
      • Message Model & Codec
      • Interface Catalog
      • Real-time Data
      • Project File Access
      • Error Codes
      • Python

        • Quick Start
        • Client Wrapper & Tools
        • FAQ
      • C++

        • Quick Start
        • Client & Examples
        • FAQ

High-Resolution Image Rendering Development Guide

The LCC Unity SDK supports high-resolution image rendering, that is, rendering scene images that exceed the display resolution. For example, when the display resolution is 1920×1080, the LCC Unity SDK can still render and generate images of 3840×2160 (4K), 2560×1440 (2K), 1920×1080 (1080p), 1280×720 (720P), and other resolutions. Once images of various resolutions are rendered, they can be used to produce high-definition images and high-definition videos. The following uses an example of rendering a 4K image and saving it as JPG to describe the complete steps for implementing high-resolution image rendering.

Step 1: Create the scene and GameObjects

Create a brand-new scene in Unity. Unity creates Main Camera and Directional Light by default.

Set up Main Camera

Select Main Camera in the Hierarchy window, and set its properties in the Inspector window as shown below.

Set the Main Camera properties

Set the Main Camera properties

Create LCCManager

Right-click an empty area in the Hierarchy window, select Create Empty from the pop-up menu to create an empty GameObject, name it LCCManager, normalize its Transform, and add the LCCManager script to it via Add Component.

Create the LCCManager GameObject and add the LCCManager script

Create the LCCManager GameObject and add the LCCManager script

Create LCCRenderer

Right-click an empty area in the Hierarchy window, select Create Empty to create an empty GameObject, name it LCCRenderer, and set its Transform to Rotation.x = -90 and Scale.x = -1.

Create LCCRenderer and set its Transform

Create LCCRenderer and set its Transform (Rotation.x = -90, Scale.x = -1)

Note:

The Transform settings of the LCCRenderer GameObject (Rotation.x = -90, Scale.x = -1) align it with the LCC data coordinate system. For details on coordinate system alignment, see "LCC Data Coordinate System" in Unity SDK Introduction.

Step 2: Write the high-resolution rendering script

Create a new C# script named HDRecord.cs with the following code:

using System.IO;
using System.Collections;
using LCCCore;
using UnityEngine;

public class HDRecord : MonoBehaviour
{
    public LCCManager m_manager;
    public string m_FilePath;
    public Camera m_camera;

    private LCCCore.Renderer m_renderer;

    private const int HD_WIDTH = 3840;
    private const int HD_HEIGHT = 2160;
    private const string OUTPUT_DIR = @"G:\output";

    void Start()
    {
        m_manager.SetPlatformType(PlatformType.PC);
        m_manager.SwitchRenderPass(ActiveRenderMode.SingleRender);

        if (m_camera == null)
            m_camera = Camera.main;

        m_manager.SetMainCamera(m_camera);

        Debug.Log("[HDRecord] Started, loading data...");
        m_renderer = m_manager.GetRender(this.transform);
        m_renderer.Load(m_FilePath, onProgress, onComplete);
    }

    private void onProgress(float _progress)
    {
        Debug.Log($"[HDRecord] Load progress: {_progress:P1}");
    }

    private void onComplete()
    {
        Debug.Log("[HDRecord] Load complete, enabling 4K record mode...");

        float verticalFov = m_camera.fieldOfView;
        m_manager.SetRecordMode(true, new Vector2(HD_WIDTH, HD_HEIGHT), verticalFov);
        StartCoroutine(CaptureFrame());
    }

    private IEnumerator CaptureFrame()
    {
        // Wait some time to ensure the camera has finished rendering the scene at 4K resolution
        yield return new WaitForSeconds(10);

        RenderTexture tempRT = RenderTexture.GetTemporary(HD_WIDTH, HD_HEIGHT, 24);
        RenderTexture preTarget = m_camera.targetTexture;
        Rect preRect = m_camera.rect;

        m_camera.targetTexture = tempRT;
        m_camera.rect = new Rect(0, 0, 1, 1);

        yield return new WaitForEndOfFrame();
        yield return new WaitForEndOfFrame();
        yield return new WaitForEndOfFrame();

        RenderTexture.active = tempRT;
        Texture2D tex = new Texture2D(HD_WIDTH, HD_HEIGHT, TextureFormat.RGB24, false);
        tex.ReadPixels(new Rect(0, 0, HD_WIDTH, HD_HEIGHT), 0, 0);
        tex.Apply();
        RenderTexture.active = null;

        m_camera.rect = preRect;
        m_camera.targetTexture = preTarget;
        RenderTexture.ReleaseTemporary(tempRT);

        byte[] jpgData = tex.EncodeToJPG(95);
        Destroy(tex);

        if (!Directory.Exists(OUTPUT_DIR))
            Directory.CreateDirectory(OUTPUT_DIR);

        string timestamp = System.DateTime.Now.ToString("yyyyMMdd_HHmmss");
        string filePath = Path.Combine(OUTPUT_DIR, $"HD4K_{timestamp}.jpg");
        File.WriteAllBytes(filePath, jpgData);

        Debug.Log($"[HDRecord] 4K image saved: {filePath} ({jpgData.Length / 1024}KB)");

        m_manager.SetRecordMode(false, new Vector2(Screen.width, Screen.height), m_camera.fieldOfView);
        Debug.Log("[HDRecord] Record mode disabled, restored normal rendering.");
    }
}

Note:

  • Recording mode must be enabled after the LCC scene finishes loading, so SetRecordMode(true, ...) is called in the onComplete callback.
  • After entering recording mode, the SDK renders at a fixed resolution and vertical FOV. It is recommended to wait a few frames/seconds before capturing the frame to ensure the scene has finished rendering at the target resolution.
  • After capturing, call SetRecordMode(false, ...) to restore normal rendering.
  • The script file name must match the class name (HDRecord.cs corresponds to class HDRecord), otherwise it cannot be attached to a GameObject.
  • HD_WIDTH and HD_HEIGHT in the example determine the output resolution and can be changed to 2K (2560×1440), 1080p (1920×1080), 720P (1280×720), and so on as needed; OUTPUT_DIR is the output directory — change it to a path where you have write permission.

Step 3: Attach the script and set properties

  1. Attach the HDRecord.cs script to the LCCManager GameObject in the Hierarchy window.
  2. In the Inspector window, drag the LCCManager GameObject onto the script's Manager property.
  3. Fill in the LCC file path in the script's File Path property.
  4. Other properties (such as Camera) can be configured freely; when left empty, the script automatically uses Camera.main.
Attach the HDRecord script and set its properties

Attach the HDRecord script and set its properties in the Inspector

Step 4: Run

Click the Play button in the Game window. After data finishes loading, the script enters 4K recording mode, captures one frame, and saves it as a JPG image to the output directory.

In this example, the image is rendered at 4K and then saved directly as a JPG image. If you want to save it as a high-definition video, you can encode the continuously captured high-resolution images into a high-definition video through video encoding.

Key Steps

The key steps for implementing high-resolution image rendering:

  1. Set the main rendering camera via SetMainCamera, and load the LCC data with Renderer.Load().
  2. After the scene finishes loading (in the onComplete callback), enter recording mode via SetRecordMode(true, renderSize, verticalFov) and specify the target resolution and vertical FOV.
  3. Render the camera to the target resolution via RenderTexture, read the pixels back with Texture2D.ReadPixels, and encode them into an image to save.
  4. After capturing, restore normal rendering via SetRecordMode(false, ...).

High-Resolution Image Rendering Notes

  • Only supported on PC/Mac. SetRecordMode is only effective on PC/Mac platforms.
  • The camera focal length is fixed in recording mode. After entering recording mode, the SDK renders with the fixed resolution and vertical FOV passed in, and no longer changes with the Camera component.
  • Restore normal rendering in time. After capturing or recording finishes, call SetRecordMode(false, ...) to restore the normal resolution; otherwise subsequent rendering will continue to use the recording resolution.
  • Watch video memory and memory overhead. The higher the resolution, the larger the video memory/memory occupied by RenderTexture and Texture2D. High-resolution rendering is recommended on high-performance computer devices.

Recording-related API

The LCC Unity SDK provides the recording-mode API through LCCManager. It must be called after the LCC scene finishes loading (that is, in the onComplete callback).

SetRecordMode

// Return value: void
public void SetRecordMode(bool isRecord, Vector2 renderSize, float verticalFov)

Sets the recording mode. In recording mode, rendering uses a fixed resolution and FOV, which is suitable for recording high-definition images and videos.

ParameterTypeDescription
isRecordboolWhether to enter recording mode
renderSizeVector2Recording resolution (width × height), such as (3840, 2160)
verticalFovfloatVertical FOV (field of view)

Usage example:

// Enter 4K recording mode
m_manager.SetRecordMode(true, new Vector2(3840, 2160), 60f);

// End recording and restore normal rendering
m_manager.SetRecordMode(false, new Vector2(Screen.width, Screen.height), m_camera.fieldOfView);

Notes:

  • Only supported on PC/Mac.
  • In recording mode the camera focal length is fixed and does not change with the Camera component.
  • After recording ends, call SetRecordMode(false, ...) to restore normal rendering.
  • Must be called after the LCC scene finishes loading.