CARLA
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
Sensor
SceneCaptureCamera_RayTracedLensDistance.h
Go to the documentation of this file.
1
// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#pragma once
8
9
#include "
Carla/Actor/ActorDefinition.h
"
10
#include "
Carla/Sensor/SceneCaptureCamera_RayTracedLens.h
"
11
12
#include "SceneCaptureCamera_RayTracedLensDistance.generated.h"
13
14
/// A path-traced distance sensor ("sensor.camera.rt_lens_distance"): the
15
/// geometric twin of sensor.camera.rt_lens.
16
///
17
/// It renders through exactly the same lens as ASceneCaptureCamera_RayTracedLens
18
/// -- same attributes, same Set(), same show_only_* filtering, evaluated per ray
19
/// inside the path tracer -- but instead of radiance it outputs, for every
20
/// pixel, the EUCLIDEAN distance from the camera origin to the primary hit,
21
/// measured along that pixel's (possibly heavily distorted) lens ray. That is
22
/// the only depth quantity that is well defined for a fisheye: the view-space Z
23
/// a pinhole depth sensor reports collapses to zero at 90 degrees off axis, and
24
/// warping a pinhole depth image into the lens can only cover the part of the
25
/// frame the pinhole frustum reached (~95% for the NuRec f-theta rigs).
26
///
27
/// The value comes from a real path-tracer AOV, not from post-processing the
28
/// colour image: the ray generation shader records the primary hit distance
29
/// into a dedicated R32F render-graph texture next to the existing
30
/// albedo/normal/depth AOVs (FPostProcessSettings::PathTracingLensAOV ->
31
/// FPathTracingData::LensAOV, see Engine/Shaders/Private/PathTracing/
32
/// PathTracingCore.ush), and the capture resolves that texture directly through
33
/// the ESceneCaptureSource::SCS_PathTracingLensDistance capture source. Nothing
34
/// on that route applies exposure, tone mapping, denoising or quantization, and
35
/// the primary ray is fired through the exact pixel centre, so the output is
36
/// deterministic metric data rather than an image.
37
///
38
/// Wire format: one float32 per pixel, in METRES, row major (see
39
/// carla::sensor::data::DistanceImage on the client). Pixels whose ray hit
40
/// nothing report a very large distance (see PATH_TRACER_LENS_AOV_SKY_DISTANCE).
41
UCLASS()
42
class CARLA_API
ASceneCaptureCamera_RayTracedLensDistance
: public
ASceneCaptureCamera_RayTracedLens
43
{
44
GENERATED_BODY()
45
46
public
:
47
48
static
FActorDefinition
GetSensorDefinition();
49
50
ASceneCaptureCamera_RayTracedLensDistance
(
const
FObjectInitializer &ObjectInitializer);
51
52
void
Set(
const
FActorDescription
&ActorDescription)
override
;
53
54
protected
:
55
56
void
BeginPlay()
override
;
57
58
void
PostPhysTick(UWorld *World, ELevelTick TickType,
float
DeltaSeconds)
override
;
59
60
private
:
61
62
/// Re-asserts everything that makes this capture a geometry AOV rather than a
63
/// colour render. Called from Set() and from every tick, because several code
64
/// paths replace the capture component's PostProcessSettings wholesale (see
65
/// the note in ASceneCaptureCamera_RayTracedLens::PostPhysTick).
66
void
ApplyDistanceAOVConfig();
67
};
SceneCaptureCamera_RayTracedLens.h
ActorDefinition.h
ASceneCaptureCamera_RayTracedLensDistance
A path-traced distance sensor ("sensor.camera.rt_lens_distance"): the geometric twin of sensor....
Definition
SceneCaptureCamera_RayTracedLensDistance.h:43
ASceneCaptureCamera_RayTracedLens
A path-traced camera sensor ("sensor.camera.rt_lens") that renders through a configurable lens model ...
Definition
SceneCaptureCamera_RayTracedLens.h:34
FActorDefinition
A definition of a Carla Actor with all the variation and attributes.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorDefinition.h:20
FActorDescription
A description of a Carla Actor with all its variation.
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorDescription.h:21
Generated by
1.9.8