Based on https://arxiv.org/abs/2205.07873
Ensure at least Python 3.11 installed. Please refer to Known Issues before running the following commands.
# Install dependencies
pip install -r requirements.txt
# Highly advisable to create virtualenv
python -m venv env
# Using Windows Command Prompt if you're not using Git Bash (or Unix terminal emulator)
.\env\Scripts\activate.bat
# If using Git Bash
source env/Scripts/activate
# Run the app
python main.py
- Select the HDRI file (.exr/.hdr) for EXR/HDR Path.
- Select the desired output folder (if Save Output is unchecked, this value is ignored).
- Set the Intensity value. The default value is
15.00
. This the minimum value to detect the saturated pixel values ( the brightness) in the HDRI. Caution! Not to be confused with color saturation. - Set the Threshold value. The default value is
1.00
. This is the value where it will stop dilating the found saturated pixels when the calculated average value is below the threshold. - Click Generate to output the dilated HDRI, dilated mask and the threshold mask.
- Test with lower res HDRI that is lower than 4K if possible before applying on higher res HDRI (8K or higher).
- Enable Show Debug Preview to display a Matplotlib window that shows the original HDRI, dilated HDRI, threshold mask ( the found saturated pixels) and the dilated mask. Take note that higher res HDRI can slow down Matplotlib window.
- Increase the dilate size value when working with higher res HDRI to reduce memory usage at the expense of longer calculation for each iteration. Try 4px for 8K, 8px for 16K and 16px for 32K res.
- Bump the Threshold value to the known maximum value that the target display hardware can handle. Using higher Threshold value can help reduce memory usage as it will use fewer iterations to achieve the target Threshold value.
- Using Rectangle or Cross dilate shape can provide speed up on slow system if the dilated shape is not a concern.
Do not immediately test with 16K res unless your system have at least 128GB RAM! You have been warned!
A simple metadata viewer for EXR and RAW (but not limited to files with embedded EXIF) with search filter.
A frontend manager for rawtoaces executable. Might work on Linux but not tested.
For Windows user, you can grab the rawtoaces.exe
executable
from AcademySoftwareFoundation/rawtoaces#124 courtesy of michelerenzullo.
Place the rawtoaces.exe
executable in hdri_dilate/resources/bin
for Raw2Aces Converter dialog to detect manually.
Last tested working on Windows 10 and Python 3.11.
- The Python OpenEXR library will fail to install for most users on Windows... refer
to https://stackoverflow.com/questions/65702285/error-in-installing-openexr-on-windows-platform for more details.
A workaround that works for me is using
pipwin
:pip install pipwin pipwin install openexr