🐳遮罩对齐扩展:
The MaskSizeAlign node is designed to facilitate the precise alignment of one mask (mask2) to a base mask. This node is particularly useful in scenarios where you need to overlay or align masks with specific alignment preferences, such as centering, edge alignment, or corner alignment. By providing a variety of alignment options, this node allows you to control how mask2 is positioned relative to the base mask, ensuring that the masks are aligned according to your artistic or compositional needs. The node calculates the necessary transformations to align mask2 based on the specified alignment method, making it a powerful tool for artists who need to manipulate mask positions with precision and ease.
🐳遮罩对齐扩展 Input Parameters:
基准遮罩 (Base Mask)
This parameter represents the base mask to which mask2 will be aligned. It serves as the reference point for alignment operations. The base mask should be a single-channel image, and its dimensions determine the canvas size for the alignment process. There are no specific minimum or maximum values, but the mask should be appropriately sized for your project.
遮罩2 (Mask2)
Mask2 is the mask that you want to align to the base mask. Like the base mask, it should be a single-channel image. The dimensions of mask2 will affect how it is aligned and positioned relative to the base mask. Ensure that mask2 is correctly sized and formatted for your intended alignment.
对齐方式 (Alignment Method)
This parameter specifies the alignment method to be used for positioning mask2 relative to the base mask. Options include "居中对齐" (center alignment), "左对齐" (left alignment), "右对齐" (right alignment), "上对齐" (top alignment), "下对齐" (bottom alignment), "左上对齐" (top-left alignment), "右上对齐" (top-right alignment), "左下对齐" (bottom-left alignment), and "右下对齐" (bottom-right alignment). Each option determines a different alignment strategy, allowing for flexible positioning of mask2.
🐳遮罩对齐扩展 Output Parameters:
Aligned Mask
The output is the aligned version of mask2, positioned according to the specified alignment method relative to the base mask. This output is a single-channel image that reflects the new position of mask2 on the canvas defined by the base mask. The aligned mask can be used in further processing or compositing tasks, providing a seamless integration of the two masks.
🐳遮罩对齐扩展 Usage Tips:
- To achieve precise alignment, ensure that both the base mask and
mask2are correctly sized and formatted as single-channel images. - Experiment with different alignment methods to find the best fit for your artistic composition, especially when working with complex mask arrangements.
- Use center alignment for symmetrical compositions, and edge or corner alignments for more structured or grid-like layouts.
🐳遮罩对齐扩展 Common Errors and Solutions:
"Mask dimensions do not match"
- Explanation: This error occurs when the dimensions of the base mask and
mask2are incompatible for the chosen alignment method. - Solution: Ensure that both masks are appropriately sized and formatted as single-channel images. Adjust the dimensions if necessary to match the alignment requirements.
"Invalid alignment method"
- Explanation: This error indicates that the specified alignment method is not recognized or supported by the node.
- Solution: Double-check the alignment method parameter to ensure it matches one of the supported options, such as "居中对齐", "左对齐", etc. Correct any typos or unsupported values.
