UKismetRenderingLibrary

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetRenderingLibrary.h

Include

#include "Kismet/KismetRenderingLibrary.h"

Syntax

class UKismetRenderingLibrary : public UBlueprintFunctionLibrary

Constructors

Name Description

Public function

UKismetRenderingLibrary

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Static

void

 

BeginDrawCanvasToRenderTarget

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    UCanvas*& Canvas,
    FVector2D& Size,
    FDrawToRenderTargetContext& Contex...
)

Returns a Canvas object that can be used to draw to the specified render target.

Public function Static

void

 

BreakSkinWeightInfo

(
    FSkelMeshSkinWeightInfo InWeight,
    int32& Bone0,
    uint8& Weight0,
    int32& Bone1,
    uint8& Weight1,
    int32& Bone2,
    uint8& Weight2,
    int32& Bone3,
    uint8& Weight3
)

Break FSkelMeshSkinWeightInfo

Public function Static

void

 

ClearRenderTarget2D

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    FLinearColor ClearColor
)

Clears the specified render target with the given ClearColor.

Public function Static

void

 

ConvertRenderTargetToTexture2DEditorOnly

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Render...,
    UTexture2D* Texture
)

Copies the contents of a render target to a UTexture2D Only works in the editor

Public function Static

UTextureRend...

 

CreateRenderTarget2D

(
    UObject* WorldContextObject,
    int32 Width,
    int32 Height,
    ETextureRenderTargetFormat Format,
    FLinearColor ClearColor,
    bool bAutoGenerateMipMaps
)

Creates a new render target and initializes it to the specified dimensions

Public function Static

UTextureRend...

 

CreateRenderTarget2DArray

(
    UObject* WorldContextObject,
    int32 Width,
    int32 Height,
    int32 Slices,
    ETextureRenderTargetFormat Format,
    FLinearColor ClearColor,
    bool bAutoGenerateMipMaps
)

Creates a new render target array and initializes it to the specified dimensions

Public function Static

UTextureRend...

 

CreateRenderTargetVolume

(
    UObject* WorldContextObject,
    int32 Width,
    int32 Height,
    int32 Depth,
    ETextureRenderTargetFormat Format,
    FLinearColor ClearColor,
    bool bAutoGenerateMipMaps
)

Creates a new volume render target and initializes it to the specified dimensions

Public function Static

void

 

DrawMaterialToRenderTarget

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    UMaterialInterface* Material
)

Renders a quad with the material applied to the specified render target.

Public function Static

void

 

EndDrawCanvasToRenderTarget

(
    UObject* WorldContextObject,
    const FDrawToRenderTargetContext& ...
)

Must be paired with a BeginDrawCanvasToRenderTarget to complete rendering to a render target.

Public function Static

void

 

ExportRenderTarget

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    const FString& FilePath,
    const FString& FileName
)

Exports a render target as a HDR or PNG image onto the disk (depending on the format of the render target)

Public function Static

void

 

ExportTexture2D

(
    UObject* WorldContextObject,
    UTexture2D* Texture,
    const FString& FilePath,
    const FString& FileName
)

Exports a Texture2D as a HDR image onto the disk.

Public function Static

UTexture2D &...

 

ImportBufferAsTexture2D

(
    UObject* WorldContextObject,
    const TArray< uint8 >& Buffer
)

Imports a texture from a buffer and creates Texture2D from it.

Public function Static

UTexture2D &...

 

ImportFileAsTexture2D

(
    UObject* WorldContextObject,
    const FString& Filename
)

Imports a texture file from disk and creates Texture2D from it.

Public function Static

FSkelMeshSki...

 

MakeSkinWeightInfo

(
    int32 Bone0,
    uint8 Weight0,
    int32 Bone1,
    uint8 Weight1,
    int32 Bone2,
    uint8 Weight2,
    int32 Bone3,
    uint8 Weight3
)

Create FSkelMeshSkinWeightInfo

Public function Static

FColor

 

ReadRenderTargetPixel

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    int32 X,
    int32 Y
)

Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using integer pixel coordinates.

Public function Static

FLinearColor

 

ReadRenderTargetRawPixel

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    int32 X,
    int32 Y
)

Incredibly inefficient and slow operation! Read a value as-is from a render target using integer pixel coordinates.

Public function Static

FLinearColor

 

ReadRenderTargetRawUV

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    float U,
    float V
)

Incredibly inefficient and slow operation! Read a value as-is color from a render target using UV [0,1]x[0,1] coordinates.

Public function Static

FColor

 

ReadRenderTargetUV

(
    UObject* WorldContextObject,
    UTextureRenderTarget2D* Textur...,
    float U,
    float V
)

Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using UV [0,1]x[0,1] coordinates.

Public function Static

void

 

ReleaseRenderTarget2D

(
    UTextureRenderTarget2D* Textur...
)

Manually releases GPU resources of a render target.

Public function Static

UTexture2D &...

 

RenderTargetCreateStaticTexture2DEditorOnly

(
    UTextureRenderTarget2D* Render...,
    FString Name,
    enum TextureCompressionSettings Com...,
    enum TextureMipGenSettings MipSetti...
)

Creates a new Static Texture from a Render Target 2D.

Public function Static

void

 

SetCastInsetShadowForAllAttachments

(
    UPrimitiveComponent* Primitive...,
    bool bCastInsetShadow,
    bool bLightAttachmentsAsGroup
)

Set the inset shadow casting state of the given component and all its child attachments.

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