Segmentation

GTSegmentationGeneratorComponent

Can generate segmentation for an image. You can assign components color by adding a filter color pair to the ComponentToColor map.

Will emit a JSON file containing the configured color mappings called “segmentation_info” in Saved/UnrealGT/{SessionName}/{Time}/{SegmentationGeneratorName}

Requires “Enabled with stencil” project setting in Engine > Rendering > Postprocessing > Custom-Depth Stencil Pass to be set

Note: Anti-Aliasing is disabled for segmentation generators by default!

Properties

Image

EGTImageFileFormat ImageFormat

The format the image will have, currently only .bmp and .png are supported.

FIntPoint Resolution

The resolution the generated images will have.

bool bRandomResolution

If enabled will choose a random resolution between Resolution and ResolutionMax for each captured image. This is useful for generating Training data.

FIntPoint ResolutionMax

The maximum Resolution to use if bRandomResolution is enabled.

bool bAntiAliasing

Perform anti aliasing when an image is rendered. Highly recommended for basic images, but might cause issues if used with segmentation or depth generators. Temporal Anti-Aliasing might cause “jittering” if the generator is not moving.

Projection

float FOVAngle

Camera field of view (in degrees).

Segmentation

TMap<FGTObjectFilter, FColor> ComponentToColor

Assigns a segmentation color to the component/mesh if it matches the corresponding filter.

bool bShouldApplyCloseMorph

This can improve segmentation quality for partially translucent meshes (e.g. Fences, Foliage…)

bool bColorEachComponentDifferent

bool bUseFilterForColorEachComponentDifferent

FGTObjectFilter ColorEachComponentDifferentFilter