Resize

From RealMotion Wiki

Image Processing/Operations/Resize

Scales and changes the format of an input texture. ​

Description

The box Resize scale pixel correctly a texture using filtering to average the value of each pixel upon the surrounding pixels.

General Use Case: The box is used to resize a texture while preserving the information of each pixel, in opposition to the Format box. For example, downscaling a black and white checker may turn all white or black with the Format box. With the Resize box, pixels are approximated with the Filter and the texture will be gray.

Inputs

Texture 2D Texture Receives to texture to be resized.

Outputs

Texture 2D Render Target Outputs the resized texture.

Parameters

General

Scale String Sets the scale direction.
Direction String Determines the axis affected by the resize.
Filter String Sets the mode of the resize sampler between the mean, the minimal and the maximal value. The filter will be applied on each filter to approximates the new pixel value.
Number Of Rescales Int Sets the amount of resize done.

Format

|}

Channel Settings

Set Format Toggle Allows the box to change the format of the outputted texture. Once enabled, this creates a new memory allocation for the texture created.
Format String Sets the format of the outputted texture. RGBA 8 bits is the common format. RGBA 16 bits allows negative vector calculation and is mostly used for simulation. RGBA 32 bits allows high precision but may negatively affect the FPS and the Grayscale has only the Red component.
Format Components String Sets the Components used for the outputted texture.
Format Component Bit Depth String Sets the Bit Depth of the outputted texture. 8 bits is the common format, 16 bits allow negative vector calculation and is mostly used for simulation, 32 bits allow high precision but may negatively affect the FPS.
Format Component Type String Sets the pixels value type depending on the Bit Depth.

Canvas Settings

Set Resolution Toggle Allows the box to change the resolution of the outputted texture. Once enabled, this creates a new memory allocation for the texture created.
Resolution Mode String Sets the Resolution Mode. Canvas uses the project configuration settings, Custom uses local setting resolution not shared with other box and Project Aspect Ratio uses the project aspect ratio and proportionally scales the height and width. The parameter chooses the reference Canvas setting the resolution of the outputted texture.
Canvas 2D ResolutionRef Chooses the reference Canvas and sets the resolution of the outputted texture.
Maximum Resolution Int Sets the maximal resolution of the X-axis and calculates the resolution of the Y-axis based on the aspect ratio of the Content Canvas.
Lock Aspect Ratio Toggle Locks the Aspect Ratio for Custom resolution.
Aspect Ratio 2D ResolutionRef Chooses the reference Canvas for the aspect ratio.
Size XY Int2 Sets the size in pixels of the outputted texture.

Alpha

Set Alpha Toggle Enables the alpha overwrite.
Alpha Float Sets the alpha value to override with.

See Also

Boxes related

Crop, Format, Invert, Scaler, Texture Components, ​​

Version Information

Current documentation version: 2.1.1. ​ ​