add setting for overriding pixel format in capture component #4372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #4339
About
This PR undoes #4321 and adds a new setting that allows the user to override the pixel format that each capture component in a camera is initialized with. This allows us to support scenarios where pixel format is expected to be either int or float. See #4339, #4120 and #4321 for more information about various scenarios that are impacted by pixel format selection. The new settings include a "UnrealEngine" setting, which contains a "PixelFormatOverride" setting, which then contains a list of settings that have both a "ImageType" and "PixelFormat" parameter. See test settings used below for an example of these settings being defined.
How Has This Been Tested?
The high_res_camera.py script, both with its original text and with ImageRequest.pixels_as_float = True, was used in conjunction with both the settings detailed in the test script as well as the modified settings below:
Screenshots (if appropriate):