OpenEXR sequence

New feature of saving OpenEXR is really a good step towards Architectural visualization side of UnrealEngine , thanks for that !

I wonder now if it is possible to save a sequence ? Like i have a matinee camera movement for 10 seconds , is it possible to save sequence of OpenEXR files with specific framerate ?

Thanks.

nope , not yet …

dont suppose you found a solution for this yet?

I am trying to figure out same thing and I was able to modify the source code where its handling the matinee sequences with OpenEXR code but number of frames doesn’t match up.

You can try modifying the source code where its handling the matinee sequences and replace or add TakeHighScreenShot function. You can look into “ProcessScreenShot” function inside “GameViewportClient.cpp” file.

You can also looked into this functions :
GetHighResScreenshotConfig().bDumpBufferVisualizationTargets = true;
GetHighResScreenshotConfig().SetHDRCapture(true);
ConsoleCommand(TEXT(“HighResShot 3840x2160”));

Thanks,

Thanks for that , though my knowledge of C++ is almost 0 :frowning: There is no way to get it work without changing source code of UE ?

As far as I know, there is no solution through editor. I tried calling it in blueprint using Tick function but it didn’t gave me same number of frames as it should.

Thanks,

It will be cool to get even with offset as that can be easily corrected in Nuke or any other post soft

Would love to see your code :slight_smile:

Are you saying that you can get all the EXR layers out, but with offset frames?

This is what I did, Go to GameViewportClient.cpp and add this lines above “ScreenshotCapturedDelegate.Broadcast” inside ProcessScreenShots function,

GetHighResScreenshotConfig().bDumpBufferVisualizationTargets = true; GetHighResScreenshotConfig().SetHDRCapture(true);
ConsoleCommand(TEXT(“HighResShot 3840x2160”));

Here is the whole function code:

void UGameViewportClient::ProcessScreenShots(FViewport* InViewport)
{
	if (GIsDumpingMovie || FScreenshotRequest::IsScreenshotRequested() || GIsHighResScreenshot)
	{
		TArray<FColor> Bitmap;

		TSharedPtr<SWindow> WindowPtr = GetWindow();
		if (!GIsDumpingMovie && (FScreenshotRequest::ShouldShowUI() && WindowPtr.IsValid()))
		{
			TSharedRef<SWindow> WindowRef = WindowPtr.ToSharedRef();
			FSlateApplication::Get().ForceRedrawWindow(WindowRef);
		}

		if (GetViewportScreenShot(InViewport, Bitmap))
		{
			if (ScreenshotCapturedDelegate.IsBound())
			{
				// To Render OpenEXR Image Sequences
				GetHighResScreenshotConfig().bDumpBufferVisualizationTargets = true;
				GetHighResScreenshotConfig().SetHDRCapture(true);
				ConsoleCommand(TEXT("HighResShot 3840x2160"));
				//----------------------------------------------
				ScreenshotCapturedDelegate.Broadcast(InViewport->GetSizeXY().X, InViewport->GetSizeXY().Y, Bitmap);
			}
			else
			{
				FString ScreenShotName = FScreenshotRequest::GetFilename();
				if (GIsDumpingMovie && ScreenShotName.IsEmpty())
				{
					// Request a new screenshot with a formatted name
					FScreenshotRequest::RequestScreenshot(false);
					ScreenShotName = FScreenshotRequest::GetFilename();
				}

				if (PNGScreenshotCapturedDelegate.IsBound() && FPaths::GetExtension(ScreenShotName).ToLower() == TEXT("png"))
				{
					PNGScreenshotCapturedDelegate.Execute(InViewport->GetSizeXY().X, InViewport->GetSizeXY().Y, Bitmap, ScreenShotName);
				}
				else
				{
					// Save the contents of the array to a bitmap file.
					bool bWriteAlpha = false;
					FIntRect SourceRect(0, 0, GScreenshotResolutionX, GScreenshotResolutionY);
					if (GIsHighResScreenshot)
					{
						bWriteAlpha = GetHighResScreenshotConfig().MergeMaskIntoAlpha(Bitmap);
						SourceRect = GetHighResScreenshotConfig().CaptureRegion;
					}
					FFileHelper::CreateBitmap(*ScreenShotName, InViewport->GetSizeXY().X, InViewport->GetSizeXY().Y, Bitmap.GetTypedData(), &SourceRect, &IFileManager::Get(), NULL, bWriteAlpha);
				}
			}
		}

		FScreenshotRequest::Reset();
		// Reeanble screen messages - if we are NOT capturing a movie
		GAreScreenMessagesEnabled = GScreenMessagesRestoreState;
	}
}

Its kinda hack right now. I am trying to find a better solution.
Hope this helps.

Thanks,

Yeah, I see…

That’s really helpful to see, thank you for that :slight_smile:

I was trying to do a direct call to InViewport->TakeHighResScreenShot(); which is probably not the right way to go. I’ll have a look at the offset issue…

thanks!

No Problem. Please let me know if you able to solve offset solution.
If I am able to find a better solution, i will post it also.

Thanks,

So this is a new function which i need to add or a replacement of existing OpenEXR screenshot function which will make a sequence ?

Is there any solution yet not including code or fixing the offset?

I read about people using the secuencer to export to exr but I can’t find the way to do this.