UOpenColorIOColorTransform

Object used to generate shader and LUTs from OCIO configuration file and contain required resource to make a color space transform.

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UOpenColorIOColorTransform

References

Module

OpenColorIO

Header

/Engine/Plugins/Compositing/OpenColorIO/Source/OpenColorIO/Public/OpenColorIOColorTransform.h

Include

#include "OpenColorIOColorTransform.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UOpenColorIOColorTransform : public UObject

Remarks

Object used to generate shader and LUTs from OCIO configuration file and contain required resource to make a color space transform.

Variables

Name Description

Public variable UProperty

UOpenColorIOCon...

 

ConfigurationOwner

Public variable UProperty Category visibleanywhere

FString

 

DestinationColorSpace

Public variable UProperty Category visibleanywhere

FString

 

SourceColorSpace

Constructors

Name Description

Public function

UOpenColorIOColorTransform

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Functions

Name Description

Public function Static

void

 

AllColorTransformsCacheResourceShadersForRendering()

For all ColorTransforms, UOpenColorIOColorTransform::CacheResourceShadersForRendering.

Public function

FOpenColorIO...

 

AllocateResource()

Public function

void

 

CacheResourceShadersForCooking

(
    EShaderPlatform InShaderPlatform,
    const ITargetPlatform* TargetP...,
    const FString& InShaderHash,
    const FString& InShaderCode,
    const FString& InRawConfigHash,
    TArray< FOpenColorIOTransformResour...
)

Cache resource shaders for cooking on the given shader platform.

Public function

void

 

CacheResourceShadersForRendering

(
    bool bRegenerateId
)

Cache resource shaders for rendering.

Public function

void

 

CacheResourceTextures()

Cache resource LUT for rendering/cooking on the given shader platform.

Public function

void

 

CacheShadersForResources

(
    EShaderPlatform InShaderPlatform,
    FOpenColorIOTransformResource*...,
    bool bApplyCompletedShaderMapForRen...,
    bool bIsCooking,
    const ITargetPlatform* TargetP...
)

Protected function

bool

 

GenerateColorTransformData

(
    const FString& InSourceColorSpace,
    const FString& InDestinationColorS...
)

Generate the LUT and shader associated to the desired color space transform. @note Only in editor

Protected function Static

void

 

GetOpenColorIOLUTKeyGuid

(
    const FString& InLutIdentifier,
    FGuid& OutLutGuid
)

Returns a Guid for the LUT based on its unique identifier and the OCIO DDC key.

Public function

bool

 

GetShaderAndLUTResouces

(
    ERHIFeatureLevel::Type InFeatureLev...,
    FOpenColorIOTransformResource*...,
    FTextureResource*& OutLUT3dRes...
)

Returns the desired resources required to apply this transform during rendering.

Protected function

FString

 

GetTransformFriendlyName()

Helper function returning the color space transform name based on source and destination color spaces.

Public function

bool

 

Initialize

(
    UOpenColorIOConfiguration* InO...,
    const FString& InSourceColorSpace,
    const FString& InDestinationColorS...
)

Public function Const

bool

 

IsTransform

(
    const FString& InSourceColorSpace,
    const FString& InDestinationColorS...
)

Protected function Static

void

 

ProcessSerializedShaderMaps

Helper function to register serialized shader maps for the given color transform resources

Public function

void

 

ReleaseResources()

Releases rendering resources used by this color transform.

Public function

void

 

SerializeLuts

(
    FArchive& Ar
)

Serialize LUT data. This will effectively serialize the LUT only when cooking

Protected function Static

void

 

SerializeOpenColorIOShaderMaps

(
    const TMap< const ITargetPlatform&...,
    FArchive& Ar,
    TArray< FOpenColorIOTransformResour...
)

Helper function to serialize shader maps for the given color transform resources.

Protected function

void

 

Update3dLutTexture

(
    const FString& InLutIdentifier,
    const float* InSourceData
)

Helper function taking raw LUT data coming from the library and initializing a UTexture with it.

Protected function

bool

 

UpdateShaderInfo

(
    FString& OutShaderCodeHash,
    FString& OutShaderCode,
    FString& OutRawConfigHash
)

Fetch shader code and hash from the OCIO library @note Uses library only in editor.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginCacheForCookedPlatformData

(
    const ITargetPlatform* TargetP...
)

Starts caching of platform specific data for the target platform Called when cooking before serialization so that object can prepare platform specific data Not called during normal loading of objects

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

ClearAllCachedCookedPlatformData()

Clear all cached cooked platform data

Public function Virtual

void

 

ClearCachedCookedPlatformData

(
    const ITargetPlatform* TargetP...
)

Clears cached cooked platform data for specific platform

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

bool

 

IsCachedCookedPlatformDataLoaded

(
    const ITargetPlatform* TargetP...
)

Have we finished loading all the cooked platform data for the target platforms requested in BeginCacheForCookedPlatformData

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss