Enabling texture streaming and adding support for texture streaming to scene captures

This commit is contained in:
wattsavolt 2019-06-04 17:57:57 +02:00 committed by Néstor Subirón
parent 84c8f46595
commit b8295b4e03
4 changed files with 12 additions and 10 deletions

View File

@ -3,6 +3,7 @@
* Bugfix about recorder query system
* Fixed problem when vehicles enable autopilot after a replayer, now it works better.
* Vulkan support: Changed project settings to make vulkan default on linux and updated make script to allow user to select opengl
* Updated scene capture sensor to add it's camera as a view to unreal's texture streamer each tick to enable texture streaming
* Add ability to set motion blur settings for rgb camera in sensor python blueprint
* Improved visual quality of the screen capture for the rgb sensor
- Enabled Temporal AA for screen captures with no post-processing to prevent jaggies during motion

View File

@ -28,7 +28,7 @@ r.DefaultFeature.AmbientOcclusionStaticFraction=False
r.DefaultFeature.AutoExposure=False
r.CustomDepth=3
r.Streaming.PoolSize=2000
r.TextureStreaming=False
r.TextureStreaming=True
r.GenerateMeshDistanceFields=True
r.DistanceFieldBuild.EightBit=False
r.DistanceFieldBuild.Compress=False
@ -86,13 +86,4 @@ InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
[/Script/LinuxTargetPlatform.LinuxTargetSettings]
SpatializationPlugin=
ReverbPlugin=
OcclusionPlugin=
-TargetedRHIs=SF_VULKAN_SM5
-TargetedRHIs=GLSL_430
+TargetedRHIs=SF_VULKAN_SM5
+TargetedRHIs=GLSL_430

View File

@ -14,6 +14,7 @@
#include "Components/StaticMeshComponent.h"
#include "Engine/TextureRenderTarget2D.h"
#include "HighResScreenshot.h"
#include "ContentStreaming.h"
static auto SCENE_CAPTURE_COUNTER = 0u;
@ -174,6 +175,13 @@ void ASceneCaptureSensor::BeginPlay()
Super::BeginPlay();
}
void ASceneCaptureSensor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
// Add the view information every tick. Its only used for one tick and then removed by the streamer.
IStreamingManager::Get().AddViewInformation( DrawFrustum->GetComponentLocation(), ImageWidth, ImageWidth / FMath::Tan( CaptureComponent2D->FOVAngle ) );
}
void ASceneCaptureSensor::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);

View File

@ -117,6 +117,8 @@ protected:
virtual void BeginPlay() override;
virtual void Tick(float DeltaTime) override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void SetUpSceneCaptureComponent(USceneCaptureComponent2D &SceneCapture) {}