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

LCCManager: Core Manager

The core manager of the LCC Unity SDK, responsible for managing all Renderer instances, cameras, global rendering state, as well as edit operations (clipping / highlighting / tone), decal projection, snapping and interaction queries (raycast / collision). There should be only one LCCManager instance in the whole scene.

NamespaceLCCCore
Base classMonoBehaviour

LCCManager has no public properties; all functionality is accessed through methods. The methods are grouped by purpose:

  • Initialization and Configuration
  • Runtime Rendering Control
  • Lighting and Shadows
  • Camera Management
  • Clipping / Highlighting / Tone
  • Decal Projection
  • Snapping
  • Raycasting and Collision Queries
  • Visual Effects
  • Instance Queries

Initialization and Configuration

The following methods are used to complete the pre-configuration of platform, render mode, capacity and so on before loading data. Most methods must be called before any Renderer.Load().

SetPlatformType

public void SetPlatformType(PlatformType _type)

Sets the SDK's target runtime platform, which affects the internal rendering strategy and resource allocation.

ParameterTypeDescription
_typePlatformTypeTarget platform; see PlatformType

Notes:

  • Must be executed before any GetRender() call.

Example:

lccManager.SetPlatformType(PlatformType.PC);

SwitchRenderPass

public void SwitchRenderPass(ActiveRenderMode _mode)

Sets the global rendering architecture mode. MultiRender uses a shared GPU buffer and can render up to 255 Renderers simultaneously; SingleRender lets the SDK automatically select the rendering path based on the data size.

ParameterTypeDescription
_modeActiveRenderModeRender mode; see ActiveRenderMode

Notes:

  • Must be called before any Renderer.Load().
  • Only effective on PC / Mac platforms; mobile / VR platforms automatically adopt an adaptive strategy, and calling this method is rejected.
  • The MultiRender mode does not support HTTP data sources; use SingleRender for HTTP data.
  • Once any Renderer completes Load(), the mode is locked and cannot be switched again.

Example:

lccManager.SwitchRenderPass(ActiveRenderMode.MultiRender);

GetRender (Overload 1: Bind Transform)

// Return value: Renderer, null on failure
public Renderer GetRender(Transform _transform)

Creates a new rendering instance and binds it to the specified Transform. After creation, Renderer.Load() must be called to load data.

ParameterTypeDescription
_transformTransformThe Transform to which the rendering instance is attached

Notes:

  • SetPlatformType() and SetMainCamera() must be called first.
  • Up to 255 Renderers are supported in MultiRender mode.

Example:

var go = new GameObject("LCCScene");
var renderer = lccManager.GetRender(go.transform);
renderer.Load(filePath, null, () => Debug.Log("Loaded"));

GetRender (Overload 2: Create GameObject Automatically)

// Return value: Renderer, null on failure
public Renderer GetRender(out GameObject gameObject)

Automatically creates a GameObject named LCCRenderer and binds the rendering instance to its Transform.

ParameterTypeDescription
gameObjectout GameObjectOutputs the automatically created GameObject, null on failure

Example:

var renderer = lccManager.GetRender(out GameObject go);
renderer.Load(filePath, null, () => Debug.Log("Loaded"));

SetMaxBufferSplat

public void SetMaxBufferSplat(int _count)

Sets the maximum capacity of the GPU buffer (Splat count). Allocated once and cannot be changed dynamically.

ParameterTypeDescription
_countintMaximum Splat count, unit: ten thousand (value × 10000 = actual count)

Notes:

  • Must be called before any Renderer.Load(), and SetPlatformType() must be called first.
  • Larger capacity means higher video memory usage; set it as needed.
  • Platform limits: PC / Mac / PCVR 45 million, Android / iOS 6 million, VR (Pico / Quest / PicoSwan / AVP / OpenXR) 2 million.
  • Defaults: PC / Mac 30 million, Android / iOS 3 million, VR 1 million.

Example:

lccManager.SetMaxBufferSplat(3000); // 30 million points

SetFullRenderSplat

public void SetFullRenderSplat(int _count)

Sets the upper threshold for PC / Mac full rendering. When the data size is below this value, the full rendering path is used; otherwise the chunked rendering path is used.

ParameterTypeDescription
_countintFull rendering upper limit, unit: ten thousand, range [100, 4500]

Notes:

  • Supported only on PC / Mac / PCVR platforms.
  • Must be called before any Renderer.Load(), and SetPlatformType() must be called first.

Example:

lccManager.SetFullRenderSplat(2500); // 25 million points

SetMaxRenderSplats

public void SetMaxRenderSplats(int _count)

Sets the maximum number of Splats rendered per frame at runtime. Can be called dynamically after Load().

ParameterTypeDescription
_countintMaximum number of Splats rendered at runtime, unit: ten thousand

Notes:

  • Can be adjusted dynamically at runtime.
  • Cannot exceed the capacity set by SetMaxBufferSplat(); it is auto-clamped when exceeded.
  • No effect in full rendering mode.

Example:

lccManager.SetMaxRenderSplats(2500); // 25 million points

GetLoadRatio

// Return value: float, [0,1] current data loading progress
public float GetLoadRatio()

Queries the loading progress of the current scene data.

Notes:

  • Always returns 1.0 in full rendering mode.
  • In chunked rendering mode, returns the ratio of loaded nodes under the current view; the value changes in real time with camera movement and is not a monotonically increasing overall progress.

Example:

float ratio = lccManager.GetLoadRatio();
progressBar.value = ratio;

SetSelectionMode

public void SetSelectionMode(SelectionMode mode)

Sets the node selection strategy.

ParameterTypeDescription
modeSelectionModeSelection strategy; see SelectionMode

Notes:

  • Auto (default): decided automatically based on the overall bounding box of the scene; when the scene's maximum dimension exceeds about 380 meters, it automatically upgrades to Large.
  • Normal: suitable for small and medium scenes.
  • Large: suitable for very large scenes (over 1000 meters).
  • Takes effect immediately when switched.

Example:

lccManager.SetSelectionMode(SelectionMode.Auto);

Runtime Rendering Control

The following methods can be called dynamically at runtime to adjust rendering precision, display effects and rendering toggles.

SetDetailLevel

public void SetDetailLevel(float sse)

Sets the rendering precision level. A larger value means finer rendering and higher performance consumption.

ParameterTypeDescription
ssefloatPrecision level, range [1, 100], auto-clamped when exceeded

Notes:

  • Uses logarithmic mapping: changes are sensitive in the low-value range and smooth in the high-value range.
  • Can be adjusted dynamically at runtime.
  • Only takes effect in Normal selection mode.

Example:

lccManager.SetDetailLevel(50f); // Medium precision

SetStartLod

public void SetStartLod(int lod)

Sets the LOD expansion starting point (0-based). 0 is the finest, and a larger number means a coarser level.

ParameterTypeDescription
lodintLOD starting level, range [0, 10], auto-clamped when exceeded

Notes:

  • The actual effective upper limit is constrained by the total number of data levels.

Example:

lccManager.SetStartLod(0);

SetAutoFov

public void SetAutoFov(bool _auto)

Sets whether to automatically manage the rendering FOV. When enabled (default), the SDK locks a pixel focal length baseline at the first frame, then inverts the vertical FOV from the current viewport height each frame and writes it back to Camera.fieldOfView; when disabled, fieldOfView is controlled externally (SetFOV() or directly changing the camera).

ParameterTypeDescription
_autoboolWhether to use auto FOV

Notes:

  • Enabled by default.
  • When enabled, it continuously rewrites the main camera's Camera.fieldOfView, so calling SetFOV() is ignored.
  • When disabled, SetFOV() must be called manually to set parameters.

Example:

lccManager.SetAutoFov(true);

SetFOV

public void SetFOV(int _width, int _height, float _verticalFov, float _aspect)

Manually sets the vertical FOV (in degrees). Directly rewrites the main camera's Camera.fieldOfView so that the FOV in the Inspector matches the FOV actually used for rendering. _width / _height / _aspect are legacy signature parameters; the actual projection uses the main camera's own viewport (use SetRecordMode() for offscreen output with a different size / FOV).

ParameterTypeDescription
_widthintPixel width
_heightintPixel height
_verticalFovfloatVertical FOV (degrees)
_aspectfloatAspect ratio

Notes:

  • SetAutoFov(false) must be called first, otherwise the per-frame auto-FOV inversion overwrites the manual value.
  • Vertical FOV is clamped to [1, 179] degrees.
  • Calling it on VR / PCVR platforms, during recording, or under an orthographic camera is rejected (warns and returns).

Example:

lccManager.SetFOV(1920, 1080, 60f, 1.778f);

SetRenderEnable

public void SetRenderEnable(Renderer _renderer, bool _isEnable)

Controls the rendering toggle of the specified Renderer at runtime. When disabled, it does not participate in traversal and drawing.

ParameterTypeDescription
_rendererRendererTarget rendering instance
_isEnableboolWhether to enable rendering

Example:

lccManager.SetRenderEnable(renderer, false); // Hide

SetEnvironment

public void SetEnvironment(Renderer _renderer, bool _isRender)

Controls the environment data rendering of the specified Renderer. Environment data is a low-precision background point cloud used to fill distant views.

ParameterTypeDescription
_rendererRendererTarget rendering instance
_isRenderboolWhether to render environment data

Notes:

  • The data must contain environment nodes.

Example:

lccManager.SetEnvironment(renderer, true);

SetZDepth

public void SetZDepth(bool zwrite)

Toggles Z depth write and adjusts the render queue accordingly.

ParameterTypeDescription
zwriteboolWhether to enable Z depth write

Example:

lccManager.SetZDepth(true);

SetAlpha

public void SetAlpha(float alpha)

Sets the global opacity.

ParameterTypeDescription
alphafloatGlobal opacity, range [0, 1], auto-clamped when exceeded

Example:

lccManager.SetAlpha(0.8f);

SetLightIntensity

public void SetLightIntensity(float intensity)

Sets the global light intensity.

ParameterTypeDescription
intensityfloatLight intensity, range [0, 1], auto-clamped when exceeded

Example:

lccManager.SetLightIntensity(0.7f);

SetLowPassFilter

public void SetLowPassFilter(float _filter)

Sets the global low-pass filter strength, used to suppress high-frequency aliasing / noise.

ParameterTypeDescription
_filterfloatLow-pass filter strength, range [0, 1], auto-clamped when exceeded

Example:

lccManager.SetLowPassFilter(0.3f);

SetLockFPS

public void SetLockFPS(bool _isLock)

Toggles frame rate locking (static / dynamic frame rate switching).

ParameterTypeDescription
_isLockboolWhether to lock the frame rate

Example:

lccManager.SetLockFPS(true);

SetRenderLayer

public void SetRenderLayer(int _layer)

Sets the Unity Layer used by LCC rendering, for camera CullingMask visibility control.

ParameterTypeDescription
_layerintUnity rendering layer, range [0, 31]

Notes:

  • Can be adjusted dynamically at runtime.

Example:

lccManager.SetRenderLayer(8); // Use Layer 8

SetForceRefresh

public void SetForceRefresh()

Forces a rendering refresh. Clears the internal camera info cache so that the frustum, LOD and other parameters are recalculated on the next frame. Suitable for cases where externally changed camera parameters need to take effect immediately.

Example:

lccManager.SetForceRefresh();

SetMipMode

public void SetMipMode(MipMode _mipMode)

Switches the Mip rendering mode. Mip mode uses mipmap sampling (default), and Non_Mip mode disables mipmap.

ParameterTypeDescription
_mipModeMipModeTarget mode; see MipMode

Notes:

  • Returns immediately if the current mode is the same as the passed mode.
  • Takes effect immediately when switched.

Example:

lccManager.SetMipMode(MipMode.Non_Mip);

SetGraphicsAPI

public void SetGraphicsAPI(GraphicsDeviceType type)

Sets the graphics API type. HDR is enabled in DX11 mode.

ParameterTypeDescription
typeGraphicsDeviceTypeGraphics API type (Unity built-in enum)

Example:

lccManager.SetGraphicsAPI(GraphicsDeviceType.Direct3D11);

SetDebugMode

public void SetDebugMode(bool debug)

Toggles debug mode.

ParameterTypeDescription
debugboolWhether to enable debug mode

Notes:

  • Supported only on PC / Mac platforms.

Example:

lccManager.SetDebugMode(true);

SetEditorMode

public void SetEditorMode(bool _isEditor)

Toggles Editor mode.

ParameterTypeDescription
_isEditorboolWhether to enable Editor mode

Notes:

  • Supported only on PC / Mac platforms.

Example:

lccManager.SetEditorMode(true);

SetAECMode

public void SetAECMode(bool _aec)

Toggles AEC (Architecture / Engineering / Construction) mode.

ParameterTypeDescription
_aecboolWhether to enable AEC mode

Notes:

  • Supported only on PC / Mac platforms.

Example:

lccManager.SetAECMode(true);

SetSemantic

// Return value: bool, false=invalid parameter
public bool SetSemantic(bool enable, Vector4[] color = null)

Toggles semantic rendering mode. When enabled, a color array can be passed to define the display color of each semantic category.

ParameterTypeDescription
enableboolWhether to enable semantic rendering
colorVector4[]Semantic color array, length must be 100, otherwise false is returned; pass null to use default colors

Example:

Vector4[] colors = new Vector4[100];
colors[0] = new Vector4(1, 0, 0, 1); // Category 0 = red
lccManager.SetSemantic(true, colors);

SwitchRenderMode

public void SwitchRenderMode(RenderMode mode, Texture2D tex = null)

Switches between point cloud rendering and 3DGS rendering. An elevation color ramp texture can be provided in point cloud mode.

ParameterTypeDescription
modeRenderModeRendering mode; see RenderMode
texTexture2DElevation color ramp texture (optional)

Notes:

  • Supported only on PC / Mac platforms.

Example:

lccManager.SwitchRenderMode(RenderMode.PointCloud, elevationTex);

SetRecordMode

public void SetRecordMode(bool isRecord, Vector2 renderSize, float verticalFov)

Sets recording mode. In recording mode, a fixed resolution and FOV are used for rendering, suitable for HD video recording.

ParameterTypeDescription
isRecordboolWhether to use recording mode
renderSizeVector2Recording resolution
verticalFovfloatVertical FOV (degrees)

Notes:

  • Supported only on PC / Mac platforms.
  • In recording mode, the camera focal length is fixed and does not change with the Camera component.
  • After recording, call SetRecordMode(false, ...) to restore.

Example:

lccManager.SetRecordMode(true, new Vector2(3840, 2160), 60f);

SetVRPerformance

public void SetVRPerformance(bool _enabled)

Sets the VR high-performance sorting mode. true uses GPU radix sorting (GpuSorter), and false falls back to CPU / BitonicSorter.

ParameterTypeDescription
_enabledboolWhether to enable GPU high-performance sorting

Notes:

  • Only affects the sorting path of VR headsets (Pico / Quest / PicoSwan / OpenXR); enabled by default.
  • When there is no compute device (such as Mali), the sorting upstream automatically falls back to CPU, unaffected by this toggle.

Example:

lccManager.SetVRPerformance(true);

Lighting and Shadows

The following methods control shadow reception and custom point lights on 3DGS surfaces. Shadow-related methods must be called after the LCC scene finishes loading.

SetShadowReceive

public void SetShadowReceive(bool enable)

Toggles point cloud shadow reception. When enabled, shadows from Mesh objects in the scene can be cast onto 3DGS point cloud surfaces.

ParameterTypeDescription
enableboolWhether to receive shadows

Notes:

  • Disabled by default.
  • Requires Mesh objects that cast shadows and a Directional Light in the scene.

Example:

lccManager.SetShadowReceive(true);

SetShadowColor

public void SetShadowColor(Color color)

Sets the color of the shadow area.

ParameterTypeDescription
colorColorShadow color (RGBA)

Notes:

  • Default (0.3, 0.3, 0.3, 1).
  • SetShadowReceive(true) must be enabled first.

Example:

lccManager.SetShadowColor(new Color(0.3f, 0.3f, 0.3f, 1f));

SetShadowStrength

public void SetShadowStrength(float strength)

Sets the shadow strength. 0 is no shadow, 1 is the strongest shadow.

ParameterTypeDescription
strengthfloatShadow strength, range [0, 1], auto-clamped when exceeded

Notes:

  • Default 1.0.
  • SetShadowReceive(true) must be enabled first.

Example:

lccManager.SetShadowStrength(0.8f);

SetLights

// Return value: int, 0=success, -1=exceeded the maximum count limit
public int SetLights(List<PointLightData> lights)

Sets the custom point light list. Passing null or an empty list turns off custom lighting.

ParameterTypeDescription
lightsList<PointLightData>Point light list; see PointLightData

Notes:

  • PointLightData.lightType: 0 is a point light (direction / spotAngle ignored), 1 is a spot light (direction / spotAngle required).
  • Passing null or an empty list turns off custom lighting.

Example:

using Unity.Mathematics; // float3

var lights = new List<PointLightData>();
lights.Add(new PointLightData {
    position = new float3(0, 5, 0),
    lightType = 0,              // 0=point light, 1=spot light
    color = new float3(1, 1, 1),
    intensity = 2f,
    range = 10f
});
lccManager.SetLights(lights);

Camera Management

SetMainCamera

public void SetMainCamera(Camera _cam)

Sets the main rendering camera. LCC uses this camera for frustum culling, LOD selection, sorting and other operations.

ParameterTypeDescription
_camCameraMain rendering camera; pass null to clear

Notes:

  • Must be set before Renderer.Load().
  • Supported only on PC / Mac platforms.

Example:

lccManager.SetMainCamera(Camera.main);

AddCamera

public void AddCamera(Camera _cam)

Adds a secondary camera. The secondary camera participates in rendering but does not affect LOD selection.

ParameterTypeDescription
_camCameraSecondary camera

Notes:

  • Supported only on PC / Mac platforms.
  • The main camera cannot be added as a secondary camera.

Example:

lccManager.AddCamera(secondCamera);

RemoveCamera

public void RemoveCamera(Camera _cam)

Removes an added secondary camera.

ParameterTypeDescription
_camCameraThe secondary camera to remove

Notes:

  • Supported only on PC / Mac platforms.

Example:

lccManager.RemoveCamera(secondCamera);

Clipping / Highlighting / Tone

Clipping, highlighting and tone are three kinds of edit operations, all of which support defining the affected region via 2D texture, 3D geometry or a mix of both. See Data2D, Data3D, DataMix and ToneMix.

SetClip (Plane Clipping)

// Return value: int, 0=success
public int SetClip(Vector3 planePoint, Vector3 planeNormal, bool inside = true)

Clips the point cloud with an infinite plane, keeping points on the normal side or the opposite side.

ParameterTypeDescription
planePointVector3A point on the plane
planeNormalVector3Plane normal
insidebooltrue keeps the normal side

Notes:

  • Mutually exclusive with other clipping modes.

Example:

lccManager.SetClip(Vector3.zero, Vector3.up, true); // Keep above the ground

SetClip (2D Texture Clipping)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count
public int SetClip(List<Data2D> _2Ds)

Clips the point cloud using a 2D projected texture mask.

ParameterTypeDescription
_2DsList<Data2D>2D texture selection list

Example:

var clips = new List<Data2D>();
clips.Add(new Data2D {
    texture = maskTex,
    mv = modelViewMatrix,
    mvp = mvpMatrix,
    mode = SelectMode.normal
});
lccManager.SetClip(clips);

SetClip (3D Geometry Clipping)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count, 3=zero valid geometry
public int SetClip(List<Data3D> _3Ds)

Clips the point cloud with 3D geometry, supporting boolean operations to combine multiple geometries.

ParameterTypeDescription
_3DsList<Data3D>3D geometry list

Notes:

  • At least one geometry with operation == normal is required.

Example:

var clips = new List<Data3D>();
clips.Add(new Data3D {
    type = ShapeType.box,
    invMat = boxInverseMatrix,
    operation = OperationMode.normal,
    mode = SelectMode.normal
});
lccManager.SetClip(clips);

SetClip (Mixed-mode Clipping)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count
public int SetClip(List<DataMix> mix)

Defines the clipping region with a mix of 2D textures and 3D geometries. Each entry specifies its type via editType.

ParameterTypeDescription
mixList<DataMix>Mixed selection list (2D + 3D)

Example:

var mix = new List<DataMix>();
mix.Add(new DataMix {
    editType = EditType.Edit3D,
    type = ShapeType.box,
    invMat = matrix,
    operation = OperationMode.normal,
    mode = SelectMode.normal
});
lccManager.SetClip(mix);

QuitClipMode

public void QuitClipMode()

Exits clipping mode and restores the full point cloud display.

Example:

lccManager.QuitClipMode();

SetHighlight (2D Texture Highlighting)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count
public int SetHighlight(List<Data2D> _2Ds)

Highlights the point cloud using a 2D projected texture mask; the point cloud outside the highlighted region is dimmed.

ParameterTypeDescription
_2DsList<Data2D>2D texture selection list

Notes:

  • Mutually exclusive with 3D highlighting and mixed highlighting.

Example:

var highlights = new List<Data2D>();
highlights.Add(new Data2D {
    texture = maskTex,
    mv = modelViewMatrix,
    mvp = mvpMatrix,
    mode = SelectMode.normal
});
lccManager.SetHighlight(highlights);

SetHighlight (3D Geometry Highlighting)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count, 3=zero valid geometry
public int SetHighlight(List<Data3D> _3Ds)

Defines the highlighted region with 3D geometry, supporting boolean operations to combine.

ParameterTypeDescription
_3DsList<Data3D>3D geometry list

Notes:

  • At least one geometry with operation == normal is required.

Example:

var highlights = new List<Data3D>();
highlights.Add(new Data3D {
    type = ShapeType.box,
    invMat = boxInverseMatrix,
    operation = OperationMode.normal,
    mode = SelectMode.normal
});
lccManager.SetHighlight(highlights);

SetHighlight (Mixed-mode Highlighting)

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count
public int SetHighlight(List<DataMix> mix)

Defines the highlighted region with a mix of 2D textures and 3D geometries.

ParameterTypeDescription
mixList<DataMix>Mixed selection list

Example:

var mix = new List<DataMix>();
mix.Add(new DataMix {
    editType = EditType.Edit3D,
    type = ShapeType.box,
    invMat = matrix,
    operation = OperationMode.normal,
    mode = SelectMode.normal
});
lccManager.SetHighlight(mix);

QuitHighlightMode

public void QuitHighlightMode()

Exits highlighting mode and restores the normal point cloud display.

Example:

lccManager.QuitHighlightMode();

SetTone

// Return value: int, 0=success, 1=empty list, 2=exceeded the maximum count
public int SetTone(List<ToneMix> mix)

Applies tone adjustment to the selected region, supporting brightness, saturation, contrast and LUT filters. The tone region can be defined by 2D texture or 3D geometry.

ParameterTypeDescription
mixList<ToneMix>Tone mix list

Notes:

  • brightness / saturation / contrast default to 1.0.
  • lutid is the LUT filter index; 0 means not used.

Example:

var tones = new List<ToneMix>();
tones.Add(new ToneMix {
    editType = EditType.Edit3D,
    type = ShapeType.box,
    invMat = boxMatrix,
    operation = OperationMode.normal,
    mode = SelectMode.normal,
    brightness = 1.2f,
    saturation = 1.0f,
    contrast = 1.1f,
    lutid = 0
});
lccManager.SetTone(tones);

QuitToneMode

public void QuitToneMode()

Exits tone mode and restores the original point cloud color.

Example:

lccManager.QuitToneMode();

Decal Projection

Decal projection projects a texture onto 3DGS surfaces along the projector direction. The decal is world-fixed global state, consistent for all cameras. The typical workflow is: enable the decal → set the texture → set the projector pose. The following methods are supported only on PC / Mac platforms.

SetDecalEnabled

public void SetDecalEnabled(bool enable)

Toggles decal projection. SetDecalTexture() and SetDecalProjection() must be called separately to set the content and projector pose.

ParameterTypeDescription
enableboolWhether to enable decal projection

Notes:

  • Disabling does not clear the cached texture / parameters.

Example:

lccManager.SetDecalEnabled(true);
lccManager.SetDecalTexture(decalTex);
lccManager.SetDecalProjection(projectorPos, projectorRot, 60f, 1.778f, 0.1f, 20f);

SetDecalTexture

public void SetDecalTexture(Texture2D tex)

Sets the decal texture. RGB is the color, and A is the decal's own mask, which is multiplied with the global opacity and edge feathering.

ParameterTypeDescription
texTexture2DDecal texture; passing null clears the reference

Example:

lccManager.SetDecalTexture(logoTex);

SetDecalProjection

public void SetDecalProjection(Vector3 pos, Quaternion rot, float fov, float aspect, float near, float far)

Sets the pose and perspective parameters of the decal projector. The projector projects along its forward (+Z) direction, and points inside the frustum are covered by the decal.

ParameterTypeDescription
posVector3Projector world position
rotQuaternionProjector orientation
fovfloatVertical FOV (degrees), clamped to [1, 179]
aspectfloatAspect ratio, minimum 1e-4
nearfloatNear clipping plane, minimum 1e-3
farfloatFar clipping plane, minimum near + 1e-3

Example:

lccManager.SetDecalProjection(new Vector3(0, 10, 0), Quaternion.Euler(90, 0, 0), 60f, 1.778f, 0.1f, 20f);

SetDecalOpacity

public void SetDecalOpacity(float opacity)

Sets the overall opacity of the decal.

ParameterTypeDescription
opacityfloatOverall decal opacity, range [0, 1], auto-clamped when exceeded

Example:

lccManager.SetDecalOpacity(0.8f);

SetDecalEdgeFade

public void SetDecalEdgeFade(float edgeFade)

Sets the decal edge feathering width. 0 is a hard edge, and a larger value makes the edge transition softer.

ParameterTypeDescription
edgeFadefloatEdge feathering width (UV space ratio), range [0, 0.5), auto-clamped when exceeded

Example:

lccManager.SetDecalEdgeFade(0.1f);

SetDecalOcclusion

public void SetDecalOcclusion(bool enable)

Toggles decal occlusion culling (based on the projector depth map). When enabled, occluded surfaces are not covered by the decal.

ParameterTypeDescription
enableboolWhether to enable decal occlusion culling

Notes:

  • PC / Mac platform only, and URP pipeline only.
  • SetDecalProjection() should have been called to set the projector before enabling.
  • Depends on the quality parameters configured by SetDecalOcclusionSettings().

Example:

lccManager.SetDecalOcclusion(true);

SetDecalOcclusionSettings

public void SetDecalOcclusionSettings(DecalOcclusionSettings settings)

Sets all quality parameters of decal occlusion culling at once. See DecalOcclusionSettings.

ParameterTypeDescription
settingsDecalOcclusionSettingsOcclusion culling quality parameters

Notes:

  • Can be adjusted at any time; parameters take effect immediately.

Example:

lccManager.SetDecalOcclusionSettings(DecalOcclusionSettings.Default);
lccManager.SetDecalOcclusionSettings(new DecalOcclusionSettings {
    opacityCutoff = 0.1f,
    depthBias = 0.05f,
    footprintMaxPx = 2,
    resolution = 1024
});

Snapping

The snapping feature automatically searches for nearby edges / corners to align during raycasting, and is commonly used for precise interaction such as measurement and annotation. The following methods are supported only on PC / Mac platforms.

SetSnapEnabled

public void SetSnapEnabled(bool enable)

Toggles the snapping feature. When enabled, RaycastWithSnap() automatically searches for nearby edges / corners to snap to.

ParameterTypeDescription
enableboolWhether to enable snapping

Notes:

  • Disabled by default.
  • No effect on mobile / VR, and a warning is output.

Example:

lccManager.SetSnapEnabled(true);

SetSnapRadius

public void SetSnapRadius(float pixels)

Sets the snapping search radius. Searches for the nearest edge / corner within this pixel range.

ParameterTypeDescription
pixelsfloatSnapping search radius (pixels)

Notes:

  • Default 20 pixels.
  • A larger value means a wider search range, but may snap to unintended targets.

Example:

lccManager.SetSnapRadius(30f);

SetEdgeThreshold

public void SetEdgeThreshold(float threshold)

Sets the edge detection threshold. A smaller value detects more edges.

ParameterTypeDescription
thresholdfloatEdge detection threshold, recommended range [0.1, 0.8]

Notes:

  • Default 0.3.
  • A value too small produces a large amount of noise edges.

Example:

lccManager.SetEdgeThreshold(0.2f);

SetSnapPreviewEnabled

public void SetSnapPreviewEnabled(bool enable)

Toggles the snap preview feature. When enabled, the nearest snap target indicator is displayed in real time as the mouse moves.

ParameterTypeDescription
enableboolWhether to enable snap preview

Notes:

  • SetSnapEnabled(true) must be called first.
  • Preview continuously consumes GPU resources (detection every frame).

Example:

lccManager.SetSnapPreviewEnabled(true);

UpdateSnapPreview

public void UpdateSnapPreview(Vector2 mousePos, Camera cam)

Updates the snap preview state. Called as the mouse moves to update the preview indicator position.

ParameterTypeDescription
mousePosVector2Current mouse screen coordinates
camCameraCamera

Notes:

  • SetSnapPreviewEnabled(true) must be called first.
  • Recommended to call continuously in Update.

Example:

void Update()
{
    lccManager.UpdateSnapPreview(Input.mousePosition, Camera.main);
}

GetSnapPreviewState

// Return value: SnapPreviewState
public SnapPreviewState GetSnapPreviewState()

Gets the current snap preview state, including whether there is a snap target, the target type, the target screen position and the pixel distance to the mouse. See SnapPreviewState.

Notes:

  • SetSnapPreviewEnabled(true) and UpdateSnapPreview() must be called first.
  • Returns default(SnapPreviewState) when there is no target.
  • screenPos is in screen coordinates, not world coordinates; use RaycastWithSnap() to get HitResult.hitPos for world coordinates.

Example:

var state = lccManager.GetSnapPreviewState();
if (state.hasTarget)
{
    // state.snapType: Corner / Edge
    // state.screenPos: screen coordinates of the snap target
    // state.distanceToMouse: pixel distance
}

Raycasting and Collision Queries

Raycasting is used to pick points on 3DGS surfaces, and collision queries are used for physical interaction between characters / objects and the point cloud. The hit result is returned via HitResult.

Note:

The hit point world coordinate field of HitResult is named hitPos (not position).

Raycast (Screen Coordinates)

// Return value: bool, true=hit
public bool Raycast(Vector3 mousePos, out HitResult _finalResult)

Emits a ray from screen coordinates to detect point cloud hits. The ray is generated using the main camera set by SetMainCamera().

ParameterTypeDescription
mousePosVector3Screen coordinates
_finalResultout HitResultHit result

Notes:

  • SetMainCamera() must be called first to set the main camera.
  • Returns the hit point closest to the camera.
  • Precision is affected by SetRaycastDelta(), and the maximum distance is controlled by SetMaxRaycastDistance().

Example:

if (lccManager.Raycast(Input.mousePosition, out HitResult hit))
{
    Debug.Log(hit.hitPos);
}

Raycast (Ray)

// Return value: bool, true=hit
public bool Raycast(Ray _ray, out HitResult _finalResult)

Performs raycasting with a custom Ray, iterating over all active Renderers and returning the closest hit.

ParameterTypeDescription
_rayRayRay
_finalResultout HitResultHit result

Example:

Ray ray = new Ray(origin, direction);
if (lccManager.Raycast(ray, out HitResult hit))
{
    Debug.Log(hit.hitPos);
}

RaycastMesh (Screen Coordinates)

// Return value: bool, true=hit
public bool RaycastMesh(Vector3 mousePos, out HitResult _finalResult, float _distance = 70.0f)

Emits a ray from screen coordinates to detect hits against the point cloud collision mesh. Uses Collider data for detection, which is faster than Raycast() but less precise.

ParameterTypeDescription
mousePosVector3Screen coordinates
_finalResultout HitResultHit result
_distancefloatMaximum detection distance, default 70.0

Notes:

  • The data must contain Collider nodes, and Renderer.SetColliderEnable(true) must be called first.

Example:

if (lccManager.RaycastMesh(Input.mousePosition, out HitResult hit))
{
    Debug.Log(hit.hitPos);
}

RaycastMesh (Ray + Bounds)

// Return value: bool, true=hit
public bool RaycastMesh(Ray ray, out HitResult result, out Bounds hitBounds, float maxDist = 70.0f)

Performs collision mesh detection with a custom Ray, returning the bounding box of the hit node as well.

ParameterTypeDescription
rayRayRay
resultout HitResultHit result
hitBoundsout BoundsBounding box of the hit node
maxDistfloatMaximum detection distance, default 70.0

Notes:

  • The data must contain Collider nodes.

Example:

Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (lccManager.RaycastMesh(ray, out HitResult hit, out Bounds bounds))
{
    Debug.Log(bounds.center);
}

RaycastWithSnap

// Return value: bool, true=hit
public bool RaycastWithSnap(Vector2 screenPos, Camera cam, out HitResult result)

Raycasting with snapping. First performs a normal raycast, then searches for edges / corners near the hit point to snap to.

ParameterTypeDescription
screenPosVector2Screen coordinates
camCameraCamera
resultout HitResultHit result (including snap info)

Notes:

  • SetSnapEnabled(true) must be called first.
  • PC / Mac platforms only; not available on mobile / VR.
  • Snap priority: Corner > Edge > None.
  • HitResult.snapType is the snap type, HitResult.hitPos is the world coordinate after snapping, and HitResult.originalHitPos is the original hit point before snapping.

Example:

if (lccManager.RaycastWithSnap(mousePos, cam, out HitResult hit))
{
    // hit.snapType: Corner / Edge / None
    // hit.hitPos: world coordinate after snapping
    // hit.originalHitPos: original hit point before snapping
}

SetRaycastDelta

public void SetRaycastDelta(float delta)

Sets the precision parameter of raycasting. A smaller value means higher precision but higher performance consumption.

ParameterTypeDescription
deltafloatRaycasting precision, range [0.1, 10.0], auto-clamped when exceeded

Notes:

  • Default 0.1.
  • Affects the detection precision of all Raycast() methods.

Example:

lccManager.SetRaycastDelta(0.5f);

SetMaxRaycastDistance

public void SetMaxRaycastDistance(float _distance)

Sets the maximum detection distance of the Raycast() methods.

ParameterTypeDescription
_distancefloatMaximum raycast distance, range [10, 10000], auto-clamped when exceeded

Notes:

  • Affects the Raycast(Vector3) / Raycast(Ray) overloads; does not affect RaycastMesh() (which has its own distance parameter).

Example:

lccManager.SetMaxRaycastDistance(500f);

IntersectsSphere

// Return value: bool, true=intersects
public bool IntersectsSphere(Sphere sphere)

// Return value: bool, true=intersects
public bool IntersectsSphere(Sphere sphere, out Vector3 delta)

Detects whether a sphere intersects the point cloud collider. The second overload additionally returns the penetration vector, which can be used for physical pushing out.

ParameterTypeDescription
sphereSphereSphere
deltaout Vector3Penetration vector (push-out direction and distance)

Notes:

  • The data must contain Collider nodes, and Renderer.SetColliderEnable(true) must be called first.
  • Iterates over all active Renderers.

Example:

var sphere = new Sphere(transform.position, 0.5f);
if (lccManager.IntersectsSphere(sphere, out Vector3 delta))
{
    transform.position += delta;
}

IntersectsCapsule

// Return value: bool, true=intersects
public bool IntersectsCapsule(Capsule capsule)

// Return value: bool, true=intersects
public bool IntersectsCapsule(Capsule capsule, out Vector3 delta)

Detects whether a capsule intersects the point cloud collider, commonly used for character controller collision detection. The second overload returns the penetration vector.

ParameterTypeDescription
capsuleCapsuleCapsule
deltaout Vector3Penetration vector

Notes:

  • The data must contain Collider nodes, and Renderer.SetColliderEnable(true) must be called first.

Example:

var capsule = new Capsule(footPos, headPos, 0.3f);
if (lccManager.IntersectsCapsule(capsule, out Vector3 delta))
{
    characterController.Move(delta);
}

Visual Effects

TriggerVFX

public void TriggerVFX(Vector3 vfxOriginW, int vfxid = 0)

Triggers a visual effect at the specified world coordinate, spreading outward from that coordinate.

ParameterTypeDescription
vfxOriginWVector3World coordinate origin of the effect
vfxidintEffect ID, default 0

Notes:

  • Must be called after the LCC scene finishes loading.

Example:

lccManager.TriggerVFX(hitPoint, 0);

Instance Queries

GetAllRenderers

// Return value: List<Renderer>, a copy of all registered Renderer instances
public List<Renderer> GetAllRenderers()

Gets the list of all currently registered Renderer instances (returns a copy).

Example:

var renderers = lccManager.GetAllRenderers();
foreach (var r in renderers) { /* ... */ }