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

    • 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 Studio

    • Version and Copyright
    • Installation and Activation
    • Software Interface
    • File Operations
    • Project Processing
    • Tools
    • 2D Drawing
    • Applications
    • Settings
    • Device Connection
  • 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
    • Version History
  • Plugin & SDK

    • Unreal

      • Introduction
      • Quick Start - Windows
      • Quick Start - Linux
      • Quick Start - Quest3
      • Editions and Licensing
      • Rendering
      • 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
      • API Reference

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

        • 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

ULCCComponent: LCC Pipeline Component

Component specific to the LCC1 pipeline, inheriting ULCCComponentBase. On top of the base class capabilities it adds ray tests based on splat positions, plus seam cutting.

ModuleLCC4UnrealRuntime
HeaderLCCComponent.h
Parent classULCCComponentBase
Held byALCCActor
#include "LCCComponent.h"

Get the instance:

ULCCComponent* Comp = Cast<ULCCComponent>(LCCActor->GetLCCComponent());

Properties

PropertyTypeDefaultDescription
bEnableSeamCuttingboolfalseEnables seam cutting manually, see Seam Cutting. LCC file version 5.0 and above needs no manual activation and enables it automatically
LCCPerformanceFLCCRenderInfo—LCC1-specific performance parameters, see the table below

MetaInfo (of type FLCCMetaInfo) is a protected member, not accessible from outside on the C++ side and only visible to Blueprint (read-only in the Details panel). In C++ use GetMetaInfo() on the base class to read the basic fields.

LCCPerformance

Also in the form of a checkbox plus a value, using the default from the project settings while the checkbox is off.

FieldTypeDefaultCheckboxDescription
SortFactorfloat1bCanSetSortFactorSort frequency scale factor, from 0.2 to 5, see Sort Factor
bAddExtraPreNodesbooltruebEnableExtraPreNodesAdds extra preload nodes, see Add Extra Preload Nodes
ULCCComponent* Comp = Cast<ULCCComponent>(LCCActor->GetLCCComponent());
if (Comp)
{
    // sort less often to save performance
    Comp->LCCPerformance.bCanSetSortFactor = true;
    Comp->LCCPerformance.SortFactor = 2.0f;

    // head turns are fast in VR, add preload nodes
    Comp->LCCPerformance.bEnableExtraPreNodes = true;
    Comp->LCCPerformance.bAddExtraPreNodes = true;
}

Methods

GetUseSeamCut

bool GetUseSeamCut() const;

Whether the shader has seam cutting enabled. Returns true when either condition holds: the LCC file version is 5.0 or above, or bEnableSeamCutting was enabled manually. C++ only.

Multi-Viewport

The multi-viewport interfaces are declared on the base class ULCCComponentBase but only take effect on the LCC1 pipeline. SetPlayerLoadMode, SetPlayerRenderMode, SetSceneCaptureLoadMode, SetSceneCaptureRenderMode, ModifyPlayerTransform, and CancelModifyPlayerTransform are only meaningful when called on a ULCCComponent.

The reason is that the per-view rendering strategy and node scheduling are consumed by the LCC1 rendering path, and LCC2 is not wired up yet. Calling them on ULCC2Component (including ALCC2Actor and .sog / .spz / .ply) raises no error but does not produce the expected result.

Differentiated rendering such as high quality in the main viewport and low quality in a minimap, or preloading before a teleport, currently requires LCC1 data.

Raycast

⚠️ This group of interfaces is not sufficiently tested and may not work as expected. In production, use the "enable collision plus engine ray test" approach instead: load the collision data with SetLCCCollisionEnable first, then test with engine interfaces such as LineTraceByChannel. See Collision for details.

LCC1 provides four ray test functions targeting splat positions. The test target is the point cloud data itself and no collision file is required.

The four functions fall into two groups, differing along two dimensions:

Single hitMultiple hits
Default radius (10 cm)LineTraceSingleLineTraceMulti
Custom radiusLineTraceSingleWithRadiusLineTraceMultiWithRadius

Debug parameters shared by all four:

ParameterTypeDescription
Startconst FVector&Ray start, in world coordinates
Endconst FVector&Ray end, in world coordinates
bDrawDebugLineboolWhether to draw the debug line
DurationfloatDebug line duration, in seconds
ThicknessfloatDebug line thickness

Note: these four functions are protected on the C++ side and can be called as nodes directly on the Blueprint side. In C++ use them inside a subclass of ULCCComponent, or switch to the ray tests provided by the engine.

Recommendation

Prefer collision bodies plus engine ray tests. From v0.6.0 on, once the data carries a collision file and collision is enabled, LineTraceByChannel returns a complete FHitResult (normal, material, hit component, and more), works seamlessly with the engine physics, AI, and navigation systems, and that path is thoroughly validated.

The dedicated interfaces here are only worth considering in the following cases, and require thorough testing of your own:

  • The data has no collision file and switching to data with collision is not possible.
  • The node information of the hit point is required (FLCCSplat::NodeVector gives X, Y, and Level).

LineTraceSingle

UFUNCTION(BlueprintCallable, Category = "XGrids|Raycast")
bool LineTraceSingle(const FVector& Start, const FVector& End, FLCCSplat& OutHit,
                     bool bDrawDebugLine, float Duration, float Thickness) const;

Single ray test, returning the nearest hit point. The test radius is fixed at 10 cm.

ParameterTypeDescription
OutHitFLCCSplat&Output hit information, containing the world position Location and the node information NodeVector

Returns bool: true on a hit.

// inside a subclass of ULCCComponent
void UMyLCCComponent::PickFromCamera(const FVector& CamLocation, const FVector& CamForward)
{
    const FVector Start = CamLocation;
    const FVector End = Start + CamForward * 10000.f;

    FLCCSplat Hit;
    if (LineTraceSingle(Start, End, Hit, true, 2.0f, 2.0f))
    {
        UE_LOG(LogTemp, Log, TEXT("Hit at %s, node %s"),
            *Hit.Location.ToString(), *Hit.NodeVector.ToString());
    }
}

Blueprint as text, picking with a mouse click:

[Input Action: Pick]
        │ Pressed
        ▼
[Get Player Camera Manager] ──▶ [Get Camera Location]  → Start
                            └─▶ [Get Actor Forward Vector]
                                        │
                                        ▼
                                [Multiply] (× 10000)
                                        │
                                        ▼
                                [Add] (Start + previous step) → End
        │
        ▼
[Line Trace Single]
        Target = (LCC Component)
        Start = Start
        End = End
        Draw Debug Line = true
        Duration = 2.0
        Thickness = 2.0
        │ Return Value ──┐
        ▼                │
[Branch] ◀───────────────┘
        │ True
        ▼
[Break LCCSplat]  ← wired to Out Hit
        Location → used to place a marker

LineTraceSingleWithRadius

UFUNCTION(BlueprintCallable, Category = "XGrids|Raycast")
bool LineTraceSingleWithRadius(const FVector& Start, const FVector& End, float Radius,
                               FLCCSplat& OutHit, bool bDrawDebugLine,
                               float Duration, float Thickness) const;

Single ray test with a configurable test radius.

ParameterTypeDescription
RadiusfloatTest radius, in centimeters

Usage notes:

  • A point cloud is discrete, and a radius that is too small easily passes through the gaps between points, so nothing is hit even while pointing straight at an object. Increase the radius in that case.
  • A larger radius hits more easily but lowers precision, and the returned point may deviate from the position actually intended.
  • Start from 20~50 cm for sparse data; 5~10 cm is enough for dense data.
FLCCSplat Hit;
// large radius for a sparse point cloud, raising the hit rate
if (LineTraceSingleWithRadius(Start, End, 30.0f, Hit, false, 0.f, 0.f))
{
    SpawnMarkerAt(Hit.Location);
}

LineTraceMulti

UFUNCTION(BlueprintCallable, Category = "XGrids|Raycast")
bool LineTraceMulti(const FVector& Start, const FVector& End,
                    bool bDrawDebugLine, float Duration, float Thickness,
                    TArray<FLCCSplat>& OutHits) const;

Multi ray test, returning every hit point along the path. The test radius is fixed at 10 cm.

ParameterTypeDescription
OutHitsTArray<FLCCSplat>&Output of every hit point

Usage notes:

  • Use it for penetrating tests, for example measuring how many layers of structure a line passes through, or doing cross-section analysis.
  • The number of hit points can be large, so avoid calling it every frame.
TArray<FLCCSplat> Hits;
if (LineTraceMulti(Start, End, true, 3.0f, 1.0f, Hits))
{
    UE_LOG(LogTemp, Log, TEXT("Passed through %d splats"), Hits.Num());

    for (const FLCCSplat& Hit : Hits)
    {
        DrawDebugPoint(GetWorld(), Hit.Location, 8.f, FColor::Yellow, false, 3.f);
    }
}

LineTraceMultiWithRadius

UFUNCTION(BlueprintCallable, Category = "XGrids|Raycast")
bool LineTraceMultiWithRadius(const FVector& Start, const FVector& End, float Radius,
                              bool bDrawDebugLine, float Duration, float Thickness,
                              TArray<FLCCSplat>& OutHits) const;

Multi ray test with a configurable test radius. The parameters mean the same as above.

A larger radius increases the number of hit points noticeably, which suits statistical needs such as estimating the point density inside a cylindrical range.

FLCCSplat

USTRUCT(BlueprintType)
struct FLCCSplat
{
    FVector Location;         // world coordinates of the hit point
    FLCCVector NodeVector;    // node the hit point belongs to
};

The X, Y, and Level fields of FLCCVector locate the node in the octree. Level reflects the detail level currently loaded at that spot, which tells whether the data being looked at is fine or coarse.

For the complete fields see Structs.

See Also

  • ULCCComponentBase: common rendering and performance interfaces
  • ULCC2Component: the matching component of the LCC2 pipeline
  • Structs: fields of FLCCSplat, FLCCVector, and FLCCRenderInfo
Prev
ULCCComponentBase
Next
ULCC2Component