Description
This tool helps you to compare 2 textures side by side, making it easier to evaluate textures:
This tool supports all the viewing options you’re used to from Unreal’s texture editor:
You can select mips or channels to display and change the exposure values used for HDR textures.
To detect even tiny differences, you can use the Difference View Mode that visualizes the difference between the two images for each pixel.
The pictures shown in the screenshots are used for demonstration purposes only and aren’t part of the tool.
Note: The tool doesn’t allow comparing 2D textures with cube maps, so when selecting a cube map for either A or B, the other texture switches to the last cube map used in that slot.
Usage
Extending the Tool
If you want to modify the widget or add new features, there are two critical assets to start with:
EUW_ImageComparison is the widget with the whole UI and most of the logic. The viewport is drawn using two dynamic material instances, MID_2D and MID_Cubemap.
Most UI widgets modify parameters on these two MIDs whenever any values on them are changed. These parameters control how the textures are displayed.
To be able to change them on the fly, some boolean variables are expressed using floats. 0.0 equals False, 1.0 equals True.
The only exception is the isCubemap parameter. Instead, there is a material instance of the material that’s used to display cube maps.
M_ImageComparison is the parent material of the MIDs used in the viewport. All features that need to be controlled independently for each of the two textures are put in the MF_Image material function, which is used twice in the material. Most of the nodes are used to display textures correctly, whether they are sRGB/linear or normal maps.
There are two separate UV setups, depending on whether the texture is a 2D texture or a cube map.
Other Assets and what they do
MF_FixRatio makes sure non-square textures are displayed with the correct aspect ratio.
MF_AddMatte displays all pixels outside of the 0.0-1.0 UV range as black.
MF_sRGBToLinear converts a color from sRGB to linear.
EUW_ChannelSelector contains the check boxes that control the active channels and contains the logic to switch between the last manually set configuration and the default.
BP_ComparedImage and the data assets derived from it just contain references to the displayed textures.
Technical Details
Features
Number of Blueprints: 3 (UE4), 5 (UE5)
Supported Development Platforms: There are no platform-specific features used by the tool.
Documentation: Widgets have tooltips. Materials and blueprints are commented.
Supported Engine Versions
4.27, 5.0