|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
Functions | |
Editor Scripting | Rendering | |
| UTextureCube | RenderTargetCreateStaticTextureCubeEditorOnly (UTextureRenderTargetCube RenderTarget, FString Name="Texture", TextureCompressionSettings CompressionSettings=TextureCompressionSettings ::TC_Default, TextureMipGenSettings MipSettings=TextureMipGenSettings ::TMGS_FromTextureGroup) |
| Creates a new Static Texture Cube from a Render Target Cube. Only works in the editor. | |
| UTexture2D | RenderTargetCreateStaticTexture2DEditorOnly (UTextureRenderTarget2D RenderTarget, FString Name="Texture", TextureCompressionSettings CompressionSettings=TextureCompressionSettings ::TC_Default, TextureMipGenSettings MipSettings=TextureMipGenSettings ::TMGS_FromTextureGroup) |
| Creates a new Static Texture from a Render Target 2D. Only works in the editor. | |
| UVolumeTexture | RenderTargetCreateStaticVolumeTextureEditorOnly (UTextureRenderTargetVolume RenderTarget, FString Name="Texture", TextureCompressionSettings CompressionSettings=TextureCompressionSettings ::TC_Default, TextureMipGenSettings MipSettings=TextureMipGenSettings ::TMGS_FromTextureGroup) |
| Creates a new Static Volume Texture from a Render Target Volume. Only works in the editor. | |
| void | ConvertRenderTargetToTextureVolumeEditorOnly (UTextureRenderTargetVolume RenderTarget, UVolumeTexture Texture) |
| Copies the contents of a UTextureRenderTargetVolume to a UVolumeTexture Only works in the editor. | |
| UTexture2DArray | RenderTargetCreateStaticTexture2DArrayEditorOnly (UTextureRenderTarget2DArray RenderTarget, FString Name="Texture", TextureCompressionSettings CompressionSettings=TextureCompressionSettings ::TC_Default, TextureMipGenSettings MipSettings=TextureMipGenSettings ::TMGS_FromTextureGroup) |
| Creates a new Static Texture 2D Array from a Render Target 2D Array. Only works in the editor. | |
| void | ConvertRenderTargetToTextureCubeEditorOnly (UTextureRenderTargetCube RenderTarget, UTextureCube Texture) |
| Copies the contents of a UTextureRenderTargetCube to a UTextureCube Only works in the editor. | |
| void | ConvertRenderTargetToTexture2DArrayEditorOnly (UTextureRenderTarget2DArray RenderTarget, UTexture2DArray Texture) |
| Copies the contents of a UTextureRenderTarget2DArray to a UTexture2DArray Only works in the editor. | |
| void | ConvertRenderTargetToTexture2DEditorOnly (UTextureRenderTarget2D RenderTarget, UTexture2D Texture) |
| Copies the contents of a UTextureRenderTarget2D to a UTexture2D Only works in the editor. | |
Rendering | |
| UTextureRenderTargetVolume | CreateRenderTargetVolume (int Width=16, int Height=16, int Depth=16, ETextureRenderTargetFormat Format=ETextureRenderTargetFormat ::RTF_RGBA16f, FLinearColor ClearColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000), bool bAutoGenerateMipMaps=false, bool bSupportUAVs=false) |
| Creates a new volume render target and initializes it to the specified dimensions. | |
| bool | ReadRenderTargetRaw (UTextureRenderTarget2D TextureRenderTarget, TArray< FLinearColor > &OutLinearSamples, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Read entire texture as-is from a render target. | |
| void | DrawMaterialToRenderTarget (UTextureRenderTarget2D TextureRenderTarget, UMaterialInterface Material) |
| Renders a quad with the material applied to the specified render target. This sets the render target even if it is already set, which is an expensive operation. Use BeginDrawCanvasToRenderTarget / EndDrawCanvasToRenderTarget instead if rendering multiple primitives to the same render target. | |
| void | EnablePathTracing (bool bEnablePathTracer) |
| Enables or disables the path tracer for the current Game Viewport. This command is equivalent to setting ShowFlag.PathTracing, but is accessible even from shipping builds. | |
| FLinearColor | ReadRenderTargetRawUV (UTextureRenderTarget2D TextureRenderTarget, float32 U, float32 V, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Read a value as-is from a render target using UV [0,1]x[0,1] coordinates. | |
| TArray< FLinearColor > | ReadRenderTargetRawUVArea (UTextureRenderTarget2D TextureRenderTarget, FBox2D Area, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Read an area of values as-is from a render target using a rectangle defined by UV [0,1]x[0,1] coordinates. | |
| void | EndDrawCanvasToRenderTarget (FDrawToRenderTargetContext Context) |
| Must be paired with a BeginDrawCanvasToRenderTarget to complete rendering to a render target. | |
| void | ExportRenderTarget (UTextureRenderTarget2D TextureRenderTarget, FString FilePath, FString FileName) |
| Exports a render target as a HDR or PNG image onto the disk (depending on the format of the render target). | |
| void | BreakSkinWeightInfo (FSkelMeshSkinWeightInfo InWeight, int &Bone0, uint8 &Weight0, int &Bone1, uint8 &Weight1, int &Bone2, uint8 &Weight2, int &Bone3, uint8 &Weight3) |
| Break FSkelMeshSkinWeightInfo. | |
| FSkelMeshSkinWeightInfo | MakeSkinWeightInfo (int Bone0, uint8 Weight0, int Bone1, uint8 Weight1, int Bone2, uint8 Weight2, int Bone3, uint8 Weight3) |
| Create FSkelMeshSkinWeightInfo. | |
| bool | ReadRenderTarget (UTextureRenderTarget2D TextureRenderTarget, TArray< FColor > &OutSamples, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Reads entire render target as sRGB color and returns a linear array of sRGB colors. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result whether the operation succeeded. If successful, OutSamples will an entry per pixel, where each is 8-bit per channel [0,255] BGRA in sRGB space. | |
| FColor | ReadRenderTargetPixel (UTextureRenderTarget2D TextureRenderTarget, int X, int Y) |
| Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using integer pixel coordinates. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result is 8-bit per channel [0,255] BGRA in sRGB space. | |
| UTextureRenderTarget2D | CreateRenderTarget2D (int Width=256, int Height=256, ETextureRenderTargetFormat Format=ETextureRenderTargetFormat ::RTF_RGBA16f, FLinearColor ClearColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000), bool bAutoGenerateMipMaps=false, bool bSupportUAVs=false) |
| Creates a new render target and initializes it to the specified dimensions. | |
| FLinearColor | ReadRenderTargetRawPixel (UTextureRenderTarget2D TextureRenderTarget, int X, int Y, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Read a value as-is from a render target using integer pixel coordinates. | |
| TArray< FLinearColor > | ReadRenderTargetRawPixelArea (UTextureRenderTarget2D TextureRenderTarget, int MinX, int MinY, int MaxX, int MaxY, bool bNormalize=true) |
| Incredibly inefficient and slow operation! Read an area of values as-is from a render target using a rectangle defined by integer pixel coordinates. | |
| void | ClearRenderTarget2D (UTextureRenderTarget2D TextureRenderTarget, FLinearColor ClearColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000)) |
| Clears the specified render target with the given ClearColor. | |
| void | BeginDrawCanvasToRenderTarget (UTextureRenderTarget2D TextureRenderTarget, UCanvas &Canvas, FVector2D &Size, FDrawToRenderTargetContext &Context) |
| Returns a Canvas object that can be used to draw to the specified render target. Canvas has functions like DrawMaterial with size parameters that can be used to draw to a specific area of a render target. Be sure to call EndDrawCanvasToRenderTarget to complete the rendering! | |
| FColor | ReadRenderTargetUV (UTextureRenderTarget2D TextureRenderTarget, float32 U, float32 V) |
| Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using UV [0,1]x[0,1] coordinates. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result is 8-bit per channel [0,255] BGRA in sRGB space. | |
| void | RefreshPathTracingOutput () |
| Forces the path tracer to restart sample accumulation. This can be used to force the path tracer to compute a new frame in situations where it can not detect a change in the scene automatically. | |
| void | ReleaseRenderTarget2D (UTextureRenderTarget2D TextureRenderTarget) |
| Manually releases GPU resources of a render target. This is useful for blueprint creating a lot of render target that would normally be released too late by the garbage collector that can be problematic on platforms that have tight GPU memory constrains. | |
| UTextureRenderTarget2DArray | CreateRenderTarget2DArray (int Width=256, int Height=256, int Slices=1, ETextureRenderTargetFormat Format=ETextureRenderTargetFormat ::RTF_RGBA16f, FLinearColor ClearColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000), bool bAutoGenerateMipMaps=false, bool bSupportUAVs=false) |
| Creates a new render target array and initializes it to the specified dimensions. | |
| FMatrix | CalculateProjectionMatrix (FMinimalViewInfo MinimalViewInfo) |
| Calculates the projection matrix using this view info's aspect ratio (regardless of bConstrainAspectRatio). | |
| void | ExportTexture2D (UTexture2D Texture, FString FilePath, FString FileName) |
| Exports a Texture2D as a HDR image onto the disk. | |
| UTexture2D | ImportBufferAsTexture2D (TArray< uint8 > Buffer) |
| Imports a texture from a buffer and creates Texture2D from it. | |
| UTexture2D | ImportFileAsTexture2D (FString Filename) |
| Imports a texture file from disk and creates Texture2D from it. | |
| void | ResizeRenderTarget2D (UTextureRenderTarget2D TextureRenderTarget, int Width=256, int Height=256) |
| Changes the resolution of a render target. This is useful for when you need to resize the game viewport or change the in-game resolution during runtime and thus need to update the sizes of all the render targets in the game accordingly. | |
| void | SetCastInsetShadowForAllAttachments (UPrimitiveComponent PrimitiveComponent, bool bCastInsetShadow, bool bLightAttachmentsAsGroup) |
| Set the inset shadow casting state of the given component and all its child attachments. Also choose if all attachments should be grouped for the inset shadow rendering. If enabled, one depth target will be shared for all attachments. | |
| void BeginDrawCanvasToRenderTarget | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| UCanvas & | Canvas, | ||
| FVector2D & | Size, | ||
| FDrawToRenderTargetContext & | Context ) |
Returns a Canvas object that can be used to draw to the specified render target. Canvas has functions like DrawMaterial with size parameters that can be used to draw to a specific area of a render target. Be sure to call EndDrawCanvasToRenderTarget to complete the rendering!
| void BreakSkinWeightInfo | ( | FSkelMeshSkinWeightInfo | InWeight, |
| int & | Bone0, | ||
| uint8 & | Weight0, | ||
| int & | Bone1, | ||
| uint8 & | Weight1, | ||
| int & | Bone2, | ||
| uint8 & | Weight2, | ||
| int & | Bone3, | ||
| uint8 & | Weight3 ) |
Break FSkelMeshSkinWeightInfo.
| FMatrix CalculateProjectionMatrix | ( | FMinimalViewInfo | MinimalViewInfo | ) |
Calculates the projection matrix using this view info's aspect ratio (regardless of bConstrainAspectRatio).
| void ClearRenderTarget2D | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| FLinearColor | ClearColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ) ) |
Clears the specified render target with the given ClearColor.
| void ConvertRenderTargetToTexture2DArrayEditorOnly | ( | UTextureRenderTarget2DArray | RenderTarget, |
| UTexture2DArray | Texture ) |
Copies the contents of a UTextureRenderTarget2DArray to a UTexture2DArray Only works in the editor.
| void ConvertRenderTargetToTexture2DEditorOnly | ( | UTextureRenderTarget2D | RenderTarget, |
| UTexture2D | Texture ) |
Copies the contents of a UTextureRenderTarget2D to a UTexture2D Only works in the editor.
| void ConvertRenderTargetToTextureCubeEditorOnly | ( | UTextureRenderTargetCube | RenderTarget, |
| UTextureCube | Texture ) |
Copies the contents of a UTextureRenderTargetCube to a UTextureCube Only works in the editor.
| void ConvertRenderTargetToTextureVolumeEditorOnly | ( | UTextureRenderTargetVolume | RenderTarget, |
| UVolumeTexture | Texture ) |
Copies the contents of a UTextureRenderTargetVolume to a UVolumeTexture Only works in the editor.
| UTextureRenderTarget2D CreateRenderTarget2D | ( | int | Width = 256, |
| int | Height = 256, | ||
| ETextureRenderTargetFormat | Format = ETextureRenderTargetFormat :: RTF_RGBA16f, | ||
| FLinearColor | ClearColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ), | ||
| bool | bAutoGenerateMipMaps = false, | ||
| bool | bSupportUAVs = false ) |
Creates a new render target and initializes it to the specified dimensions.
| UTextureRenderTarget2DArray CreateRenderTarget2DArray | ( | int | Width = 256, |
| int | Height = 256, | ||
| int | Slices = 1, | ||
| ETextureRenderTargetFormat | Format = ETextureRenderTargetFormat :: RTF_RGBA16f, | ||
| FLinearColor | ClearColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ), | ||
| bool | bAutoGenerateMipMaps = false, | ||
| bool | bSupportUAVs = false ) |
Creates a new render target array and initializes it to the specified dimensions.
| UTextureRenderTargetVolume CreateRenderTargetVolume | ( | int | Width = 16, |
| int | Height = 16, | ||
| int | Depth = 16, | ||
| ETextureRenderTargetFormat | Format = ETextureRenderTargetFormat :: RTF_RGBA16f, | ||
| FLinearColor | ClearColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ), | ||
| bool | bAutoGenerateMipMaps = false, | ||
| bool | bSupportUAVs = false ) |
Creates a new volume render target and initializes it to the specified dimensions.
| void DrawMaterialToRenderTarget | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| UMaterialInterface | Material ) |
Renders a quad with the material applied to the specified render target. This sets the render target even if it is already set, which is an expensive operation. Use BeginDrawCanvasToRenderTarget / EndDrawCanvasToRenderTarget instead if rendering multiple primitives to the same render target.
| void EnablePathTracing | ( | bool | bEnablePathTracer | ) |
Enables or disables the path tracer for the current Game Viewport. This command is equivalent to setting ShowFlag.PathTracing, but is accessible even from shipping builds.
| void EndDrawCanvasToRenderTarget | ( | FDrawToRenderTargetContext | Context | ) |
Must be paired with a BeginDrawCanvasToRenderTarget to complete rendering to a render target.
| void ExportRenderTarget | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| FString | FilePath, | ||
| FString | FileName ) |
Exports a render target as a HDR or PNG image onto the disk (depending on the format of the render target).
| void ExportTexture2D | ( | UTexture2D | Texture, |
| FString | FilePath, | ||
| FString | FileName ) |
Exports a Texture2D as a HDR image onto the disk.
| UTexture2D ImportBufferAsTexture2D | ( | TArray< uint8 > | Buffer | ) |
Imports a texture from a buffer and creates Texture2D from it.
| UTexture2D ImportFileAsTexture2D | ( | FString | Filename | ) |
Imports a texture file from disk and creates Texture2D from it.
| FSkelMeshSkinWeightInfo MakeSkinWeightInfo | ( | int | Bone0, |
| uint8 | Weight0, | ||
| int | Bone1, | ||
| uint8 | Weight1, | ||
| int | Bone2, | ||
| uint8 | Weight2, | ||
| int | Bone3, | ||
| uint8 | Weight3 ) |
Create FSkelMeshSkinWeightInfo.
| bool ReadRenderTarget | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| TArray< FColor > & | OutSamples, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Reads entire render target as sRGB color and returns a linear array of sRGB colors. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result whether the operation succeeded. If successful, OutSamples will an entry per pixel, where each is 8-bit per channel [0,255] BGRA in sRGB space.
| FColor ReadRenderTargetPixel | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| int | X, | ||
| int | Y ) |
Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using integer pixel coordinates. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result is 8-bit per channel [0,255] BGRA in sRGB space.
| bool ReadRenderTargetRaw | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| TArray< FLinearColor > & | OutLinearSamples, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Read entire texture as-is from a render target.
| FLinearColor ReadRenderTargetRawPixel | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| int | X, | ||
| int | Y, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Read a value as-is from a render target using integer pixel coordinates.
| TArray< FLinearColor > ReadRenderTargetRawPixelArea | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| int | MinX, | ||
| int | MinY, | ||
| int | MaxX, | ||
| int | MaxY, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Read an area of values as-is from a render target using a rectangle defined by integer pixel coordinates.
| FLinearColor ReadRenderTargetRawUV | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| float32 | U, | ||
| float32 | V, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Read a value as-is from a render target using UV [0,1]x[0,1] coordinates.
| TArray< FLinearColor > ReadRenderTargetRawUVArea | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| FBox2D | Area, | ||
| bool | bNormalize = true ) |
Incredibly inefficient and slow operation! Read an area of values as-is from a render target using a rectangle defined by UV [0,1]x[0,1] coordinates.
| FColor ReadRenderTargetUV | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| float32 | U, | ||
| float32 | V ) |
Incredibly inefficient and slow operation! Read a value as sRGB color from a render target using UV [0,1]x[0,1] coordinates. LDR render targets are assumed to be in sRGB space. HDR ones are assumed to be in linear space. Result is 8-bit per channel [0,255] BGRA in sRGB space.
| void RefreshPathTracingOutput | ( | ) |
Forces the path tracer to restart sample accumulation. This can be used to force the path tracer to compute a new frame in situations where it can not detect a change in the scene automatically.
| void ReleaseRenderTarget2D | ( | UTextureRenderTarget2D | TextureRenderTarget | ) |
Manually releases GPU resources of a render target. This is useful for blueprint creating a lot of render target that would normally be released too late by the garbage collector that can be problematic on platforms that have tight GPU memory constrains.
| UTexture2DArray RenderTargetCreateStaticTexture2DArrayEditorOnly | ( | UTextureRenderTarget2DArray | RenderTarget, |
| FString | Name = "Texture", | ||
| TextureCompressionSettings | CompressionSettings = TextureCompressionSettings :: TC_Default, | ||
| TextureMipGenSettings | MipSettings = TextureMipGenSettings :: TMGS_FromTextureGroup ) |
| UTexture2D RenderTargetCreateStaticTexture2DEditorOnly | ( | UTextureRenderTarget2D | RenderTarget, |
| FString | Name = "Texture", | ||
| TextureCompressionSettings | CompressionSettings = TextureCompressionSettings :: TC_Default, | ||
| TextureMipGenSettings | MipSettings = TextureMipGenSettings :: TMGS_FromTextureGroup ) |
Creates a new Static Texture from a Render Target 2D. Only works in the editor.
| UTextureCube RenderTargetCreateStaticTextureCubeEditorOnly | ( | UTextureRenderTargetCube | RenderTarget, |
| FString | Name = "Texture", | ||
| TextureCompressionSettings | CompressionSettings = TextureCompressionSettings :: TC_Default, | ||
| TextureMipGenSettings | MipSettings = TextureMipGenSettings :: TMGS_FromTextureGroup ) |
Creates a new Static Texture Cube from a Render Target Cube. Only works in the editor.
| UVolumeTexture RenderTargetCreateStaticVolumeTextureEditorOnly | ( | UTextureRenderTargetVolume | RenderTarget, |
| FString | Name = "Texture", | ||
| TextureCompressionSettings | CompressionSettings = TextureCompressionSettings :: TC_Default, | ||
| TextureMipGenSettings | MipSettings = TextureMipGenSettings :: TMGS_FromTextureGroup ) |
Creates a new Static Volume Texture from a Render Target Volume. Only works in the editor.
| void ResizeRenderTarget2D | ( | UTextureRenderTarget2D | TextureRenderTarget, |
| int | Width = 256, | ||
| int | Height = 256 ) |
Changes the resolution of a render target. This is useful for when you need to resize the game viewport or change the in-game resolution during runtime and thus need to update the sizes of all the render targets in the game accordingly.
| void SetCastInsetShadowForAllAttachments | ( | UPrimitiveComponent | PrimitiveComponent, |
| bool | bCastInsetShadow, | ||
| bool | bLightAttachmentsAsGroup ) |
Set the inset shadow casting state of the given component and all its child attachments. Also choose if all attachments should be grouped for the inset shadow rendering. If enabled, one depth target will be shared for all attachments.