Visit ComfyUI Online for ready-to-use ComfyUI environment
Transform masks with precision using translation, rotation, and scaling for creative visual effects and alignments.
The MaskTransform node is designed to apply various transformations to masks, such as translation, rotation, and scaling. This node is particularly useful for AI artists who need to manipulate masks to achieve specific visual effects or alignments in their projects. By adjusting the transformation parameters, you can precisely control the position, orientation, and size of the mask, allowing for a high degree of customization and creativity. The node leverages the power of affine transformations to modify the mask, ensuring that the changes are smooth and visually appealing. Whether you are looking to shift a mask slightly, rotate it to a new angle, or scale it up or down, the MaskTransform node provides the tools you need to achieve your desired outcome.
This parameter determines the type of transformation to be applied to the mask. The available options are "translate", "rotate", and "scale". Choosing "translate" will shift the mask horizontally and/or vertically based on the x_value and y_value parameters. Selecting "rotate" will rotate the mask around its center by the angle specified in x_value. Opting for "scale" will resize the mask based on the scaling factors provided in x_value and y_value. This parameter is crucial as it defines the nature of the transformation to be performed.
This parameter specifies the horizontal translation distance, rotation angle, or horizontal scaling factor, depending on the selected transform_type. For translation, it represents the number of pixels to move the mask horizontally. For rotation, it indicates the angle in degrees to rotate the mask. For scaling, it defines the horizontal scaling factor. The value ranges from -1000 to 1000, with a default of 0 and a step of 0.1. Adjusting this parameter allows you to fine-tune the transformation effect on the mask.
This parameter specifies the vertical translation distance or vertical scaling factor, depending on the selected transform_type. For translation, it represents the number of pixels to move the mask vertically. For scaling, it defines the vertical scaling factor. The value ranges from -1000 to 1000, with a default of 0 and a step of 0.1. Adjusting this parameter allows you to fine-tune the transformation effect on the mask.
The output of the MaskTransform node is a transformed mask. This mask reflects the changes made based on the specified transformation type and parameters. The transformed mask can be used in subsequent nodes or processes to achieve the desired visual effects in your project. The output is crucial as it provides the modified mask that incorporates the applied transformations, enabling further creative manipulations.
<transform_type>
<shape1>
into shape <shape2>
© Copyright 2024 RunComfy. All Rights Reserved.