Skip to content

Commit

Permalink
Improvements for feature extraction: depth
Browse files Browse the repository at this point in the history
Updated content, 16-bit depth, and capturer actor visibility behaviour.
  • Loading branch information
Sserpenthraxus-nv committed Aug 27, 2019
1 parent de83376 commit 544cc7a
Show file tree
Hide file tree
Showing 22 changed files with 58 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Source/Content/Map/Logic/TestCapturerLogic.umap
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

This file was deleted.

Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ bool CanPixelFormatBeExported(EPixelFormat CheckPixelFormat)
case EPixelFormat::PF_R32_UINT:
case EPixelFormat::PF_A16B16G16R16:
case EPixelFormat::PF_G32R32F:
case EPixelFormat::PF_G8:
case EPixelFormat::PF_G8:
case EPixelFormat::PF_R8G8:
case EPixelFormat::PF_R8_UINT:
case EPixelFormat::PF_R16F:
case EPixelFormat::PF_ShadowDepth:
Expand All @@ -72,10 +73,15 @@ bool GetExportedImageSettings(EPixelFormat ImgPixelFormat, uint8& ImageBitDepth,
{
ImgPixelFormat = PF_B8G8R8A8;
}
else if (ImgPixelFormat == PF_G32R32F)
{
ImgPixelFormat = PF_A16B16G16R16;
}
else if (ImgPixelFormat == PF_G32R32F)
{
ImgPixelFormat = PF_A16B16G16R16;
}
// Use the 16 bits grayscale format for R8G8
else if (ImgPixelFormat == PF_R8G8)
{
ImgPixelFormat = PF_R16_UINT;
}

ImageBitDepth = NVSceneCapturerUtils::GetBitCountPerChannel(ImgPixelFormat);
const uint8 ImgColorChannelCount = NVSceneCapturerUtils::GetColorChannelCount(ImgPixelFormat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ANVSceneCapturerActor::ANVSceneCapturerActor(const FObjectInitializer& ObjectIni
CollisionComponent->SetSphereRadius(20.f);
CollisionComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
CollisionComponent->SetCollisionResponseToAllChannels(ECR_Block);
CollisionComponent->SetCollisionResponseToChannel(ECollisionChannel::ECC_Visibility, ECR_Ignore);
RootComponent = CollisionComponent;

PrimaryActorTick.bCanEverTick = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ ETextureRenderTargetFormat ConvertCapturedFormatToRenderTargetFormat(ENVCaptured
{
case ENVCapturedPixelFormat::R8:
return ETextureRenderTargetFormat::RTF_R8;
case ENVCapturedPixelFormat::R16f:
return ETextureRenderTargetFormat::RTF_R16f;
case ENVCapturedPixelFormat::R8G8:
return ETextureRenderTargetFormat::RTF_RG8;
case ENVCapturedPixelFormat::R32f:
return ETextureRenderTargetFormat::RTF_R32f;
case ENVCapturedPixelFormat::RGBA8:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ enum ENVCapturedPixelFormat
/// Use this format for the normal full color image type
RGBA8,

/// R channel, 16 bit per channel floating point, range [-65504, 65504]
/// Use this format for the grayscale 16 bits image type
R16f,
/// RG channel, 8 bit per channel, range [65535]
/// Use this format for the grayscale 16 bits image type
R8G8,

/// R channel, 32 bit per channel floating point, range [-3.402823 x 10^38, 3.402823 x 10^38]
/// NOTE: This format capture to 32 bits floating point value and can be exported to RGBA8 format
Expand Down

0 comments on commit 544cc7a

Please sign in to comment.