Equirectangular Mask to Face:
The Equirectangular Mask to Face node is designed to transform a mask from an equirectangular format into a specific face of a cubemap. This conversion is particularly useful in 3D graphics and virtual reality applications where equirectangular images are often used to represent 360-degree environments. By converting the mask to a cubemap face, you can isolate and manipulate specific sections of the environment, such as the sky or ground, with greater precision. This node provides flexibility in choosing which face of the cubemap to convert the mask to, allowing for targeted editing and enhancements. The node supports various interpolation methods to ensure smooth transitions and accurate representation of the mask on the selected face.
Equirectangular Mask to Face Input Parameters:
mask
The mask parameter is the input mask in equirectangular format that you wish to convert to a cubemap face. This mask should be a 2D representation of the area you want to isolate or manipulate. The default value is None, meaning you must provide a valid mask for the node to function.
face_width
The face_width parameter determines the width of the cubemap face in pixels. It affects the resolution of the output face mask. A value of -1 indicates that the node should automatically determine the appropriate width based on the input mask dimensions. Adjusting this value can impact the level of detail in the converted mask.
padding_mode
The padding_mode parameter specifies the interpolation method used when sampling the mask during conversion. Options include bilinear, bicubic, and nearest, with bilinear as the default. This setting influences the smoothness and quality of the mask edges on the cubemap face.
cube_face
The cube_face parameter allows you to select which face of the cubemap the mask should be converted to. Available options are Up, Down, Right, Left, Front, and Back, with Front as the default. This choice determines the orientation and position of the mask in the 3D environment.
Equirectangular Mask to Face Output Parameters:
Face MASK
The Face MASK output is the resulting mask after conversion to the specified cubemap face. This mask retains the original features of the input mask but is now oriented and positioned according to the selected cubemap face. It can be used for further processing or integration into 3D scenes, providing a focused area for editing or analysis.
Equirectangular Mask to Face Usage Tips:
- To achieve the best results, ensure that the input mask is correctly aligned with the equirectangular image it represents. Misalignment can lead to inaccurate conversions.
- Experiment with different
padding_modesettings to find the best balance between performance and visual quality, especially when dealing with masks that have intricate details. - When working with high-resolution equirectangular images, consider increasing the
face_widthto maintain detail in the converted mask.
Equirectangular Mask to Face Common Errors and Solutions:
"mask should have 3 dimensions, got <mask.dim()>"
- Explanation: This error occurs when the input mask does not have the expected three dimensions, which are necessary for processing.
- Solution: Ensure that the input mask is a 3D tensor. If your mask is in a different format, convert it to the required dimensions before using this node.
"Only a batch size of 1 is currently supported, got <e_img.shape[0]>"
- Explanation: The node currently supports processing one image at a time, and this error indicates that the input batch size is greater than one.
- Solution: Adjust your input to ensure that only a single mask is processed at a time. If you have multiple masks, process them sequentially.
