I recently started using unreal engine and to be specific the kite and lighting Stereo panoramic plugin to capture 360 Images out of the engine.
After following this blog post:
link text
Everything seems to be working. But for the project I am working on we would ideally need 16bit png captured out.
After playing around with the Code and trying out a few different Things I am Feeling a Little hopeless, mostly because I am not an experienced programmer. I know some Basics but thats really it.
So my question is…is it possible to capture out 16bit pngs with the kite and lighting plugin?
I did some digging into the engine Code files and found the ImageWrapper.h which seems to suggest that it ist possible. I just can’t figure out the right Syntax I think.
Here is the Code in the Kite and Lighting plugin which I think saves the Png with 8bits
// Generate name
FString FrameString = FString::Printf(TEXT("%s_%05d.png"), *Folder, CurrentFrameCount);
FString AtlasName = OutputDir / Timestamp / FrameString;
UE_LOG(LogStereoPanorama, Log, TEXT("Writing atlas: %s"), *AtlasName);
// Write out PNG
//TODO: ikrimae: Use threads to write out the images for performance
IImageWrapperPtr ImageWrapper = ImageWrapperModule.CreateImageWrapper(EImageFormat::PNG);
ImageWrapper->SetRaw(SphericalAtlas.GetData(), SphericalAtlas.GetAllocatedSize(), SphericalAtlasWidth, SphericalAtlasHeight, ERGBFormat::BGRA, 8);
const TArray<uint8>& PNGData = ImageWrapper->GetCompressed(100);
FFileHelper::SaveArrayToFile(PNGData, *AtlasName);
if (FStereoPanoramaManager::GenerateDebugImages->GetInt() != 0)
{
FString FrameStringUnprojected = FString::Printf(TEXT("%s_%05d_Unprojected.png"), *Folder, CurrentFrameCount);
FString AtlasNameUnprojected = OutputDir / Timestamp / FrameStringUnprojected;
ImageWrapper->SetRaw(SurfaceData.GetData(), SurfaceData.GetAllocatedSize(), UnprojectedAtlasWidth, UnprojectedAtlasHeight, ERGBFormat::BGRA, 8);
const TArray<uint8>& PNGDataUnprojected = ImageWrapper->GetCompressed(100);
FFileHelper::SaveArrayToFile(PNGData, *AtlasNameUnprojected);
}
ImageWrapper.Reset();
after changing the setraw function in lines 10 and 19 and changing the value at the end to 16 instead of 8, the Code still compiles, but as soon as I try to capture
the engine crashes.
So I thought it had to something with the const TArray&PngData thinking that the Array is to small?
I would be very thankful if someone could help figure this out. It has been days of playing and fiddeling around with the Code with absolutely no success.
Thanks