Can someone hint me how I can get raw pixel data from the UTexture I retreive from a material?
I am stuck at the point where I need to get actual pixel data I have no idea where to get documentation for it, because in official docs there is not any mention about that.
void* TextureData = NewTexture->PlatformData->Mips[0].BulkData.Lock(LOCK_READ_WRITE);//locking the data since it is multi threaded
FMemory::Memmove(TextureData, PixelData.GetData(), PixelData.Num() * sizeof(uint8));
NewTexture->PlatformData->Mips[0].BulkData.Unlock();
I think you can use it for reading. Use LOCK_READ and change order in memmove arguments.
Unfortunatly PlatformData is not a member of UTexture, it is a member of UTexture2D Though. The problem is that I dont see any point casting UTexture to UTexture2D to access PlatformData. Do you have any other Ideas? Please I beg you cause I am stuck and have no more ideas how I can acomplish this.