Navigation
API > API/Plugins > API/Plugins/ModelingComponents
FSceneCapturePhotoSet creates a set of render captures for a given World and set of Actors, stored as a SpatialPhotoSet for each desired render buffer type. Currently the set of buffers are defined by ERenderCaptureType: BaseColor Roughness Metallic Specular PackedMRS (Metallic / Roughness / Specular) Emissive Opacity SubsurfaceColor WorldNormal DeviceDepth
There are various efficiences possible by doing these captures as a group, rather than doing each one individually.
One the capture set is computed, the ComputeSample() function can be used to call SpatialPhotoSet::ComputeSample() on each photo set, ie to estimate the value of the different channels at a given 3D position/normal by raycasting against the photo set. Again, it can be more efficient to do this on the group, rather than each individually.
| Name | FSceneCapturePhotoSet |
| Type | class |
| Header File | /Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Scene/SceneCapturePhotoSet.h |
| Include Path | #include "Scene/SceneCapturePhotoSet.h" |
Syntax
class FSceneCapturePhotoSet
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSceneCapturePhotoSet() |
Scene/SceneCapturePhotoSet.h |
Structs
| Name | Remarks |
|---|---|
| FSceneSample | FSceneSample stores a full sample of all possible channels, some values may be default-values though |
| FSceneSamples | FSceneSamples stores samples corresponding to pixels in the DeviceDepth photoset where the values are strictly within the viewing frustum, which corresponds to a camera ray intersecting an actor in VisibleActors. |
Enums
Public
| Name | Remarks |
|---|---|
| ECaptureTypeStatus | Status of a given capture type |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FStatus | TRenderCaptureTypeData< ECaptureTypeStatus > | Status of the overall scene capture i.e., the combined status of all capture types | Scene/SceneCapturePhotoSet.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Cancelled() |
Scene/SceneCapturePhotoSet.h | ||
void Compute () |
Render the configured scene, for the configured capture types from the configured viewpoints. | Scene/SceneCapturePhotoSet.h | |
bool ComputeSample
(
const FRenderCaptureTypeFlags& SampleChannels, |
Sample the requested SampleChannels from the available PhotoSets to determine values at the given 3D Position/Normal. | Scene/SceneCapturePhotoSet.h | |
bool ComputeSampleLocation
(
const FVector3d& Position, |
If ValidSampleDepthThreshold > 0 then the VisibilityFunction and the DeviceDepthPhotoSet will be used to determine sample validity. | Scene/SceneCapturePhotoSet.h | |
FVector4f ComputeSampleNearest
(
const int& PhotoIndex, |
Scene/SceneCapturePhotoSet.h | ||
void DisableAllCaptureTypes () |
Disable all capture types. | Scene/SceneCapturePhotoSet.h | |
const FSpatialPhotoSet3f & GetBaseColorPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
FRenderCaptureConfig GetCaptureConfig
(
ERenderCaptureType CaptureType |
Scene/SceneCapturePhotoSet.h | ||
UWorld * GetCaptureTargetWorld() |
Scene/SceneCapturePhotoSet.h | ||
ECaptureTypeStatus GetCaptureTypeStatus
(
ERenderCaptureType CaptureType |
Returns the current status of the given capture type | Scene/SceneCapturePhotoSet.h | |
const FSpatialPhotoSet1f & GetDeviceDepthPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet3f & GetEmissivePhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet1f & GetMetallicPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet1f & GetOpacityPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet3f & GetPackedMRSPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet1f & GetRoughnessPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
FStatus GetSceneCaptureStatus() |
Returns the current status of all capture types | Scene/SceneCapturePhotoSet.h | |
void GetSceneSamples
(
FSceneSamples& OutSamples |
Fills in the non-null arrays in OutSamples if the status of the needed captures is Computed | Scene/SceneCapturePhotoSet.h | |
const TArray< FSpatialPhotoParams > & GetSpatialPhotoParams() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet1f & GetSpecularPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet3f & GetSubsurfaceColorPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
const FSpatialPhotoSet3f & GetWorldNormalPhotoSet() |
Scene/SceneCapturePhotoSet.h | ||
void OptimizePhotoSets() |
Post-process the various PhotoSets after capture, to reduce memory usage and sampling cost. | Scene/SceneCapturePhotoSet.h | |
void SetAllowCancel
(
bool bAllowCancelIn |
Scene/SceneCapturePhotoSet.h | ||
void SetCaptureConfig
(
ERenderCaptureType CaptureType, |
Configure the given capture type If Config != the existing capture config the corresponding photo set will be cleared | Scene/SceneCapturePhotoSet.h | |
| Set the target World and set of Actors/Components If World != this->World or Actors != this->Actors all existing photo sets are cleared Note: The caller must ensure Actors does not contain nullptr | Scene/SceneCapturePhotoSet.h | ||
void SetCaptureSceneActorsAndComponents
(
UWorld* World, |
Scene/SceneCapturePhotoSet.h | ||
void SetCaptureSceneComponents
(
UWorld* World, |
Scene/SceneCapturePhotoSet.h | ||
void SetCaptureTypeEnabled
(
ERenderCaptureType CaptureType, |
Enable/Disable a particular capture type If bEnabled == false the corresponding photo set will be cleared | Scene/SceneCapturePhotoSet.h | |
void SetEnableVisibilityByUnregisterMode
(
bool bEnable |
If enabled, any Component Scene Proxies in the level that are not meant to be included in the capture (ie not added via SetCaptureSceneActors), will be unregistered to hide them. | Scene/SceneCapturePhotoSet.h | |
void SetEnableWriteDebugImages
(
bool bEnable, |
Enable debug image writing. | Scene/SceneCapturePhotoSet.h | |
void SetSpatialPhotoParams
(
const TArray< FSpatialPhotoParams >& SpatialParams |
Set the parameters positioning the virtual cameras used to capture the photo sets If SpatialParams != this->PhotoSetParams all existing photo sets are cleared (TODO clear on a more granular level) | Scene/SceneCapturePhotoSet.h |