A lightweight Unreal Engine C++ + Blueprint library for converting Render Targets, Textures, and raw Color Arrays.
π Overview
Unreal Image Conversion Library provides three essential low-level functions for handling GPU β CPU image data inside Unreal Engine.
It exposes safe and Blueprint-friendly versions of common operations that developers normally struggle to implement on their own:
Read pixels from a Render Target into a CPU array
Write a CPU color array into a Render Target
Generate a Texture2D dynamically from a CPU color array
This is ideal for systems such as:
In-game painting
Screenshot capture & processing
Texture streaming
Data-driven UI
Procedural texture generation
Save/load image data
Pixel-based simulation systems
π Features
β Render Target β Color Array (GPU β CPU)
β Color Array β Render Target (CPU β GPU)
β Color Array β Texture2D (CPU β GPU + asset creation)
β Fully Blueprint-exposed
β Designed for save/load systems
β Works with any pixel format supported by Unreal
β Lightweight, dependency-free C++
π§ Functions
- RenderTargetToColorArray
Direction: GPU β CPU Reads pixel data from a UTextureRenderTarget2D and returns an array of FColor.
Use cases:
Saving a drawn canvas
Extracting visual data for gameplay logic
Serializing image states
- ColorArrayToRenderTarget
Direction: CPU β GPU Writes a given array of colors into an existing Render Target.
Use cases:
Loading saved drawings
Overwriting a render target with processed data
Displaying procedurally computed images
- ColorArrayToTexture2D
Direction: CPU β GPU Creates a new UTexture2D from a color array.
Use cases:
Creating UI icons dynamically
Converting raw image data into textures
Generating crafting/item icons at runtime
π¦ Installation
-
Clone the Repository git clone https://github.com/YourName/UnrealImageConversionLibrary.git
-
Add to Your Unreal Project
Place the plugin or source folder into your project's /Plugins or /Source directory.
Regenerate project files.
Recompile.
- Enable From Editor
Edit β Plugins β Project β Image Conversion Library
π§© Blueprint Usage Order
When doing Save & Load, use the functions in this order:
Saving Images
1οΈβ£ Render Target β Color Array 2οΈβ£ Store the Color Array (GI / SaveGame / Disk)
Loading Images
1οΈβ£ Retrieve stored Color Array 2οΈβ£ Color Array β Render Target or Color Array β Texture2D
π Folder Structure /Source /ImageConversionLibrary ImageConversionLibrary.Build.cs Public/ ColorArrayConversionBPLibrary.h Private/ ColorArrayConversionBPLibrary.cpp
π§ͺ Example Blueprint Graph
β Read playerβs drawing β Save color data β Load color data β Restore drawing β Display restored drawing on any mesh or widget
π Documentation Goals
This library is meant to solve common problems such as:
Why canβt I save a Render Target?
Why canβt I serialize a Material Instance Dynamic?
How do I convert GPU textures into UObject assets?
How do I get pixel-accurate data into Blueprints?
With these functions, you finally can.
π Future Improvements
Texture compression helpers
PNG/JPEG loading (optional)
Async CPU/GPU copy operations
Mip-generation helpers
Material Instance β Serialized Metadata support
π§βπ» Contribution
Pull requests are welcome! Please open an issue for feature requests or bug reports.
π License
MIT License β free for commercial and non-commercial use.
If you want, I can also generate: β GitHub repo description β Repository tags β A professional project logo (via image generation) β Sample C++ usage β A wiki page structure
Just say the word.