Crop

From RealMotion Wiki

Image Processing/Operations/Crop

Selects a sub-part of a texture. ​

Description

The Crop box selects a sub-part of an input texture. The cropped surface is determined either by:
- an Input Surface,
- the corners of a Surface,
- the center and the size of a Surface.

General Use Case: The Crop box is mainly used as a mapping tool.

Inputs

Bottom-Right Float2 Receives the Bottom-Right Corner of the cropping surface.
Center Float2 Receives the center of the cropping surface.
Size Float2 Receives the size of the cropping surface.
Surface Zone Receives the cropping surface and overrides the Surface parameter.
Texture 2D Texture Receives the texture to crop.
Top-Left Float2 Receives the Top-Left Corner of the cropping surface.

Outputs

Texture 2D Texture Outputs the cropped texture.

Parameters

Surface Control

Creation Mode String Selects the surface creation mode.

Config Surface

Enable Input Pin: Surface Toggle Enables the Surface Input Pin.
Surface Zone Sets the Surface used for cropping. The Surface is created and modified in the Surface Editor.

Custom Centered

Center Toggle Enables the Center Input Pin to override the Center Corner parameter.
Center Float2 Sets the center of the cropping surface.
Size Toggle Enables the Size Input Pin to override the Size parameter.
Size Float2 Sets the size of the cropping surface.

Custom Corners

Top-Left Toggle Enables the Top-Left Input Pin to override the Top-Left Corner parameter.
Top-Left Float2 Sets the top-left corner of the cropping surface.
Bottom-Right Toggle Enables the Bottom-Right Input Pin to override the Bottom-Right Corner parameter.
Bottom-Right Float2 Sets the bottom-right corner of the cropping surface.

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.

See Also

Boxes related

Warp Grid, Format, Draw Surface, Surface, Surface Components, Surface Mapping, ​​

Version Information

Current documentation version: 2.1.1. ​ ​