Skip to content

Lukerrr/ue-cubemap-export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubemap Export

Available on the Marketplace.

Engine supports only HDR format by default when exporting cubemaps, the plugin extends formats list. Plugin provides editor tools and runtime API for exporting of cube textures and render targets to files in various formats.

Image formats supported:

  • PNG (8-bit)
  • JPEG (8-bit)
  • BMP (8-bit)
  • EXR (32-bit)
  • HDR (32-bit)

Technical information

Features:

  • Export cubemap assets via 'Asset Actions -> Export' menu in editor
  • Export cubemap textures in runtime using Blueprints or C++ API

Texture types supported:

  • Texture Render Target Cube
  • Texture Cube

Code Modules:

  • CubemapExport [Runtime]
  • CubemapExportEditor [Editor]

Supported platforms: Windows

Installation

From Marketplace

  1. Buy the plugin on the Marketplace page.
  2. Install the plugin to the engine using Epic Games Launcher.
  3. Open your project and enable the plugin in 'Edit->Plugins' menu.

From Release

  1. Download latest release from the GitHub page.
  2. Unzip the release into your project's plugins directory: %PROJECT_DIR%/Plugins.
  3. Open your project and enable the plugin in 'Edit->Plugins' menu.

Manual build

  1. Clone repository or download zip.
  2. Put the plugin's files into your project's plugins directory: %PROJECT_DIR%/Plugins/CubemapExport.
  3. Rebuild your project.

How to use

Export assets

  1. Right-click on the asset ('Texture Render Target Cube' or 'Texture Cube').
  2. Select 'Asset Actions -> Export'.
  3. Choose file format and save the file.

Blueprint API

See Blueprints example.

C++ API

  1. Add CubemapExport module dependency into your project's module (.Build.cs file):
PublicDependencyModuleNames.AddRange(new string[] {
  "CubemapExport"
});
  1. Use API function to export cubemaps:
#include "Engine/TextureCube.h"
#include "Engine/TextureRenderTargetCube.h"
#include "CubemapExportLibrary.h"
...
UTextureRenderTargetCube* RenderTargetCube;
UTextureCube* TextureCube;
...
UCubemapExportLibrary::ExportRenderTargetCube(RenderTargetCube, TEXT("E:/"), TEXT("RenderTarget.png")); // Export render target cube as PNG
UCubemapExportLibrary::ExportRenderTargetCube(RenderTargetCube, TEXT("E:/"), TEXT("RenderTarget.jpg")); // Export render target cube as JPEG
UCubemapExportLibrary::ExportRenderTargetCube(RenderTargetCube, TEXT("E:/"), TEXT("RenderTarget.bmp")); // Export render target cube as BMP
UCubemapExportLibrary::ExportRenderTargetCube(RenderTargetCube, TEXT("E:/"), TEXT("RenderTarget.exr")); // Export render target cube as EXR
UCubemapExportLibrary::ExportRenderTargetCube(RenderTargetCube, TEXT("E:/"), TEXT("RenderTarget.hdr")); // Export render target cube as HDR
...
UCubemapExportLibrary::ExportTextureCube(TextureCube, TEXT("E:/"), TEXT("Texture.png"); // Export texture cube as PNG
UCubemapExportLibrary::ExportTextureCube(TextureCube, TEXT("E:/"), TEXT("Texture.jpg"); // Export texture cube as JPEG
UCubemapExportLibrary::ExportTextureCube(TextureCube, TEXT("E:/"), TEXT("Texture.bmp"); // Export texture cube as BMP
UCubemapExportLibrary::ExportTextureCube(TextureCube, TEXT("E:/"), TEXT("Texture.exr"); // Export texture cube as EXR
UCubemapExportLibrary::ExportTextureCube(TextureCube, TEXT("E:/"), TEXT("Texture.hdr"); // Export texture cube as HDR

Known limitations

  1. Alpha channel is not fully supported and filled with 255 or 1.0 values (in case of various formats).
  2. PNG format is exported only with 8-bit depth.

Contact